<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11410">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">WIP: gsm_412 Cell Broadcast<br><br>Change-Id: I1a17c2ae8bf62150327956c10cb5bb896939e3fd<br>---<br>M include/osmocom/gsm/protocol/gsm_04_12.h<br>1 file changed, 68 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/11410/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/gsm/protocol/gsm_04_12.h b/include/osmocom/gsm/protocol/gsm_04_12.h</span><br><span>index 826e69b..749e3d7 100644</span><br><span>--- a/include/osmocom/gsm/protocol/gsm_04_12.h</span><br><span>+++ b/include/osmocom/gsm/protocol/gsm_04_12.h</span><br><span>@@ -30,3 +30,71 @@</span><br><span>       uint8_t cbsms_msg_map[6];</span><br><span>    uint8_t data[0];</span><br><span> } __attribute__((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Section 9.3: ?? */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.3.24: Warning Tyoe */</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_WARN_TYPE_EARTHQUAKE              0x00</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_WARN_TYPE_TSUNAMI          0x01</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_WARN_TYPE_QUAKE_ANDTSUNAMI 0x02</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_WARN_TYPE_TEST                     0x03</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_WARN_TYPE_OTHER                    0x04</span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm412_warning_type {</span><br><span style="color: hsl(120, 100%, 40%);">+    uint16_t warning_type:7,</span><br><span style="color: hsl(120, 100%, 40%);">+               emerg_user_alert:1,</span><br><span style="color: hsl(120, 100%, 40%);">+           popup:1,</span><br><span style="color: hsl(120, 100%, 40%);">+              padding:7;</span><br><span style="color: hsl(120, 100%, 40%);">+} __attribute__((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.3.25 */</span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm412_warning_sec_info {</span><br><span style="color: hsl(120, 100%, 40%);">+   uint8_t year;</span><br><span style="color: hsl(120, 100%, 40%);">+ uint8_t month;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint8_t day;</span><br><span style="color: hsl(120, 100%, 40%);">+  uint8_t hour;</span><br><span style="color: hsl(120, 100%, 40%);">+ uint8_t minute;</span><br><span style="color: hsl(120, 100%, 40%);">+       uint8_t second;</span><br><span style="color: hsl(120, 100%, 40%);">+       uint8_t timezone;</span><br><span style="color: hsl(120, 100%, 40%);">+     uint8_t signature[43];</span><br><span style="color: hsl(120, 100%, 40%);">+} __attribute__((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Section 9.4: Message Format on the Radio Network - MS/UE Interface */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.1.2.1 Serial Number */</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_SERNR_GS_CELL_IMM       0</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_SERNR_GS_PLMN_NORM    1</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_SERNR_GS_LA_SA_TA_NORM        2</span><br><span style="color: hsl(120, 100%, 40%);">+#define GSM412_SERNR_GS_CELL_NORM    3</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm412_9_serial_nr {</span><br><span style="color: hsl(120, 100%, 40%);">+      uint16_t        gs:2,</span><br><span style="color: hsl(120, 100%, 40%);">+                 msg_code:10,</span><br><span style="color: hsl(120, 100%, 40%);">+                  update_nr: 4;</span><br><span style="color: hsl(120, 100%, 40%);">+} __attribute__((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.1.2.4 Page Parameter */</span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm412_9_page_param {</span><br><span style="color: hsl(120, 100%, 40%);">+     uint8_t         total_pages:4,</span><br><span style="color: hsl(120, 100%, 40%);">+                        page_nr:4;</span><br><span style="color: hsl(120, 100%, 40%);">+} __attribute__((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.1.2 Message Parameter */</span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm412_9_message {</span><br><span style="color: hsl(120, 100%, 40%);">+  struct gsm412_9_serial_nr       ser_nr;         /* 9.4.1.2.1 */</span><br><span style="color: hsl(120, 100%, 40%);">+       uint16_t                        msg_id;         /* 9.4.1.2.2 */</span><br><span style="color: hsl(120, 100%, 40%);">+       uint8_t                         dcs;            /* TS 23.038 */</span><br><span style="color: hsl(120, 100%, 40%);">+       struct gsm412_9_page_param      page_param;     /* 9.4.1.2.4 */</span><br><span style="color: hsl(120, 100%, 40%);">+       uint8_t                         content[0];     /* byte 7..88, i.e. 0-82 octets */</span><br><span style="color: hsl(120, 100%, 40%);">+} __attribute__((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.1.3 ETWS Primary Notification Message */</span><br><span style="color: hsl(120, 100%, 40%);">+struct gsm412_9_etws_prim_notif_msg {</span><br><span style="color: hsl(120, 100%, 40%);">+      struct gsm412_9_serial_nr       ser_nr;         /* 9.4.1.2.1 */</span><br><span style="color: hsl(120, 100%, 40%);">+       uint16_t                        msg_id;         /* 9.4.1.2.2 */</span><br><span style="color: hsl(120, 100%, 40%);">+       struct gsm412_warning_type      warning_type;   /* 9.3.24 */</span><br><span style="color: hsl(120, 100%, 40%);">+  uint8_t                         warning_sec_info[50]; /* 9.3.25 */</span><br><span style="color: hsl(120, 100%, 40%);">+} __attribute__((packed));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+//struct gsm412_</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11410">change 11410</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11410"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1a17c2ae8bf62150327956c10cb5bb896939e3fd </div>
<div style="display:none"> Gerrit-Change-Number: 11410 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>