gsm_03_41.h File Reference
`#include <stdint.h>`
`#include <osmocom/core/endian.h>`
`#include <osmocom/gsm/protocol/gsm_04_12.h>`

Go to the source code of this file.

## Data Structures

struct | gsm341_ms_message
struct | gsm341_etws_message

## Macros

#define | OSMO_IS_LITTLE_ENDIAN 0
#define | GSM341_MAX_PAYLOAD (GSM412_MSG_LEN-sizeof(struct gsm341_ms_message))
#define | GSM341_MAX_CHARS (GSM341_MAX_PAYLOAD*8/7)
#define | GSM341_7BIT_PADDING '\r'
#define | GSM341_MSG_CODE(ms) ((ms)->serial.code_lo | ((ms)->serial.code_hi << 4))
#define | GSM341_GS_CELL_WIDE_IMMED 0
#define | GSM341_GS_PLMN_WIDE 1
#define | GSM341_GS_LA_WIDE 2
#define | GSM341_GS_CELL_WIDE 3
#define | GSM341_MSGID_EOTD_ASSISTANCE 0x03E8
#define | GSM341_MSGID_DGPS_CORRECTION 0x03E9
#define | GSM341_MSGID_DGPS_EPH_CLOCK_COR 0x03EA
#define | GSM341_MSGID_GPS_ALMANAC_OTHER 0x03EB
#define | GSM341_MSGID_ETWS_EARTHQUAKE 0x1100
#define | GSM341_MSGID_ETWS_TSUNAMI 0x1101
#define | GSM341_MSGID_ETWS_QUAKE_AND_TSUNAMI 0x1102
#define | GSM341_MSGID_ETWS_TEST 0x1103
#define | GSM341_MSGID_ETWS_OTHER 0x1104
#define | GSM341_MSGID_ETWS_CMAS_PRESIDENTIAL 0x1112
#define | GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_OBSERVED 0x1113
#define | GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_LIKELY 0x1114
#define | GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_OBSERVED 0x1115
#define | GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_LIKELY 0x1116
#define | GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_OBSERVED 0x1117
#define | GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_LIKELY 0x1118
#define | GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_OBSERVED 0x1119
#define | GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_LIKELY 0x111A
#define | GSM341_MSGID_ETWS_CMAS_AMBER 0x111B
#define | GSM341_MSGID_ETWS_CMAS_MONTHLY_TEST 0x111C
#define | GSM341_MSGID_ETWS_CMAS_EXERCISE 0x111D
#define | GSM341_MSGID_ETWS_CMAS_OPERATOR_DEFINED 0x111E
#define | GSM341_MSGID_ETWS_CMAS_PRESIDENTIAL_AL 0x111F
#define | GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_OBSERVED_AL 0x1120
#define | GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_LIKELY_AL 0x1121
#define | GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_OBSERVED_AL 0x1122
#define | GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_LIKELY_AL 0x1123
#define | GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_OBSERVED_AL 0x1124
#define | GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_LIKELY_AL 0x1125
#define | GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_OBSERVED_AL 0x1126
#define | GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_LIKELY_AL 0x1127
#define | GSM341_MSGID_ETWS_CMAS_AMBER_AL 0x1128
#define | GSM341_MSGID_ETWS_CMAS_MONTHLY_TEST_AL 0x1129
#define | GSM341_MSGID_ETWS_CMAS_EXERCISE_AL 0x112A
#define | GSM341_MSGID_ETWS_CMAS_OPERATOR_DEFINED_AL 0x112B
#define | GSM341_MSGID_ETWS_EU_INFO_LOCAL_LANGUAGE 0x1900

## Functions

struct gsm341_ms_message | __attribute__ ((packed))

## Variables

struct {
uint8_t gs:2
uint8_t code_hi:6
uint8_t code_lo:4
uint8_t update:4
} | serial
uint16_t | msg_id
struct {
uint8_t group:4
uint8_t language:4
} | dcs
struct {
uint8_t current:4
uint8_t total:4
} | page
uint8_t | data [0]
| message payload data More...
uint16_t | warning_type

## Detailed Description

GSM TS 03.41 definitions also TS 23.041.

## Macro Definition Documentation

## GSM341_7BIT_PADDING

#define GSM341_7BIT_PADDING '\r'

## GSM341_GS_CELL_WIDE

#define GSM341_GS_CELL_WIDE 3

## GSM341_GS_CELL_WIDE_IMMED

#define GSM341_GS_CELL_WIDE_IMMED 0

## GSM341_GS_LA_WIDE

#define GSM341_GS_LA_WIDE 2

## GSM341_GS_PLMN_WIDE

#define GSM341_GS_PLMN_WIDE 1

## GSM341_MAX_CHARS

#define GSM341_MAX_CHARS (GSM341_MAX_PAYLOAD*8/7)

## GSM341_MAX_PAYLOAD

#define GSM341_MAX_PAYLOAD (GSM412_MSG_LEN-sizeof(struct gsm341_ms_message))

## GSM341_MSG_CODE

#define GSM341_MSG_CODE | ( |  | ms | ) | ((ms)->serial.code_lo | ((ms)->serial.code_hi << 4))

## GSM341_MSGID_DGPS_CORRECTION

#define GSM341_MSGID_DGPS_CORRECTION 0x03E9

## GSM341_MSGID_DGPS_EPH_CLOCK_COR

#define GSM341_MSGID_DGPS_EPH_CLOCK_COR 0x03EA

## GSM341_MSGID_EOTD_ASSISTANCE

#define GSM341_MSGID_EOTD_ASSISTANCE 0x03E8

## GSM341_MSGID_ETWS_CMAS_AMBER

#define GSM341_MSGID_ETWS_CMAS_AMBER 0x111B

## GSM341_MSGID_ETWS_CMAS_AMBER_AL

#define GSM341_MSGID_ETWS_CMAS_AMBER_AL 0x1128

## GSM341_MSGID_ETWS_CMAS_EXERCISE

#define GSM341_MSGID_ETWS_CMAS_EXERCISE 0x111D

## GSM341_MSGID_ETWS_CMAS_EXERCISE_AL

#define GSM341_MSGID_ETWS_CMAS_EXERCISE_AL 0x112A

## GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_LIKELY

#define GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_LIKELY 0x1116

## GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_LIKELY_AL

#define GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_LIKELY_AL 0x1123

## GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_OBSERVED

#define GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_OBSERVED 0x1115

## GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_OBSERVED_AL

#define GSM341_MSGID_ETWS_CMAS_EXTREME_EXP_OBSERVED_AL 0x1122

## GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_LIKELY

#define GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_LIKELY 0x1114

## GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_LIKELY_AL

#define GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_LIKELY_AL 0x1121

## GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_OBSERVED

#define GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_OBSERVED 0x1113

## GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_OBSERVED_AL

#define GSM341_MSGID_ETWS_CMAS_EXTREME_IMM_OBSERVED_AL 0x1120

## GSM341_MSGID_ETWS_CMAS_MONTHLY_TEST

#define GSM341_MSGID_ETWS_CMAS_MONTHLY_TEST 0x111C

## GSM341_MSGID_ETWS_CMAS_MONTHLY_TEST_AL

#define GSM341_MSGID_ETWS_CMAS_MONTHLY_TEST_AL 0x1129

## GSM341_MSGID_ETWS_CMAS_OPERATOR_DEFINED

#define GSM341_MSGID_ETWS_CMAS_OPERATOR_DEFINED 0x111E

## GSM341_MSGID_ETWS_CMAS_OPERATOR_DEFINED_AL

#define GSM341_MSGID_ETWS_CMAS_OPERATOR_DEFINED_AL 0x112B

## GSM341_MSGID_ETWS_CMAS_PRESIDENTIAL

#define GSM341_MSGID_ETWS_CMAS_PRESIDENTIAL 0x1112

## GSM341_MSGID_ETWS_CMAS_PRESIDENTIAL_AL

#define GSM341_MSGID_ETWS_CMAS_PRESIDENTIAL_AL 0x111F

## GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_LIKELY

#define GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_LIKELY 0x111A

## GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_LIKELY_AL

#define GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_LIKELY_AL 0x1127

## GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_OBSERVED

#define GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_OBSERVED 0x1119

## GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_OBSERVED_AL

#define GSM341_MSGID_ETWS_CMAS_SEVERE_EXP_OBSERVED_AL 0x1126

## GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_LIKELY

#define GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_LIKELY 0x1118

## GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_LIKELY_AL

#define GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_LIKELY_AL 0x1125

## GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_OBSERVED

#define GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_OBSERVED 0x1117

## GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_OBSERVED_AL

#define GSM341_MSGID_ETWS_CMAS_SEVERE_IMM_OBSERVED_AL 0x1124

## GSM341_MSGID_ETWS_EARTHQUAKE

#define GSM341_MSGID_ETWS_EARTHQUAKE 0x1100

## GSM341_MSGID_ETWS_EU_INFO_LOCAL_LANGUAGE

#define GSM341_MSGID_ETWS_EU_INFO_LOCAL_LANGUAGE 0x1900

## GSM341_MSGID_ETWS_OTHER

#define GSM341_MSGID_ETWS_OTHER 0x1104

## GSM341_MSGID_ETWS_QUAKE_AND_TSUNAMI

#define GSM341_MSGID_ETWS_QUAKE_AND_TSUNAMI 0x1102

## GSM341_MSGID_ETWS_TEST

#define GSM341_MSGID_ETWS_TEST 0x1103

## GSM341_MSGID_ETWS_TSUNAMI

#define GSM341_MSGID_ETWS_TSUNAMI 0x1101

## GSM341_MSGID_GPS_ALMANAC_OTHER

#define GSM341_MSGID_GPS_ALMANAC_OTHER 0x03EB

## OSMO_IS_LITTLE_ENDIAN

#define OSMO_IS_LITTLE_ENDIAN 0

## Function Documentation

## __attribute__()

struct gsm341_ms_message __attribute__ | ( | (packed) |  | ) |

## Variable Documentation

## alert

uint8_t alert

## code_hi

uint8_t code_hi

## code_lo

uint8_t code_lo

## current

uint8_t current

## data

uint8_t data

message payload data

Data.

Referenced by cp_timer_expired(), decode_auth_info(), decode_lai(), decode_pdp_info(), gsm0341_build_msg(), gsm0480_create_notifySS(), gsm0480_create_unstructuredSS_Notify(), gsm0808_create_dtap(), gsm_7bit_encode(), gsm_7bit_encode_n(), gsm_7bit_encode_n_ussd(), gsm_7bit_encode_oct(), gsm_7bit_encode_ussd(), gsm_septet_encode(), gsm_septets2octets(), ipa_ccm_make_id_resp_from_req(), lapd_send_ua(), lapd_t200_cb(), lapd_t203_cb(), lapdm_pad_msgb(), msgb_push_TLV1(), msgb_wrap_with_TL(), osmo_gsup_decode(), osmo_match_shift_tlv(), osmo_match_shift_tv_fixed(), osmo_oap_decode(), osmo_shift_lv(), osmo_shift_tlv(), osmo_shift_v_fixed(), parse_cell_id_ci_list(), parse_cell_id_global_list(), parse_cell_id_lac_and_ci_list(), parse_cell_id_lac_list(), parse_cell_id_lai_and_lac(), and rp_timer_expired().

## dcs

struct { ... } dcs

Referenced by gsm0341_build_msg(), gsm338_get_sms_alphabet(), and parse_process_uss_req().

## group

uint8_t group

Referenced by gsm0502_calc_paging_group().

## gs

uint8_t gs

## language

uint8_t language

## msg_id

uint16_t msg_id

Referenced by gsm0341_build_msg().

## page

struct { ... } page

## popup

uint8_t popup

## serial

struct { ... } serial

## total

uint8_t total

## update

uint8_t update

Referenced by gsm0341_build_msg().

## warning_type

uint16_t warning_type