This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/11410 Change subject: WIP: gsm_412 Cell Broadcast ...................................................................... WIP: gsm_412 Cell Broadcast Change-Id: I1a17c2ae8bf62150327956c10cb5bb896939e3fd --- M include/osmocom/gsm/protocol/gsm_04_12.h 1 file changed, 68 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/11410/1 diff --git a/include/osmocom/gsm/protocol/gsm_04_12.h b/include/osmocom/gsm/protocol/gsm_04_12.h index 826e69b..749e3d7 100644 --- a/include/osmocom/gsm/protocol/gsm_04_12.h +++ b/include/osmocom/gsm/protocol/gsm_04_12.h @@ -30,3 +30,71 @@ uint8_t cbsms_msg_map[6]; uint8_t data[0]; } __attribute__((packed)); + +/* Section 9.3: ?? */ + +/* 9.3.24: Warning Tyoe */ +#define GSM412_WARN_TYPE_EARTHQUAKE 0x00 +#define GSM412_WARN_TYPE_TSUNAMI 0x01 +#define GSM412_WARN_TYPE_QUAKE_ANDTSUNAMI 0x02 +#define GSM412_WARN_TYPE_TEST 0x03 +#define GSM412_WARN_TYPE_OTHER 0x04 +struct gsm412_warning_type { + uint16_t warning_type:7, + emerg_user_alert:1, + popup:1, + padding:7; +} __attribute__((packed)); + + +/* 9.3.25 */ +struct gsm412_warning_sec_info { + uint8_t year; + uint8_t month; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t second; + uint8_t timezone; + uint8_t signature[43]; +} __attribute__((packed)); + +/* Section 9.4: Message Format on the Radio Network - MS/UE Interface */ + +/* 9.4.1.2.1 Serial Number */ +#define GSM412_SERNR_GS_CELL_IMM 0 +#define GSM412_SERNR_GS_PLMN_NORM 1 +#define GSM412_SERNR_GS_LA_SA_TA_NORM 2 +#define GSM412_SERNR_GS_CELL_NORM 3 + +struct gsm412_9_serial_nr { + uint16_t gs:2, + msg_code:10, + update_nr: 4; +} __attribute__((packed)); + +/* 9.4.1.2.4 Page Parameter */ +struct gsm412_9_page_param { + uint8_t total_pages:4, + page_nr:4; +} __attribute__((packed)); + +/* 9.4.1.2 Message Parameter */ +struct gsm412_9_message { + struct gsm412_9_serial_nr ser_nr; /* 9.4.1.2.1 */ + uint16_t msg_id; /* 9.4.1.2.2 */ + uint8_t dcs; /* TS 23.038 */ + struct gsm412_9_page_param page_param; /* 9.4.1.2.4 */ + uint8_t content[0]; /* byte 7..88, i.e. 0-82 octets */ +} __attribute__((packed)); + +/* 9.4.1.3 ETWS Primary Notification Message */ +struct gsm412_9_etws_prim_notif_msg { + struct gsm412_9_serial_nr ser_nr; /* 9.4.1.2.1 */ + uint16_t msg_id; /* 9.4.1.2.2 */ + struct gsm412_warning_type warning_type; /* 9.3.24 */ + uint8_t warning_sec_info[50]; /* 9.3.25 */ +} __attribute__((packed)); + + +//struct gsm412_ -- To view, visit https://gerrit.osmocom.org/11410 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1a17c2ae8bf62150327956c10cb5bb896939e3fd Gerrit-Change-Number: 11410 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte <laforge at gnumonks.org> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181021/40714588/attachment.htm>