X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=src%2Fshared%2Flibosmocore%2Finclude%2Fosmocore%2Fprotocol%2Fgsm_03_41.h;fp=src%2Fshared%2Flibosmocore%2Finclude%2Fosmocore%2Fprotocol%2Fgsm_03_41.h;h=3b1b7c9fb5f095e4fd22fbb768201e5b4aae2edb;hb=d6ab52aa9a43a2fe19c3c3970a6329231da1e218;hp=250d6675485af3d22f5a147d5cfd5d7e35b26500;hpb=34bbb12b7a020865fc10d0a27b42c19ef11abcc2;p=osmocom-bb.git diff --git a/src/shared/libosmocore/include/osmocore/protocol/gsm_03_41.h b/src/shared/libosmocore/include/osmocore/protocol/gsm_03_41.h index 250d667..3b1b7c9 100644 --- a/src/shared/libosmocore/include/osmocore/protocol/gsm_03_41.h +++ b/src/shared/libosmocore/include/osmocore/protocol/gsm_03_41.h @@ -3,15 +3,15 @@ #include -/* GSM TS 03.41 definitions */ +/* GSM TS 03.41 definitions also TS 23.041*/ /* Chapter 9.3.2 */ struct gsm341_ms_message { struct { uint8_t code_hi:6; uint8_t gs:2; - uint8_t update:2; - uint8_t code_lo:6; + uint8_t update:4; + uint8_t code_lo:4; } serial; uint16_t msg_id; struct { @@ -25,6 +25,23 @@ struct gsm341_ms_message { uint8_t data[0]; } __attribute__((packed)); +/* Chapter 9.4.1.3 */ +struct gsm341_etws_message { + struct { + uint8_t code_hi:4; + uint8_t popup:1; + uint8_t alert:1; + uint8_t gs:2; + uint8_t update:4; + uint8_t code_lo:4; + } serial; + uint16_t msg_id; + uint16_t warning_type; + uint8_t data[0]; +} __attribute__((packed)); + +#define GSM341_MSG_CODE(ms) (ms->serial.code_lo | (msg->serial.code_hi << 4)) + /* Section 9.3.2.1 - Geographical Scope */ #define GSM341_GS_CELL_WIDE_IMMED 0 #define GSM341_GS_PLMN_WIDE 1