libosmogsm 1.13.1.1-afb4 Osmocom GSM library

gsm_23_041.h
Go to the documentation of this file.
1#pragma once
2
3#include <osmocom/core/endian.h>
4
5/* Section 9.3.24: Warning-Type */
6 enum gsm23041_warning_type_value {
7 CBS_ETWS_WARN_TYPE_EARTHQUAKE = 0,
8 CBS_ETWS_WARN_TYPE_TSUNAMI = 1,
9 CBS_ETWS_WARN_TYPE_EARTHQUAKE_AND_TSUNAMI = 2,
10 CBS_ETWS_WARN_TYPE_TEST = 3,
11 CBS_ETWS_WARN_TYPE_OTHER = 4,
12 /* 0000101-1111111 Reserved for future use */
13};
14
15/* Section 9.4.1.2: GSM Message Format */
16 struct gsm23041_msg_param_gsm {
17 uint16_t serial_nr;
18 uint16_t message_id;
19 uint8_t dcs;
20 struct {
21#if OSMO_IS_LITTLE_ENDIAN
22 uint8_t num_pages:4,
23 page_nr:4;
24#elif OSMO_IS_BIG_ENDIAN
25/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
26 uint8_t page_nr:4, num_pages:4;
27#endif
28 } page_param;
29 uint8_t content[0];
30} __attribute__ ((packed));
31
32/* Section 9.4.1.2.2 Message Identifier */
33 enum {
34 /* 0 - 999: Allocated by GSM AD.26 */
35 CBS_MSGID_LCS_EOTD_ASSIST = 1000,
36 CBS_MSGID_LCS_DGPS_CORRECTION = 1001,
37 CBS_MSGID_LCS_GPS_EPHEM_CLOCK = 1002,
38 CBS_MSGID_LCS_GPS_ALMANAC_OTHER = 1003,
39 /* 1004 - 4095: RFU */
40 /* 4096 - 4223: clear text SIM data download */
41 /* 4224 - 4351: secured SIM data download */
42 CBS_MSGID_ETWS_EARTHQUAKE = 4352,
43 CBS_MSGID_ETWS_TSUNAMI = 4353,
44 CBS_MSGID_ETWS_EARTHQUAKE_TSUNAMI = 4354,
45 CBS_MSGID_ETWS_TEST = 4355,
46 CBS_MSGID_ETWS_OTHER = 4356,
47 /* 4357 - 4359: ETWS RFU */
48 /* 4360 - 4369: RFU */
49 CBS_MSGID_CMAS_PRESIDENTIAL = 4370,
50 CBS_MSGID_CMAS_EXTREME_IMMEDIATE_OBSERVED = 4371,
51 CBS_MSGID_CMAS_EXTREME_IMMEDIATE_LIKELY = 4372,
52 CBS_MSGID_CMAS_EXTREME_EXPECTED_OBSERVED = 4373,
53 CBS_MSGID_CMAS_EXTREME_EXPECTED_LIKELY = 4374,
54 CBS_MSGID_CMAS_SEVERE_IMMEDIATE_OBSERVED = 4375,
55 CBS_MSGID_CMAS_SEVERE_IMMEDIATE_LIKELY = 4376,
56 CBS_MSGID_CMAS_SEVERE_EXPECTED_OBSERVED = 4377,
57 CBS_MSGID_CMAS_SEVERE_EXPECTED_LIKELY = 4378,
58 CBS_MSGID_CMAS_AMBER = 4379,
59 CBS_MSGID_CMAS_MONTHLY_TEST = 4380,
60 CBS_MSGID_CMAS_EXERCISE = 4381,
61 CBS_MSGID_CMAS_OPERATOR_DEFINED = 4382,
62 CBS_MSGID_CMAS_PRESIDENTIAL_ADDL = 4383,
63 CBS_MSGID_CMAS_EXTREME_IMMEDIATE_OBSERVED_ADDL = 4384,
64 CBS_MSGID_CMAS_EXTREME_IMMEDIATE_LIKELY_ADDL = 4385,
65 CBS_MSGID_CMAS_EXTREME_EXPECTED_OBSERVED_ADDL = 4386,
66 CBS_MSGID_CMAS_EXTREME_EXPECTED_LIKELY_ADDL = 4387,
67 CBS_MSGID_CMAS_SEVERE_IMMEDIATE_OBSERVED_ADDL = 4388,
68 CBS_MSGID_CMAS_SEVERE_IMMEDIATE_LIKELY_ADDL = 4389,
69 CBS_MSGID_CMAS_SEVERE_EXPECTED_OBSERVED_ADDL = 4390,
70 CBS_MSGID_CMAS_SEVERE_EXPECTED_LIKELY_ADDL = 4391,
71 CBS_MSGID_CMAS_AMBER_ADDL = 4392,
72 CBS_MSGID_CMAS_MONTHLY_TEST_ADDL = 4393,
73 CBS_MSGID_CMAS_EXERCISE_ADDL = 4394,
74 CBS_MSGID_CMAS_OPERATOR_DEFINED_ADDL = 4395,
75 /* 4396 - 4399: RFU CMAS / EU-Alert */
76 /* 4400 - 6399: RFU PWS */
77 CBS_MSGID_EU_INFO_LOCAL_LANG = 6400,
78 /* 6491 - 40959: RFU */
79 /* 40960 - 45055: PLMN operator specific range */
80 /* 45056 - 61439: PLMN operator specific range RFU */
81 /* 61440 - 65534: PLMN operator specific range */
82 CBS_MSGID_RESERVED = 65535
83};
84
85/* Section 9.4.1.3.2 ETWS Primary Notification Message Parameter */
86 struct gsm23041_etws_primary_gsm {
87 uint16_t serial_nr;
88 uint16_t message_id;
89 uint16_t warning_type;
90 uint8_t warning_sec_info[50];
91} __attribute__ ((packed));
92
93
94/* Section 9.4.2.2 UMTS Message Parameter */
95 struct gsm23041_msg_param_umts {
96 uint8_t msg_type; /* as per TS 25.324 */
97 uint16_t message_id;
98 uint16_t serial_nr;
99 uint8_t dcs;
100 uint8_t content[0];
101} __attribute__ ((packed));
endian.h
CBS_MSGID_CMAS_MONTHLY_TEST
@ CBS_MSGID_CMAS_MONTHLY_TEST
Definition: gsm_23_041.h:59
CBS_MSGID_LCS_DGPS_CORRECTION
@ CBS_MSGID_LCS_DGPS_CORRECTION
Definition: gsm_23_041.h:36
CBS_MSGID_CMAS_EXTREME_IMMEDIATE_OBSERVED_ADDL
@ CBS_MSGID_CMAS_EXTREME_IMMEDIATE_OBSERVED_ADDL
Definition: gsm_23_041.h:63
CBS_MSGID_ETWS_TSUNAMI
@ CBS_MSGID_ETWS_TSUNAMI
Definition: gsm_23_041.h:43
CBS_MSGID_CMAS_EXTREME_EXPECTED_OBSERVED_ADDL
@ CBS_MSGID_CMAS_EXTREME_EXPECTED_OBSERVED_ADDL
Definition: gsm_23_041.h:65
CBS_MSGID_CMAS_SEVERE_IMMEDIATE_LIKELY
@ CBS_MSGID_CMAS_SEVERE_IMMEDIATE_LIKELY
Definition: gsm_23_041.h:55
CBS_MSGID_CMAS_EXTREME_EXPECTED_LIKELY
@ CBS_MSGID_CMAS_EXTREME_EXPECTED_LIKELY
Definition: gsm_23_041.h:53
CBS_MSGID_CMAS_SEVERE_IMMEDIATE_LIKELY_ADDL
@ CBS_MSGID_CMAS_SEVERE_IMMEDIATE_LIKELY_ADDL
Definition: gsm_23_041.h:68
CBS_MSGID_CMAS_PRESIDENTIAL_ADDL
@ CBS_MSGID_CMAS_PRESIDENTIAL_ADDL
Definition: gsm_23_041.h:62
CBS_MSGID_CMAS_EXTREME_IMMEDIATE_LIKELY_ADDL
@ CBS_MSGID_CMAS_EXTREME_IMMEDIATE_LIKELY_ADDL
Definition: gsm_23_041.h:64
CBS_MSGID_CMAS_SEVERE_IMMEDIATE_OBSERVED_ADDL
@ CBS_MSGID_CMAS_SEVERE_IMMEDIATE_OBSERVED_ADDL
Definition: gsm_23_041.h:67
CBS_MSGID_CMAS_OPERATOR_DEFINED_ADDL
@ CBS_MSGID_CMAS_OPERATOR_DEFINED_ADDL
Definition: gsm_23_041.h:74
CBS_MSGID_CMAS_AMBER
@ CBS_MSGID_CMAS_AMBER
Definition: gsm_23_041.h:58
CBS_MSGID_ETWS_TEST
@ CBS_MSGID_ETWS_TEST
Definition: gsm_23_041.h:45
CBS_MSGID_CMAS_PRESIDENTIAL
@ CBS_MSGID_CMAS_PRESIDENTIAL
Definition: gsm_23_041.h:49
CBS_MSGID_CMAS_SEVERE_IMMEDIATE_OBSERVED
@ CBS_MSGID_CMAS_SEVERE_IMMEDIATE_OBSERVED
Definition: gsm_23_041.h:54
CBS_MSGID_CMAS_EXTREME_EXPECTED_LIKELY_ADDL
@ CBS_MSGID_CMAS_EXTREME_EXPECTED_LIKELY_ADDL
Definition: gsm_23_041.h:66
CBS_MSGID_CMAS_EXTREME_IMMEDIATE_OBSERVED
@ CBS_MSGID_CMAS_EXTREME_IMMEDIATE_OBSERVED
Definition: gsm_23_041.h:50
CBS_MSGID_LCS_GPS_EPHEM_CLOCK
@ CBS_MSGID_LCS_GPS_EPHEM_CLOCK
Definition: gsm_23_041.h:37
CBS_MSGID_CMAS_OPERATOR_DEFINED
@ CBS_MSGID_CMAS_OPERATOR_DEFINED
Definition: gsm_23_041.h:61
CBS_MSGID_RESERVED
@ CBS_MSGID_RESERVED
Definition: gsm_23_041.h:82
CBS_MSGID_LCS_GPS_ALMANAC_OTHER
@ CBS_MSGID_LCS_GPS_ALMANAC_OTHER
Definition: gsm_23_041.h:38
CBS_MSGID_LCS_EOTD_ASSIST
@ CBS_MSGID_LCS_EOTD_ASSIST
Definition: gsm_23_041.h:35
CBS_MSGID_CMAS_SEVERE_EXPECTED_OBSERVED
@ CBS_MSGID_CMAS_SEVERE_EXPECTED_OBSERVED
Definition: gsm_23_041.h:56
CBS_MSGID_CMAS_EXERCISE
@ CBS_MSGID_CMAS_EXERCISE
Definition: gsm_23_041.h:60
CBS_MSGID_ETWS_EARTHQUAKE_TSUNAMI
@ CBS_MSGID_ETWS_EARTHQUAKE_TSUNAMI
Definition: gsm_23_041.h:44
CBS_MSGID_CMAS_AMBER_ADDL
@ CBS_MSGID_CMAS_AMBER_ADDL
Definition: gsm_23_041.h:71
CBS_MSGID_EU_INFO_LOCAL_LANG
@ CBS_MSGID_EU_INFO_LOCAL_LANG
Definition: gsm_23_041.h:77
CBS_MSGID_CMAS_MONTHLY_TEST_ADDL
@ CBS_MSGID_CMAS_MONTHLY_TEST_ADDL
Definition: gsm_23_041.h:72
CBS_MSGID_ETWS_EARTHQUAKE
@ CBS_MSGID_ETWS_EARTHQUAKE
Definition: gsm_23_041.h:42
CBS_MSGID_ETWS_OTHER
@ CBS_MSGID_ETWS_OTHER
Definition: gsm_23_041.h:46
CBS_MSGID_CMAS_EXTREME_EXPECTED_OBSERVED
@ CBS_MSGID_CMAS_EXTREME_EXPECTED_OBSERVED
Definition: gsm_23_041.h:52
CBS_MSGID_CMAS_EXERCISE_ADDL
@ CBS_MSGID_CMAS_EXERCISE_ADDL
Definition: gsm_23_041.h:73
CBS_MSGID_CMAS_SEVERE_EXPECTED_LIKELY_ADDL
@ CBS_MSGID_CMAS_SEVERE_EXPECTED_LIKELY_ADDL
Definition: gsm_23_041.h:70
CBS_MSGID_CMAS_SEVERE_EXPECTED_OBSERVED_ADDL
@ CBS_MSGID_CMAS_SEVERE_EXPECTED_OBSERVED_ADDL
Definition: gsm_23_041.h:69
CBS_MSGID_CMAS_SEVERE_EXPECTED_LIKELY
@ CBS_MSGID_CMAS_SEVERE_EXPECTED_LIKELY
Definition: gsm_23_041.h:57
CBS_MSGID_CMAS_EXTREME_IMMEDIATE_LIKELY
@ CBS_MSGID_CMAS_EXTREME_IMMEDIATE_LIKELY
Definition: gsm_23_041.h:51
__attribute__
enum @115 __attribute__
gsm23041_warning_type_value
gsm23041_warning_type_value
Definition: gsm_23_041.h:6
CBS_ETWS_WARN_TYPE_EARTHQUAKE_AND_TSUNAMI
@ CBS_ETWS_WARN_TYPE_EARTHQUAKE_AND_TSUNAMI
Definition: gsm_23_041.h:9
CBS_ETWS_WARN_TYPE_EARTHQUAKE
@ CBS_ETWS_WARN_TYPE_EARTHQUAKE
Definition: gsm_23_041.h:7
CBS_ETWS_WARN_TYPE_TSUNAMI
@ CBS_ETWS_WARN_TYPE_TSUNAMI
Definition: gsm_23_041.h:8
CBS_ETWS_WARN_TYPE_OTHER
@ CBS_ETWS_WARN_TYPE_OTHER
Definition: gsm_23_041.h:11
CBS_ETWS_WARN_TYPE_TEST
@ CBS_ETWS_WARN_TYPE_TEST
Definition: gsm_23_041.h:10
gsm23041_etws_primary_gsm
Definition: gsm_23_041.h:86
gsm23041_etws_primary_gsm::warning_sec_info
uint8_t warning_sec_info[50]
Definition: gsm_23_041.h:90
gsm23041_etws_primary_gsm::serial_nr
uint16_t serial_nr
Definition: gsm_23_041.h:87
gsm23041_etws_primary_gsm::message_id
uint16_t message_id
Definition: gsm_23_041.h:88
gsm23041_etws_primary_gsm::warning_type
uint16_t warning_type
Definition: gsm_23_041.h:89
gsm23041_msg_param_gsm
Definition: gsm_23_041.h:16
gsm23041_msg_param_gsm::message_id
uint16_t message_id
Definition: gsm_23_041.h:18
gsm23041_msg_param_gsm::content
uint8_t content[0]
Definition: gsm_23_041.h:29
gsm23041_msg_param_gsm::serial_nr
uint16_t serial_nr
Definition: gsm_23_041.h:17
gsm23041_msg_param_gsm::page_param
struct gsm23041_msg_param_gsm::@116 page_param
gsm23041_msg_param_gsm::dcs
uint8_t dcs
Definition: gsm_23_041.h:19
gsm23041_msg_param_umts
Definition: gsm_23_041.h:95
gsm23041_msg_param_umts::msg_type
uint8_t msg_type
Definition: gsm_23_041.h:96
gsm23041_msg_param_umts::dcs
uint8_t dcs
Definition: gsm_23_041.h:99
gsm23041_msg_param_umts::serial_nr
uint16_t serial_nr
Definition: gsm_23_041.h:98
gsm23041_msg_param_umts::content
uint8_t content[0]
Definition: gsm_23_041.h:100
gsm23041_msg_param_umts::message_id
uint16_t message_id
Definition: gsm_23_041.h:97