\doxysection{gsm\+\_\+23\+\_\+041.\+h}
\label{gsm__23__041_8h_source}\index{include/osmocom/gsm/protocol/gsm\_23\_041.h@{include/osmocom/gsm/protocol/gsm\_23\_041.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include <osmocom/core/endian.h>}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{comment}{/* Section 9.3.24: Warning-\/Type */}}
\DoxyCodeLine{6 \textcolor{keyword}{enum} gsm23041\_warning\_type\_value \{}
\DoxyCodeLine{7         CBS\_ETWS\_WARN\_TYPE\_EARTHQUAKE = 0,}
\DoxyCodeLine{8         CBS\_ETWS\_WARN\_TYPE\_TSUNAMI = 1,}
\DoxyCodeLine{9         CBS\_ETWS\_WARN\_TYPE\_EARTHQUAKE\_AND\_TSUNAMI = 2,}
\DoxyCodeLine{10         CBS\_ETWS\_WARN\_TYPE\_TEST = 3,}
\DoxyCodeLine{11         CBS\_ETWS\_WARN\_TYPE\_OTHER = 4,}
\DoxyCodeLine{12         \textcolor{comment}{/* 0000101-\/1111111 Reserved for future use */}}
\DoxyCodeLine{13 \};}
\DoxyCodeLine{14 }
\DoxyCodeLine{15 \textcolor{comment}{/* Section 9.4.1.2: GSM Message Format */}}
\DoxyCodeLine{16 \textcolor{keyword}{struct }gsm23041\_msg\_param\_gsm \{}
\DoxyCodeLine{17         uint16\_t serial\_nr;}
\DoxyCodeLine{18         uint16\_t message\_id;}
\DoxyCodeLine{19         uint8\_t dcs;}
\DoxyCodeLine{20         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{21 \textcolor{preprocessor}{\#if OSMO\_IS\_LITTLE\_ENDIAN}}
\DoxyCodeLine{22                 uint8\_t num\_pages:4,}
\DoxyCodeLine{23                         page\_nr:4;}
\DoxyCodeLine{24 \textcolor{preprocessor}{\#elif OSMO\_IS\_BIG\_ENDIAN}}
\DoxyCodeLine{25 \textcolor{comment}{/* auto-\/generated from the little endian part above (libosmocore/contrib/struct\_endianness.py) */}}
\DoxyCodeLine{26                 uint8\_t page\_nr:4, num\_pages:4;}
\DoxyCodeLine{27 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{28         \} page\_param;}
\DoxyCodeLine{29         uint8\_t content[0];}
\DoxyCodeLine{30 \} \_\_attribute\_\_ ((packed));}
\DoxyCodeLine{31 }
\DoxyCodeLine{32 \textcolor{comment}{/* Section 9.4.1.2.2 Message Identifier */}}
\DoxyCodeLine{33 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{34         \textcolor{comment}{/* 0 -\/ 999: Allocated by GSM AD.26 */}}
\DoxyCodeLine{35         CBS\_MSGID\_LCS\_EOTD\_ASSIST      = 1000,}
\DoxyCodeLine{36         CBS\_MSGID\_LCS\_DGPS\_CORRECTION      = 1001,}
\DoxyCodeLine{37         CBS\_MSGID\_LCS\_GPS\_EPHEM\_CLOCK      = 1002,}
\DoxyCodeLine{38         CBS\_MSGID\_LCS\_GPS\_ALMANAC\_OTHER  = 1003,}
\DoxyCodeLine{39         \textcolor{comment}{/* 1004 -\/ 4095: RFU */}}
\DoxyCodeLine{40         \textcolor{comment}{/* 4096 -\/ 4223: clear text SIM data download */}}
\DoxyCodeLine{41         \textcolor{comment}{/* 4224 -\/ 4351: secured SIM data download */}}
\DoxyCodeLine{42         CBS\_MSGID\_ETWS\_EARTHQUAKE      = 4352,}
\DoxyCodeLine{43         CBS\_MSGID\_ETWS\_TSUNAMI            = 4353,}
\DoxyCodeLine{44         CBS\_MSGID\_ETWS\_EARTHQUAKE\_TSUNAMI = 4354,}
\DoxyCodeLine{45         CBS\_MSGID\_ETWS\_TEST          = 4355,}
\DoxyCodeLine{46         CBS\_MSGID\_ETWS\_OTHER                = 4356,}
\DoxyCodeLine{47         \textcolor{comment}{/* 4357 -\/ 4359: ETWS RFU */}}
\DoxyCodeLine{48         \textcolor{comment}{/* 4360 -\/ 4369: RFU */}}
\DoxyCodeLine{49         CBS\_MSGID\_CMAS\_PRESIDENTIAL  = 4370,}
\DoxyCodeLine{50         CBS\_MSGID\_CMAS\_EXTREME\_IMMEDIATE\_OBSERVED      = 4371,}
\DoxyCodeLine{51         CBS\_MSGID\_CMAS\_EXTREME\_IMMEDIATE\_LIKELY          = 4372,}
\DoxyCodeLine{52         CBS\_MSGID\_CMAS\_EXTREME\_EXPECTED\_OBSERVED        = 4373,}
\DoxyCodeLine{53         CBS\_MSGID\_CMAS\_EXTREME\_EXPECTED\_LIKELY            = 4374,}
\DoxyCodeLine{54         CBS\_MSGID\_CMAS\_SEVERE\_IMMEDIATE\_OBSERVED        = 4375,}
\DoxyCodeLine{55         CBS\_MSGID\_CMAS\_SEVERE\_IMMEDIATE\_LIKELY            = 4376,}
\DoxyCodeLine{56         CBS\_MSGID\_CMAS\_SEVERE\_EXPECTED\_OBSERVED          = 4377,}
\DoxyCodeLine{57         CBS\_MSGID\_CMAS\_SEVERE\_EXPECTED\_LIKELY              = 4378,}
\DoxyCodeLine{58         CBS\_MSGID\_CMAS\_AMBER                                = 4379,}
\DoxyCodeLine{59         CBS\_MSGID\_CMAS\_MONTHLY\_TEST                  = 4380,}
\DoxyCodeLine{60         CBS\_MSGID\_CMAS\_EXERCISE                          = 4381,}
\DoxyCodeLine{61         CBS\_MSGID\_CMAS\_OPERATOR\_DEFINED                  = 4382,}
\DoxyCodeLine{62         CBS\_MSGID\_CMAS\_PRESIDENTIAL\_ADDL                = 4383,}
\DoxyCodeLine{63         CBS\_MSGID\_CMAS\_EXTREME\_IMMEDIATE\_OBSERVED\_ADDL    = 4384,}
\DoxyCodeLine{64         CBS\_MSGID\_CMAS\_EXTREME\_IMMEDIATE\_LIKELY\_ADDL        = 4385,}
\DoxyCodeLine{65         CBS\_MSGID\_CMAS\_EXTREME\_EXPECTED\_OBSERVED\_ADDL      = 4386,}
\DoxyCodeLine{66         CBS\_MSGID\_CMAS\_EXTREME\_EXPECTED\_LIKELY\_ADDL  = 4387,}
\DoxyCodeLine{67         CBS\_MSGID\_CMAS\_SEVERE\_IMMEDIATE\_OBSERVED\_ADDL      = 4388,}
\DoxyCodeLine{68         CBS\_MSGID\_CMAS\_SEVERE\_IMMEDIATE\_LIKELY\_ADDL  = 4389,}
\DoxyCodeLine{69         CBS\_MSGID\_CMAS\_SEVERE\_EXPECTED\_OBSERVED\_ADDL        = 4390,}
\DoxyCodeLine{70         CBS\_MSGID\_CMAS\_SEVERE\_EXPECTED\_LIKELY\_ADDL    = 4391,}
\DoxyCodeLine{71         CBS\_MSGID\_CMAS\_AMBER\_ADDL                      = 4392,}
\DoxyCodeLine{72         CBS\_MSGID\_CMAS\_MONTHLY\_TEST\_ADDL                = 4393,}
\DoxyCodeLine{73         CBS\_MSGID\_CMAS\_EXERCISE\_ADDL                        = 4394,}
\DoxyCodeLine{74         CBS\_MSGID\_CMAS\_OPERATOR\_DEFINED\_ADDL                = 4395,}
\DoxyCodeLine{75         \textcolor{comment}{/* 4396 -\/ 4399: RFU CMAS / EU-\/Alert */}}
\DoxyCodeLine{76         \textcolor{comment}{/* 4400 -\/ 6399: RFU PWS */}}
\DoxyCodeLine{77         CBS\_MSGID\_EU\_INFO\_LOCAL\_LANG                        = 6400,}
\DoxyCodeLine{78         \textcolor{comment}{/* 6491 -\/ 40959: RFU */}}
\DoxyCodeLine{79         \textcolor{comment}{/* 40960 -\/ 45055: PLMN operator specific range */}}
\DoxyCodeLine{80         \textcolor{comment}{/* 45056 -\/ 61439: PLMN operator specific range RFU */}}
\DoxyCodeLine{81         \textcolor{comment}{/* 61440 -\/ 65534: PLMN operator specific range */}}
\DoxyCodeLine{82         CBS\_MSGID\_RESERVED                            = 65535}
\DoxyCodeLine{83 \};}
\DoxyCodeLine{84 }
\DoxyCodeLine{85 \textcolor{comment}{/* Section 9.4.1.3.2 ETWS Primary Notification Message Parameter */}}
\DoxyCodeLine{86 \textcolor{keyword}{struct }gsm23041\_etws\_primary\_gsm \{}
\DoxyCodeLine{87         uint16\_t serial\_nr;}
\DoxyCodeLine{88         uint16\_t message\_id;}
\DoxyCodeLine{89         uint16\_t warning\_type;}
\DoxyCodeLine{90         uint8\_t warning\_sec\_info[50];}
\DoxyCodeLine{91 \} \_\_attribute\_\_ ((packed));}
\DoxyCodeLine{92 }
\DoxyCodeLine{93 }
\DoxyCodeLine{94 \textcolor{comment}{/* Section 9.4.2.2 UMTS Message Parameter */}}
\DoxyCodeLine{95 \textcolor{keyword}{struct }gsm23041\_msg\_param\_umts \{}
\DoxyCodeLine{96         uint8\_t msg\_type;       \textcolor{comment}{/* as per TS 25.324 */}}
\DoxyCodeLine{97         uint16\_t message\_id;}
\DoxyCodeLine{98         uint16\_t serial\_nr;}
\DoxyCodeLine{99         uint8\_t dcs;}
\DoxyCodeLine{100         uint8\_t content[0];}
\DoxyCodeLine{101 \} \_\_attribute\_\_ ((packed));}

\end{DoxyCode}
