libosmogsm 1.9.0.196-9975
Osmocom GSM library
Gsm0408

GSM Mobile Radion Interface L3 messages / TS 04.08. More...

Functions

const char * rr_cause_name (uint8_t cause)
 return string representation of RR Cause value More...
 
char * osmo_rai_name_buf (char *buf, size_t buf_len, const struct gprs_ra_id *rai)
 Return MCC-MNC-LAC-RAC as string, in a caller-provided output buffer. More...
 
const char * osmo_rai_name (const struct gprs_ra_id *rai)
 Return MCC-MNC-LAC-RAC as string, in a static buffer. More...
 
char * osmo_rai_name_c (const void *ctx, const struct gprs_ra_id *rai)
 Return MCC-MNC-LAC-RAC as string, in dynamically-allocated output buffer. More...
 
const char * gsm48_cc_state_name (uint8_t state)
 return string representation of CC State More...
 
const char * gsm48_cc_msg_name (uint8_t msgtype)
 return string representation of CC Message Type More...
 
const char * gsm48_rr_msg_name (uint8_t msgtype)
 return string representation of RR Message Type More...
 
const char * gsm48_rr_short_pd_msg_name (uint8_t msgtype)
 return string representation of RR Message Type using the RR short protocol discriminator More...
 
enum gsm48_chan_mode gsm48_chan_mode_to_vamos (enum gsm48_chan_mode mode)
 Translate GSM48_CMODE_SPEECH_* to its corresponding GSM48_CMODE_SPEECH_*_VAMOS mode. More...
 
enum gsm48_chan_mode gsm48_chan_mode_to_non_vamos (enum gsm48_chan_mode mode)
 Translate GSM48_CMODE_SPEECH_*_VAMOS to its corresponding GSM48_CMODE_SPEECH_* non-vamos mode. More...
 
const char * gsm48_mi_type_name (uint8_t mi)
 return string representation of Mobile Identity Type More...
 
char * osmo_mi_name_buf (char *buf, size_t buf_len, const uint8_t *mi, uint8_t mi_len)
 Deprecated, see osmo_mobile_identity instead. More...
 
const char * osmo_mi_name (const uint8_t *mi, uint8_t mi_len)
 Deprecated, see osmo_mobile_identity instead. More...
 
char * osmo_mi_name_c (const void *ctx, const uint8_t *mi, uint8_t mi_len)
 Deprecated, see osmo_mobile_identity instead. More...
 
int osmo_mobile_identity_decode (struct osmo_mobile_identity *mi, const uint8_t *mi_data, uint8_t mi_len, bool allow_hex)
 Extract Mobile Identity from encoded bytes (3GPP TS 24.008 10.5.1.4). More...
 
int osmo_mobile_identity_encoded_len (const struct osmo_mobile_identity *mi, int *mi_digits)
 Return the number of encoded Mobile Identity octets, without actually encoding. More...
 
int osmo_mobile_identity_encode_buf (uint8_t *buf, size_t buflen, const struct osmo_mobile_identity *mi, bool allow_hex)
 Encode Mobile Identity from uint32_t (TMSI) or digits string (all others) (3GPP TS 24.008 10.5.1.4). More...
 
int osmo_mobile_identity_encode_msgb (struct msgb *msg, const struct osmo_mobile_identity *mi, bool allow_hex)
 Encode Mobile Identity type and BCD digits, appended to a msgb. More...
 
int osmo_mobile_identity_decode_from_l3_buf (struct osmo_mobile_identity *mi, const uint8_t *l3_data, size_t l3_len, bool allow_hex)
 Extract Mobile Identity from a Complete Layer 3 message. More...
 
int osmo_mobile_identity_decode_from_l3 (struct osmo_mobile_identity *mi, struct msgb *msg, bool allow_hex)
 Extract Mobile Identity from a Complete Layer 3 message. More...
 
int osmo_mobile_identity_to_str_buf (char *buf, size_t buflen, const struct osmo_mobile_identity *mi)
 Return a human readable representation of a struct osmo_mobile_identity. More...
 
char * osmo_mobile_identity_to_str_c (void *ctx, const struct osmo_mobile_identity *mi)
 Like osmo_mobile_identity_to_str_buf(), but return the string in a talloc buffer. More...
 
int osmo_mobile_identity_cmp (const struct osmo_mobile_identity *a, const struct osmo_mobile_identity *b)
 Compare two osmo_mobile_identity structs, returning typical cmp() result. More...
 
bool gsm48_hdr_gmm_cipherable (const struct gsm48_hdr *hdr)
 Checks is particular message is cipherable in A/Gb mode according to 3GPP TS 24.008 § 4.7.1.2. More...
 
void gsm48_mcc_mnc_to_bcd (uint8_t *bcd_dst, uint16_t mcc, uint16_t mnc)
 
void gsm48_mcc_mnc_from_bcd (uint8_t *bcd_src, uint16_t *mcc, uint16_t *mnc)
 
void gsm48_generate_lai (struct gsm48_loc_area_id *lai48, uint16_t mcc, uint16_t mnc, uint16_t lac)
 Encode TS 04.08 Location Area Identifier, legacy implementation. More...
 
void gsm48_generate_lai2 (struct gsm48_loc_area_id *lai48, const struct osmo_location_area_id *lai)
 Encode TS 04.08 Location Area Identifier. More...
 
int gsm48_decode_lai (struct gsm48_loc_area_id *lai, uint16_t *mcc, uint16_t *mnc, uint16_t *lac)
 Decode TS 04.08 Location Area Identifier, legacy implementation. More...
 
void gsm48_decode_lai2 (const struct gsm48_loc_area_id *lai, struct osmo_location_area_id *decoded)
 Decode TS 04.08 Location Area Identifier. More...
 
void gsm48_set_dtx (struct gsm48_cell_options *op, enum gsm48_dtx_mode full, enum gsm48_dtx_mode half, bool is_bcch)
 Set DTX mode in Cell Options IE (3GPP TS 44.018) More...
 
int gsm48_generate_mid_from_tmsi (uint8_t *buf, uint32_t tmsi)
 Deprecated, see osmo_mobile_identity instead. More...
 
uint8_t gsm48_generate_mid (uint8_t *buf, const char *id, uint8_t mi_type)
 Deprecated, see osmo_mobile_identity instead. More...
 
int gsm48_generate_mid_from_imsi (uint8_t *buf, const char *imsi)
 Deprecated, see osmo_mobile_identity instead. More...
 
int gsm48_mi_to_string (char *string, int str_len, const uint8_t *mi, int mi_len)
 Deprecated, see osmo_mobile_identity instead. More...
 
int osmo_routing_area_id_decode (struct osmo_routing_area_id *dst, const uint8_t *ra_data, size_t ra_data_len)
 Decode to struct osmo_routing_area_id from a 3GPP TS 24.008 § 10.5.5.15 Routing area identification. More...
 
int osmo_routing_area_id_encode_buf (uint8_t *buf, size_t buflen, const struct osmo_routing_area_id *src)
 Encode struct osmo_routing_area_id to a 3GPP TS 24.008 § 10.5.5.15 Routing area identification: write to a buffer. More...
 
int osmo_routing_area_id_encode_msgb (struct msgb *msg, const struct osmo_routing_area_id *src)
 Encode struct osmo_routing_area_id to a 3GPP TS 24.008 § 10.5.5.15 Routing area identification: append to msgb. More...
 
void gsm48_parse_ra (struct gprs_ra_id *raid, const uint8_t *buf)
 Parse TS 04.08 Routing Area Identifier. More...
 
void gsm48_encode_ra (struct gsm48_ra_id *out, const struct gprs_ra_id *raid)
 Encode a 3GPP TS 24.008 § 10.5.5.15 Routing area identification. More...
 
int gsm48_construct_ra (uint8_t *buf, const struct gprs_ra_id *raid)
 Encode a TS 04.08 Routing Area Identifier. More...
 
bool gsm48_ra_equal (const struct gprs_ra_id *raid1, const struct gprs_ra_id *raid2)
 Compare a TS 04.08 Routing Area Identifier. More...
 
int gsm48_number_of_paging_subchannels (const struct gsm48_control_channel_descr *chan_desc)
 Determine number of paging sub-channels. More...
 
char * gsm48_pdisc_msgtype_name_buf (char *buf, size_t buf_len, uint8_t pdisc, uint8_t msg_type)
 Compose a string naming the message type for given protocol, in a caller-provided buffer. More...
 
const char * gsm48_pdisc_msgtype_name (uint8_t pdisc, uint8_t msg_type)
 Compose a string naming the message type for given protocol, in a static buffer. More...
 
char * gsm48_pdisc_msgtype_name_c (const void *ctx, uint8_t pdisc, uint8_t msg_type)
 Compose a string naming the message type for given protocol, in a dynamically-allocated buffer. More...
 
struct gsm48_hdrgsm48_push_l3hdr (struct msgb *msg, uint8_t pdisc, uint8_t msg_type)
 Wrap a given msg with gsm48_hdr structure. More...
 
bool osmo_gsm48_classmark1_is_r99 (const struct gsm48_classmark1 *cm1)
 
bool osmo_gsm48_classmark2_is_r99 (const struct gsm48_classmark2 *cm2, uint8_t cm2_len)
 
bool osmo_gsm48_classmark_is_r99 (const struct osmo_gsm48_classmark *cm)
 Return true if any of Classmark 1 or Classmark 2 are present and indicate R99 capability. More...
 
char * osmo_gsm48_classmark_a5_name_buf (char *buf, size_t buf_len, const struct osmo_gsm48_classmark *cm)
 Return a string representation of A5 cipher algorithms indicated by Classmark 1, 2 and 3. More...
 
const char * osmo_gsm48_classmark_a5_name (const struct osmo_gsm48_classmark *cm)
 Return a string representation of A5 cipher algorithms indicated by Classmark 1, 2 and 3. More...
 
char * osmo_gsm48_classmark_a5_name_c (const void *ctx, const struct osmo_gsm48_classmark *cm)
 Return a string representation of A5 cipher algorithms indicated by Classmark 1, 2 and 3. More...
 
void osmo_gsm48_classmark_update (struct osmo_gsm48_classmark *dst, const struct osmo_gsm48_classmark *src)
 Overwrite dst with the Classmark information present in src. More...
 
int osmo_gsm48_classmark_supports_a5 (const struct osmo_gsm48_classmark *cm, uint8_t a5)
 Determine if the given Classmark (1/2/3) value permits a given A5/n cipher. More...
 
int8_t osmo_gsm48_rfpowercap2powerclass (enum gsm_band band, uint8_t rf_power_cap)
 Decode power class from Classmark1/2 RF power capability field. More...
 
int gsm48_decode_bcd_number (char *output, int output_len, const uint8_t *bcd_lv, int h_len)
 Like gsm48_decode_bcd_number2() but with less airtight bounds checking. More...
 
int gsm48_decode_bcd_number2 (char *output, size_t output_len, const uint8_t *bcd_lv, size_t input_len, size_t h_len)
 Decode a 'called/calling/connect party BCD number' as in 10.5.4.7. More...
 
static int asc_to_bcd (const char asc)
 convert a single ASCII character to call-control BCD More...
 
int gsm48_encode_bcd_number (uint8_t *bcd_lv, uint8_t max_len, int h_len, const char *input)
 convert a ASCII phone number to 'called/calling/connect party BCD number' More...
 
int gsm48_decode_bearer_cap (struct gsm_mncc_bearer_cap *bcap, const uint8_t *lv)
 Decode TS 04.08 Bearer Capability IE (10.5.4.5) More...
 
int gsm48_encode_bearer_cap (struct msgb *msg, int lv_only, const struct gsm_mncc_bearer_cap *bcap)
 Encode TS 04.08 Bearer Capability IE (10.5.4.5) More...
 
int gsm48_decode_cccap (struct gsm_mncc_cccap *ccap, const uint8_t *lv)
 Decode TS 04.08 Call Control Capabilities IE (10.5.4.5a) More...
 
int gsm48_encode_cccap (struct msgb *msg, const struct gsm_mncc_cccap *ccap)
 Encodoe TS 04.08 Call Control Capabilities (10.5.4.5a) More...
 
int gsm48_decode_called (struct gsm_mncc_number *called, const uint8_t *lv)
 Decode TS 04.08 Called Party BCD Number IE (10.5.4.7) More...
 
int gsm48_encode_called (struct msgb *msg, const struct gsm_mncc_number *called)
 Encode TS 04.08 Called Party IE (10.5.4.7) More...
 
int gsm48_decode_callerid (struct gsm_mncc_number *callerid, const uint8_t *lv)
 Decode TS 04.08 Caller ID. More...
 
int gsm48_encode_callerid (struct msgb *msg, int ie, int max_len, const struct gsm_mncc_number *callerid)
 Encode TS 04.08 Caller ID IE. More...
 
int gsm48_decode_cause (struct gsm_mncc_cause *cause, const uint8_t *lv)
 Decode TS 04.08 Cause IE (10.5.4.11) More...
 
int gsm48_encode_cause (struct msgb *msg, int lv_only, const struct gsm_mncc_cause *cause)
 Encode TS 04.08 Cause IE (10.5.4.11) More...
 
int gsm48_decode_calling (struct gsm_mncc_number *calling, const uint8_t *lv)
 Decode TS 04.08 Calling Number IE (10.5.4.9) More...
 
int gsm48_encode_calling (struct msgb *msg, const struct gsm_mncc_number *calling)
 Encode TS 04.08 Calling Number IE (10.5.4.9) More...
 
int gsm48_decode_connected (struct gsm_mncc_number *connected, const uint8_t *lv)
 Decode TS 04.08 Connected Number IE (10.5.4.13) More...
 
int gsm48_encode_connected (struct msgb *msg, const struct gsm_mncc_number *connected)
 Encode TS 04.08 Connected Number IE (10.5.4.13) More...
 
int gsm48_decode_redirecting (struct gsm_mncc_number *redirecting, const uint8_t *lv)
 Decode TS 04.08 Redirecting Number IE (10.5.4.21b) More...
 
int gsm48_encode_redirecting (struct msgb *msg, const struct gsm_mncc_number *redirecting)
 Encode TS 04.08 Redirecting Number IE (10.5.4.21b) More...
 
int gsm48_decode_facility (struct gsm_mncc_facility *facility, const uint8_t *lv)
 Decode TS 04.08 Facility IE (10.5.4.15) More...
 
int gsm48_encode_facility (struct msgb *msg, int lv_only, const struct gsm_mncc_facility *facility)
 Encode TS 04.08 Facility IE (10.5.4.15) More...
 
int gsm48_decode_notify (int *notify, const uint8_t *v)
 Decode TS 04.08 Notify IE (10.5.4.20) More...
 
int gsm48_encode_notify (struct msgb *msg, int notify)
 Encode TS 04.08 Notify IE (10.5.4.20) More...
 
int gsm48_decode_signal (int *signal, const uint8_t *v)
 Decode TS 04.08 Signal IE (10.5.4.23) More...
 
int gsm48_encode_signal (struct msgb *msg, int signal)
 Encode TS 04.08 Signal IE (10.5.4.23) More...
 
int gsm48_decode_keypad (int *keypad, const uint8_t *lv)
 Decode TS 04.08 Keypad IE (10.5.4.17) More...
 
int gsm48_encode_keypad (struct msgb *msg, int keypad)
 Encode TS 04.08 Keypad IE (10.5.4.17) More...
 
int gsm48_decode_progress (struct gsm_mncc_progress *progress, const uint8_t *lv)
 Decode TS 04.08 Progress IE (10.5.4.21) More...
 
int gsm48_encode_progress (struct msgb *msg, int lv_only, const struct gsm_mncc_progress *p)
 Encode TS 04.08 Progress IE (10.5.4.21) More...
 
int gsm48_decode_useruser (struct gsm_mncc_useruser *uu, const uint8_t *lv)
 Decode TS 04.08 User-User IE (10.5.4.25) More...
 
int gsm48_encode_useruser (struct msgb *msg, int lv_only, const struct gsm_mncc_useruser *uu)
 Encode TS 04.08 User-User IE (10.5.4.25) More...
 
int gsm48_decode_ssversion (struct gsm_mncc_ssversion *ssv, const uint8_t *lv)
 Decode TS 04.08 SS Version IE (10.5.4.24) More...
 
int gsm48_encode_ssversion (struct msgb *msg, const struct gsm_mncc_ssversion *ssv)
 Encode TS 04.08 SS Version IE (10.5.4.24) More...
 
int gsm48_encode_more (struct msgb *msg)
 Encode TS 04.08 More Data IE (10.5.4.19) More...
 
static int32_t smod (int32_t n, int32_t m)
 
int gsm48_decode_freq_list (struct gsm_sysinfo_freq *f, const uint8_t *cd, uint8_t len, uint8_t mask, uint8_t frqt)
 Decode TS 04.08 Cell Channel Description IE (10.5.2.1b) and other frequency lists. More...
 
int gsm48_decode_classmark3 (struct gsm48_classmark3 *classmark3_out, const uint8_t *classmark3, size_t classmark3_len)
 Decode 3GPP TS 24.008 Mobile Station Classmark 3 (10.5.1.7). More...
 
bool gprs_ms_net_cap_gea_supported (const uint8_t *ms_net_cap, uint8_t cap_len, enum gprs_ciph_algo gea)
 Check if MS supports particular version of GEA by inspecting MS network capability IE specified in 3GPP TS 24.008. More...
 

Variables

const struct tlv_definition gsm48_att_tlvdef
 TLV parser definitions for TS 04.08 CC. More...
 
const struct tlv_definition gsm48_rr_att_tlvdef
 TLV parser definitions for TS 04.08 RR. More...
 
const struct tlv_definition gsm48_mm_att_tlvdef
 TLV parser definitions for TS 04.08 MM. More...
 
static const struct value_string rr_cause_names []
 
static const char * cc_state_names [32]
 
static const struct value_string cc_msg_names []
 
static const struct value_string rr_msg_names []
 
static const struct value_string rr_msg_type_short_names []
 
const struct value_string gsm48_chan_mode_names []
 
const struct value_string gsm_chan_t_names []
 
static const struct value_string mi_type_names []
 
const struct value_string gsm48_pdisc_names []
 TS 04.08 Protocol Descriptor names. More...
 
const struct value_string gsm48_rr_msgtype_names []
 TS 04.08 RR Message Type names. More...
 
const struct value_string gsm48_mm_msgtype_names []
 TS 04.08 MM Message Type names. More...
 
const struct value_string gsm48_cc_msgtype_names []
 TS 04.08 CC Message Type names. More...
 
const struct value_string gsm48_cc_cause_names []
 TS 04.08 10.5..4.11 Call Control Cause Values. More...
 
const struct value_string gsm48_nc_ss_msgtype_names []
 TS 04.80, section 3.4 Messages for supplementary services control. More...
 
const struct value_string gsm48_reject_value_names []
 
const struct value_string osmo_lu_type_names []
 
const struct value_string osmo_cm_service_type_names []
 
static const char bcd_num_digits []
 
const struct value_string gsm48_gmm_cause_names_ []
 10.5.5.14 GPRS MM Cause / Table 10.5.147 More...
 
const struct value_stringgsm48_gmm_cause_names = gsm48_gmm_cause_names_
 
const struct value_string gsm48_gsm_cause_names_ []
 10.5.6.6 SM Cause / Table 10.5.157 More...
 
const struct value_stringgsm48_gsm_cause_names = gsm48_gsm_cause_names_
 
const struct value_string gprs_msgt_gmm_names []
 String names of GMM message types. More...
 
const struct value_string gprs_att_t_strs_ []
 String names of GPRS Attach types according to 10.5.5.2. More...
 
const struct value_stringgprs_att_t_strs = gprs_att_t_strs_
 
const struct value_string gprs_upd_t_strs_ []
 String names of GPRS Location Update Types. More...
 
const struct value_stringgprs_upd_t_strs = gprs_upd_t_strs_
 
const struct value_string gprs_det_t_mo_strs_ []
 String names of GMM MO Detach Types according to 10.5.5.5. More...
 
const struct value_stringgprs_det_t_mo_strs = gprs_det_t_mo_strs_
 
const struct value_string gprs_det_t_mt_strs_ []
 String names of GMM MT Detach Types according to 10.5.5.5. More...
 
const struct value_stringgprs_det_t_mt_strs = gprs_det_t_mt_strs_
 
const struct value_string gprs_service_t_strs_ []
 String names of GMM Service Types. More...
 
const struct value_stringgprs_service_t_strs = gprs_service_t_strs_
 

Detailed Description

GSM Mobile Radion Interface L3 messages / TS 04.08.

Function Documentation

◆ asc_to_bcd()

static int asc_to_bcd ( const char  asc)
static

convert a single ASCII character to call-control BCD

References ARRAY_SIZE, and bcd_num_digits.

Referenced by gsm48_encode_bcd_number().

◆ gprs_ms_net_cap_gea_supported()

bool gprs_ms_net_cap_gea_supported ( const uint8_t *  ms_net_cap,
uint8_t  cap_len,
enum gprs_ciph_algo  gea 
)

Check if MS supports particular version of GEA by inspecting MS network capability IE specified in 3GPP TS 24.008.

Parameters
[in]ms_net_capBuffer with raw MS network capability IE value, 3 - 10 bytes
[in]cap_lenLength of ms_net_cap, in bytes
[in]geaVersion of GEA to check
Returns
true if given version is supported by MS, false otherwise

References GPRS_ALGO_GEA0, GPRS_ALGO_GEA1, GPRS_ALGO_GEA2, GPRS_ALGO_GEA3, and GPRS_ALGO_GEA4.

◆ gsm48_cc_msg_name()

const char * gsm48_cc_msg_name ( uint8_t  msgtype)

return string representation of CC Message Type

References cc_msg_names, and get_value_string().

◆ gsm48_cc_state_name()

const char * gsm48_cc_state_name ( uint8_t  state)

return string representation of CC State

References ARRAY_SIZE, and cc_state_names.

◆ gsm48_chan_mode_to_non_vamos()

enum gsm48_chan_mode gsm48_chan_mode_to_non_vamos ( enum gsm48_chan_mode  mode)

Translate GSM48_CMODE_SPEECH_*_VAMOS to its corresponding GSM48_CMODE_SPEECH_* non-vamos mode.

If the mode is not a VAMOS mode, return the unchanged mode.

References GSM48_CMODE_SPEECH_AMR, GSM48_CMODE_SPEECH_EFR, GSM48_CMODE_SPEECH_V1, GSM48_CMODE_SPEECH_V1_VAMOS, GSM48_CMODE_SPEECH_V2_VAMOS, GSM48_CMODE_SPEECH_V3_VAMOS, GSM48_CMODE_SPEECH_V5, GSM48_CMODE_SPEECH_V5_VAMOS, and mode.

◆ gsm48_chan_mode_to_vamos()

enum gsm48_chan_mode gsm48_chan_mode_to_vamos ( enum gsm48_chan_mode  mode)

Translate GSM48_CMODE_SPEECH_* to its corresponding GSM48_CMODE_SPEECH_*_VAMOS mode.

If the mode has no equivalent VAMOS mode, return a negative value.

References GSM48_CMODE_SPEECH_AMR, GSM48_CMODE_SPEECH_EFR, GSM48_CMODE_SPEECH_V1, GSM48_CMODE_SPEECH_V1_VAMOS, GSM48_CMODE_SPEECH_V2_VAMOS, GSM48_CMODE_SPEECH_V3_VAMOS, GSM48_CMODE_SPEECH_V5_VAMOS, and mode.

◆ gsm48_construct_ra()

int gsm48_construct_ra ( uint8_t *  buf,
const struct gprs_ra_id raid 
)

Encode a TS 04.08 Routing Area Identifier.

Parameters
[out]bufCaller-provided output buffer of 6 bytes
[in]raidRouting Area ID to be encoded
Returns
number of bytes used in buf

References gsm48_encode_ra().

◆ gsm48_decode_bcd_number()

int gsm48_decode_bcd_number ( char *  output,
int  output_len,
const uint8_t *  bcd_lv,
int  h_len 
)

Like gsm48_decode_bcd_number2() but with less airtight bounds checking.

Parameters
[out]outputCaller-provided output buffer
[in]output_lensizeof(output)
[in]bcd_lvLength-Value portion of to-be-decoded IE
[in]h_lenLength of an optional heder between L and V portion
Returns
0 in case of success; negative on error

References gsm48_decode_bcd_number2().

Referenced by gsm0808_dec_msisdn(), gsm48_decode_called(), and gsm48_decode_callerid().

◆ gsm48_decode_bcd_number2()

int gsm48_decode_bcd_number2 ( char *  output,
size_t  output_len,
const uint8_t *  bcd_lv,
size_t  input_len,
size_t  h_len 
)

Decode a 'called/calling/connect party BCD number' as in 10.5.4.7.

Parameters
[out]outputCaller-provided output buffer.
[in]output_lensizeof(output).
[in]bcd_lvLength-Value part of to-be-decoded IE.
[in]input_lenSize of the bcd_lv buffer for bounds checking.
[in]h_lenLength of an optional header between L and V parts.
Returns
0 in case of success, negative on error.

Errors checked:

  • no or too little input data (-EIO),
  • IE length exceeds input data size (-EINVAL),
  • no or too little output buffer size (-ENOSPC),
  • decoded number exceeds size of the output buffer (-ENOSPC).

The output is guaranteed to be nul terminated iff output_len > 0.

References bcd_num_digits.

Referenced by gsm48_decode_bcd_number(), and osmo_gsup_decode().

◆ gsm48_decode_bearer_cap()

◆ gsm48_decode_called()

int gsm48_decode_called ( struct gsm_mncc_number called,
const uint8_t *  lv 
)

Decode TS 04.08 Called Party BCD Number IE (10.5.4.7)

Parameters
[out]calledCaller-provided memory for decoded number
[in]lvLength-Value portion of IE
Returns
0 on success; negative on error

References gsm48_decode_bcd_number(), gsm_mncc_number::number, gsm_mncc_number::plan, and gsm_mncc_number::type.

◆ gsm48_decode_callerid()

int gsm48_decode_callerid ( struct gsm_mncc_number callerid,
const uint8_t *  lv 
)

Decode TS 04.08 Caller ID.

Parameters
[out]calleridCaller-provided memory for decoded number
[in]lvLength-Value portion of IE
Returns
0 on success; negative on error

References gsm48_decode_bcd_number(), gsm_mncc_number::number, gsm_mncc_number::plan, gsm_mncc_number::present, gsm_mncc_number::screen, and gsm_mncc_number::type.

Referenced by gsm48_decode_calling(), gsm48_decode_connected(), and gsm48_decode_redirecting().

◆ gsm48_decode_calling()

int gsm48_decode_calling ( struct gsm_mncc_number calling,
const uint8_t *  lv 
)

Decode TS 04.08 Calling Number IE (10.5.4.9)

References gsm48_decode_callerid().

◆ gsm48_decode_cause()

int gsm48_decode_cause ( struct gsm_mncc_cause cause,
const uint8_t *  lv 
)

Decode TS 04.08 Cause IE (10.5.4.11)

Parameters
[out]causeCaller-provided memory for output
[in]lvLV portion of Cause IE
Returns
0 on success; negative on error

References cause.

◆ gsm48_decode_cccap()

int gsm48_decode_cccap ( struct gsm_mncc_cccap ccap,
const uint8_t *  lv 
)

Decode TS 04.08 Call Control Capabilities IE (10.5.4.5a)

Parameters
[out]ccapCaller-provided memory for decoded CC capabilities
[in]lvLength-Value of IE
Returns
0 on success; negative on error

References gsm_mncc_cccap::dtmf, and gsm_mncc_cccap::pcp.

◆ gsm48_decode_classmark3()

int gsm48_decode_classmark3 ( struct gsm48_classmark3 classmark3_out,
const uint8_t *  classmark3,
size_t  classmark3_len 
)

Decode 3GPP TS 24.008 Mobile Station Classmark 3 (10.5.1.7).

Parameters
[out]classmark3_outuser provided memory to store decoded classmark3.
[in]classmark3pointer to memory that contains the raw classmark bits.
[in]classmark3_lenlength in bytes of the memory where classmark3 points to.
Returns
0 on success; negative on error.

References gsm48_classmark3::a5_bits, gsm48_classmark3::add_pos_cap, gsm48_classmark3::assoc_radio_cap, gsm48_classmark3::assoc_radio_cap_1, gsm48_classmark3::assoc_radio_cap_2, bitvec_get_uint(), gsm48_classmark3::cdma200_rat_cap, gsm48_classmark3::ciphering_mode_setting_cap, gsm48_classmark3::cs_ps_srvcc_geran_eutra, gsm48_classmark3::cs_ps_srvcc_geran_utra, bitvec::data, data, bitvec::data_len, gsm48_classmark3::dl_advanced_rx_perf, gsm48_classmark3::dtm_egprs_high_multislot_cap, gsm48_classmark3::dtm_egprs_multislot_cap, gsm48_classmark3::dtm_enhancements_cap, gsm48_classmark3::dtm_gprs_high_multislot_cap, gsm48_classmark3::dtm_gprs_multislot_cap, gsm48_classmark3::e_utra_fdd_supp, gsm48_classmark3::e_utra_meas_rep_supp, gsm48_classmark3::e_utra_mult_band_ind_supp, gsm48_classmark3::e_utra_tdd_supp, gsm48_classmark3::e_utra_wb_rsrq_meas_supp, gsm48_classmark3::ecsd_multislot_cap, gsm48_classmark3::er_band_support, gsm48_classmark3::extended_dtm_egprs_multislot_cap, gsm48_classmark3::extended_dtm_gprs_multislot_cap, gsm48_classmark3::extended_earfcn_val_range, gsm48_classmark3::extended_meas_cap, gsm48_classmark3::extended_tsc_set_cap_supp, gsm48_classmark3::geran_feature_package, gsm48_classmark3::geran_feature_package_2, gsm48_classmark3::geran_net_sharing, gsm48_classmark3::gmsk_multislot_power_prof, gsm48_classmark3::gsm_1900_assoc_radio_cap, gsm48_classmark3::gsm_400_bands_supp, gsm48_classmark3::gsm_710_assoc_radio_cap, gsm48_classmark3::gsm_750_assoc_radio_cap, gsm48_classmark3::gsm_850_assoc_radio_cap, gsm48_classmark3::high_multislot_cap, gsm48_classmark3::hscsd_mult_slot_cap, gsm48_classmark3::method, gsm48_classmark3::mod_cap, gsm48_classmark3::ms_meas_cap, gsm48_classmark3::ms_pos_method_cap, gsm48_classmark3::mslot_class, gsm48_classmark3::mult_band_supp, gsm48_classmark3::offset_required, gsm48_classmark3::present, gsm48_classmark3::prio_resel_supp, gsm48_classmark3::psk8_multislot_power_prof, gsm48_classmark3::psk8_struct, gsm48_classmark3::r_gsm_assoc_radio_cap, gsm48_classmark3::r_support, gsm48_classmark3::repeated_acch_capability, gsm48_classmark3::rf_pwr_cap_1, gsm48_classmark3::rf_pwr_cap_2, gsm48_classmark3::sel_ciph_dl_sacch, gsm48_classmark3::single_band_supp, gsm48_classmark3::single_slot_dtm, gsm48_classmark3::sm_value, gsm48_classmark3::sms_value, gsm48_classmark3::t_gsm_400_bands_supp, gsm48_classmark3::t_gsm_810_assoc_radio_cap, gsm48_classmark3::tighter_capability, gsm48_classmark3::ucs2_treatment, gsm48_classmark3::umts_1_28_mcps_tdd_rat_cap, gsm48_classmark3::umts_fdd_rat_cap, gsm48_classmark3::umts_tdd_rat_cap, gsm48_classmark3::utra_csg_cells_rep, gsm48_classmark3::utra_mult_band_ind_supp, gsm48_classmark3::value, and gsm48_classmark3::vamos_level.

◆ gsm48_decode_connected()

int gsm48_decode_connected ( struct gsm_mncc_number connected,
const uint8_t *  lv 
)

Decode TS 04.08 Connected Number IE (10.5.4.13)

References gsm48_decode_callerid().

◆ gsm48_decode_facility()

int gsm48_decode_facility ( struct gsm_mncc_facility facility,
const uint8_t *  lv 
)

Decode TS 04.08 Facility IE (10.5.4.15)

References gsm_mncc_facility::info, and gsm_mncc_facility::len.

◆ gsm48_decode_freq_list()

int gsm48_decode_freq_list ( struct gsm_sysinfo_freq f,
const uint8_t *  cd,
uint8_t  len,
uint8_t  mask,
uint8_t  frqt 
)

Decode TS 04.08 Cell Channel Description IE (10.5.2.1b) and other frequency lists.

Parameters
[out]fCaller-provided output memory, an array of 1024 elements
[in]cdCell Channel Description IE
[in]lenLength of cd in bytes
Returns
0 on success; negative on error

References if(), len, gsm_sysinfo_freq::mask, and smod().

◆ gsm48_decode_keypad()

int gsm48_decode_keypad ( int *  keypad,
const uint8_t *  lv 
)

Decode TS 04.08 Keypad IE (10.5.4.17)

◆ gsm48_decode_lai()

int gsm48_decode_lai ( struct gsm48_loc_area_id lai,
uint16_t *  mcc,
uint16_t *  mnc,
uint16_t *  lac 
)

Decode TS 04.08 Location Area Identifier, legacy implementation.

Instead use gsm48_decode_lai2(), which is capable of three-digit MNC with leading zeros.

Parameters
[in]LocationArea Identifier (encoded)
[out]mccMobile Country Code
[out]mncMobile Network Code
[out]lacLocation Area Code
Returns
0

Attention: this function returns true integers, not hex!

References gsm48_decode_lai2(), osmo_location_area_id::lac, lac, lai, osmo_plmn_id::mcc, osmo_plmn_id::mnc, and osmo_location_area_id::plmn.

◆ gsm48_decode_lai2()

void gsm48_decode_lai2 ( const struct gsm48_loc_area_id lai,
struct osmo_location_area_id decoded 
)

Decode TS 04.08 Location Area Identifier.

Parameters
[in]LocationArea Identifier (encoded).
[out]decodedTarget buffer to write decoded values of MCC-MNC-LAC.

Attention: this function returns true integers, not hex!

References gsm48_loc_area_id::digits, osmo_location_area_id::lac, gsm48_loc_area_id::lac, lai, osmo_ntohs, osmo_plmn_from_bcd(), and osmo_location_area_id::plmn.

Referenced by decode_lai(), gsm48_decode_lai(), and osmo_routing_area_id_decode().

◆ gsm48_decode_notify()

int gsm48_decode_notify ( int *  notify,
const uint8_t *  v 
)

Decode TS 04.08 Notify IE (10.5.4.20)

◆ gsm48_decode_progress()

int gsm48_decode_progress ( struct gsm_mncc_progress progress,
const uint8_t *  lv 
)

Decode TS 04.08 Progress IE (10.5.4.21)

References gsm_mncc_progress::coding, gsm_mncc_progress::descr, and gsm_mncc_progress::location.

◆ gsm48_decode_redirecting()

int gsm48_decode_redirecting ( struct gsm_mncc_number redirecting,
const uint8_t *  lv 
)

Decode TS 04.08 Redirecting Number IE (10.5.4.21b)

References gsm48_decode_callerid().

◆ gsm48_decode_signal()

int gsm48_decode_signal ( int *  signal,
const uint8_t *  v 
)

Decode TS 04.08 Signal IE (10.5.4.23)

◆ gsm48_decode_ssversion()

int gsm48_decode_ssversion ( struct gsm_mncc_ssversion ssv,
const uint8_t *  lv 
)

Decode TS 04.08 SS Version IE (10.5.4.24)

References gsm_mncc_ssversion::info, and gsm_mncc_ssversion::len.

◆ gsm48_decode_useruser()

int gsm48_decode_useruser ( struct gsm_mncc_useruser uu,
const uint8_t *  lv 
)

Decode TS 04.08 User-User IE (10.5.4.25)

References gsm_mncc_useruser::info, and gsm_mncc_useruser::proto.

◆ gsm48_encode_bcd_number()

int gsm48_encode_bcd_number ( uint8_t *  bcd_lv,
uint8_t  max_len,
int  h_len,
const char *  input 
)

convert a ASCII phone number to 'called/calling/connect party BCD number'

Parameters
[out]bcd_lvCaller-provided output buffer
[in]max_lenMaximum Length of bcd_lv
[in]h_lenLength of an optional heder between L and V portion
[in]inputphone number as 0-terminated ASCII
Returns
number of bytes used in bcd_lv; negative on error

Depending on a context (e.g. called or calling party BCD number), the optional header between L and V parts can contain TON (Type Of Number), NPI (Numbering Plan Indication), presentation or screening indicator. NOTE: it is up to the caller to initialize this header!

References asc_to_bcd().

Referenced by gsm0808_enc_msisdn(), gsm340_gen_oa(), gsm48_encode_called(), gsm48_encode_callerid(), and osmo_gsup_encode().

◆ gsm48_encode_bearer_cap()

◆ gsm48_encode_called()

int gsm48_encode_called ( struct msgb msg,
const struct gsm_mncc_number called 
)

Encode TS 04.08 Called Party IE (10.5.4.7)

Parameters
[out]msgMesage Buffer to which to append IE (as TLV)
[in]calledMNCC Number to encode/append
Returns
0 on success; negative on error

References gsm48_encode_bcd_number(), GSM48_IE_CALLED_BCD, msg, msgb_tlv_put(), gsm_mncc_number::number, gsm_mncc_number::plan, and gsm_mncc_number::type.

◆ gsm48_encode_callerid()

int gsm48_encode_callerid ( struct msgb msg,
int  ie,
int  max_len,
const struct gsm_mncc_number callerid 
)

Encode TS 04.08 Caller ID IE.

Parameters
[out]msgMesage Buffer to which to append IE (as TLV)
[in]ieIE Identifier (tag)
[in]max_lenmaximum generated output in bytes
[in]calleridMNCC Number to encode/append
Returns
0 on success; negative on error

References gsm48_encode_bcd_number(), msg, msgb_tlv_put(), gsm_mncc_number::number, gsm_mncc_number::plan, gsm_mncc_number::present, gsm_mncc_number::screen, and gsm_mncc_number::type.

Referenced by gsm48_encode_calling(), gsm48_encode_connected(), and gsm48_encode_redirecting().

◆ gsm48_encode_calling()

int gsm48_encode_calling ( struct msgb msg,
const struct gsm_mncc_number calling 
)

Encode TS 04.08 Calling Number IE (10.5.4.9)

References gsm48_encode_callerid(), GSM48_IE_CALLING_BCD, and msg.

◆ gsm48_encode_cause()

int gsm48_encode_cause ( struct msgb msg,
int  lv_only,
const struct gsm_mncc_cause cause 
)

Encode TS 04.08 Cause IE (10.5.4.11)

Parameters
[out]msgMessage Buffer to which to append IE
[in]lv_onlyEncode as LV (1) or TLV (0)
[in]causeCause value to be encoded
Returns
0 on success; negative on error

References cause, GSM48_IE_CAUSE, msg, msgb_lv_put(), and msgb_tlv_put().

◆ gsm48_encode_cccap()

int gsm48_encode_cccap ( struct msgb msg,
const struct gsm_mncc_cccap ccap 
)

Encodoe TS 04.08 Call Control Capabilities (10.5.4.5a)

Parameters
[out]msgMessage Buffer to which to append IE (as TLV)
[in]ccapDecoded CC Capabilities to be encoded
Returns
0 on success; negative on error

References gsm_mncc_cccap::dtmf, GSM48_IE_CC_CAP, msg, msgb_tlv_put(), and gsm_mncc_cccap::pcp.

◆ gsm48_encode_connected()

int gsm48_encode_connected ( struct msgb msg,
const struct gsm_mncc_number connected 
)

Encode TS 04.08 Connected Number IE (10.5.4.13)

References gsm48_encode_callerid(), GSM48_IE_CONN_BCD, and msg.

◆ gsm48_encode_facility()

int gsm48_encode_facility ( struct msgb msg,
int  lv_only,
const struct gsm_mncc_facility facility 
)

◆ gsm48_encode_keypad()

int gsm48_encode_keypad ( struct msgb msg,
int  keypad 
)

Encode TS 04.08 Keypad IE (10.5.4.17)

References GSM48_IE_KPD_FACILITY, msg, and msgb_tv_put().

◆ gsm48_encode_more()

int gsm48_encode_more ( struct msgb msg)

Encode TS 04.08 More Data IE (10.5.4.19)

References GSM48_IE_MORE_DATA, msg, and msgb_put().

◆ gsm48_encode_notify()

int gsm48_encode_notify ( struct msgb msg,
int  notify 
)

Encode TS 04.08 Notify IE (10.5.4.20)

References msg, and msgb_v_put().

◆ gsm48_encode_progress()

int gsm48_encode_progress ( struct msgb msg,
int  lv_only,
const struct gsm_mncc_progress p 
)

◆ gsm48_encode_ra()

void gsm48_encode_ra ( struct gsm48_ra_id out,
const struct gprs_ra_id raid 
)

Encode a 3GPP TS 24.008 § 10.5.5.15 Routing area identification.

Parameters
[out]outCaller-provided packed struct
[in]raidRouting Area ID to be encoded

References gsm48_ra_id::digits, gprs_ra_id::lac, gsm48_ra_id::lac, gprs_ra_id::mcc, gprs_ra_id::mnc, gprs_ra_id::mnc_3_digits, osmo_htons, gprs_ra_id::rac, and gsm48_ra_id::rac.

Referenced by gsm48_construct_ra().

◆ gsm48_encode_redirecting()

int gsm48_encode_redirecting ( struct msgb msg,
const struct gsm_mncc_number redirecting 
)

Encode TS 04.08 Redirecting Number IE (10.5.4.21b)

References gsm48_encode_callerid(), GSM48_IE_REDIR_BCD, and msg.

◆ gsm48_encode_signal()

int gsm48_encode_signal ( struct msgb msg,
int  signal 
)

Encode TS 04.08 Signal IE (10.5.4.23)

References GSM48_IE_SIGNAL, msg, and msgb_tv_put().

◆ gsm48_encode_ssversion()

int gsm48_encode_ssversion ( struct msgb msg,
const struct gsm_mncc_ssversion ssv 
)

Encode TS 04.08 SS Version IE (10.5.4.24)

References GSM48_IE_SS_VERS, GSM_MAX_SSVERSION, gsm_mncc_ssversion::info, gsm_mncc_ssversion::len, msg, and msgb_tlv_put().

◆ gsm48_encode_useruser()

int gsm48_encode_useruser ( struct msgb msg,
int  lv_only,
const struct gsm_mncc_useruser uu 
)

◆ gsm48_generate_lai()

void gsm48_generate_lai ( struct gsm48_loc_area_id lai48,
uint16_t  mcc,
uint16_t  mnc,
uint16_t  lac 
)

Encode TS 04.08 Location Area Identifier, legacy implementation.

Instead use gsm48_generate_lai2(), which is capable of three-digit MNC with leading zeros.

Parameters
[out]lai48caller-provided memory for output
[in]mccMobile Country Code
[in]mncMobile Network Code
[in]lacLocation Area Code

References gsm48_generate_lai2(), lac, gsm48_loc_area_id::lac, and lai.

◆ gsm48_generate_lai2()

void gsm48_generate_lai2 ( struct gsm48_loc_area_id lai48,
const struct osmo_location_area_id lai 
)

Encode TS 04.08 Location Area Identifier.

Parameters
[out]lai48caller-provided memory for output.
[in]laiinput of MCC-MNC-LAC.

References gsm48_loc_area_id::digits, gsm48_loc_area_id::lac, lai, osmo_htons, and osmo_plmn_to_bcd().

Referenced by gsm0808_create_layer3_2(), gsm0808_msgb_put_cell_id_u(), gsm48_generate_lai(), msgb_sgsap_lai_put(), and osmo_routing_area_id_encode_buf().

◆ gsm48_generate_mid()

uint8_t gsm48_generate_mid ( uint8_t *  buf,
const char *  id,
uint8_t  mi_type 
)

Deprecated, see osmo_mobile_identity instead.

Generate TS 24.008 §10.5.1.4 Mobile ID of BCD type from ASCII string

Parameters
[out]bufCaller-provided output buffer of at least GSM48_MID_MAX_SIZE bytes
[in]idIdentity to be encoded
[in]mi_typeType of identity (e.g. GSM_MI_TYPE_IMSI, IMEI, IMEISV)
Returns
number of bytes used in buf

References GSM48_IE_MOBILE_ID, GSM_MI_TYPE_MASK, length, OSMO_ASSERT, and osmo_char2bcd().

Referenced by gsm48_generate_mid_from_imsi().

◆ gsm48_generate_mid_from_imsi()

int gsm48_generate_mid_from_imsi ( uint8_t *  buf,
const char *  imsi 
)

Deprecated, see osmo_mobile_identity instead.

Generate TS 04.08 Mobile ID from IMSI

Parameters
[out]bufCaller-provided output buffer
[in]imsiIMSI to be encoded
Returns
number of bytes used in buf

References gsm48_generate_mid(), and GSM_MI_TYPE_IMSI.

Referenced by gsm0808_create_handover_request(), gsm0808_create_paging2(), and msgb_sgsap_imsi_put().

◆ gsm48_generate_mid_from_tmsi()

int gsm48_generate_mid_from_tmsi ( uint8_t *  buf,
uint32_t  tmsi 
)

Deprecated, see osmo_mobile_identity instead.

Generate TS 04.08 Mobile ID from TMSI

Parameters
[out]bufCaller-provided output buffer (7 bytes)
[in]tmsiTMSI to be encoded
Returns
number of byes encoded (always 7)

References GSM48_IE_MOBILE_ID, GSM48_TMSI_LEN, GSM_MI_TYPE_TMSI, and osmo_htonl.

◆ gsm48_hdr_gmm_cipherable()

bool gsm48_hdr_gmm_cipherable ( const struct gsm48_hdr hdr)

Checks is particular message is cipherable in A/Gb mode according to 3GPP TS 24.008 § 4.7.1.2.

Parameters
[in]hdrMessage header
Returns
true if message can be encrypted, false otherwise

References GSM48_MT_GMM_ATTACH_REJ, GSM48_MT_GMM_ATTACH_REQ, GSM48_MT_GMM_AUTH_CIPH_FAIL, GSM48_MT_GMM_AUTH_CIPH_REJ, GSM48_MT_GMM_AUTH_CIPH_REQ, GSM48_MT_GMM_AUTH_CIPH_RESP, GSM48_MT_GMM_ID_REQ, GSM48_MT_GMM_ID_RESP, GSM48_MT_GMM_RA_UPD_REJ, GSM48_MT_GMM_RA_UPD_REQ, hdr, and gsm48_hdr::msg_type.

◆ gsm48_mcc_mnc_from_bcd()

void gsm48_mcc_mnc_from_bcd ( uint8_t *  bcd_src,
uint16_t *  mcc,
uint16_t *  mnc 
)

◆ gsm48_mcc_mnc_to_bcd()

void gsm48_mcc_mnc_to_bcd ( uint8_t *  bcd_dst,
uint16_t  mcc,
uint16_t  mnc 
)

◆ gsm48_mi_to_string()

int gsm48_mi_to_string ( char *  string,
int  str_len,
const uint8_t *  mi,
int  mi_len 
)

Deprecated, see osmo_mobile_identity instead.

Convert TS 04.08 Mobile Identity (10.5.1.4) to string. This function does not validate the Mobile Identity digits, i.e. digits > 9 are returned as 'A'-'F'.

Parameters
[out]stringCaller-provided buffer for output
[in]str_lenLength of string in bytes
[in]miMobile Identity to be stringified
[in]mi_lenLength of mi in bytes
Returns
Return <= 0 on error, > 0 on success. WARNING: the return value of this function is not well implemented. Depending on the MI type and amount of output buffer, this may return the nr of written bytes, or the written strlen(), or the snprintf() style strlen()-if-the-buffer-were-large-enough.

References GSM48_TMSI_LEN, GSM_MI_ODD, GSM_MI_TYPE_IMEI, GSM_MI_TYPE_IMEISV, GSM_MI_TYPE_IMSI, GSM_MI_TYPE_MASK, GSM_MI_TYPE_NONE, GSM_MI_TYPE_TMSI, mi, mi_len, and osmo_bcd2str().

◆ gsm48_mi_type_name()

const char * gsm48_mi_type_name ( uint8_t  mi)

return string representation of Mobile Identity Type

References get_value_string(), mi, and mi_type_names.

Referenced by osmo_mi_name_buf(), and osmo_mobile_identity_to_str_buf().

◆ gsm48_number_of_paging_subchannels()

int gsm48_number_of_paging_subchannels ( const struct gsm48_control_channel_descr chan_desc)

Determine number of paging sub-channels.

Parameters
[in]chan_descControl Channel Description
Returns
number of paging sub-channels

Uses From Table 10.5.33 of GSM 04.08 to determine the number of paging sub-channels in the given control channel configuration

References chan_desc, gsm0502_get_n_pag_blocks(), OSMO_MAX, and RSL_BCCH_CCCH_CONF_1_C.

Referenced by gsm0502_calc_paging_group().

◆ gsm48_parse_ra()

void gsm48_parse_ra ( struct gprs_ra_id raid,
const uint8_t *  buf 
)

Parse TS 04.08 Routing Area Identifier.

Preferably use osmo_routing_area_id_decode() instead: struct osmo_routing_area_id is better integrated with other API like osmo_plmn_cmp().

Parameters
[out]Caller-providedmemory for decoded RA ID
[in]bufInput buffer pointing to RAI IE value

References gprs_ra_id::lac, gprs_ra_id::mcc, gprs_ra_id::mnc, gprs_ra_id::mnc_3_digits, and gprs_ra_id::rac.

◆ gsm48_pdisc_msgtype_name()

const char * gsm48_pdisc_msgtype_name ( uint8_t  pdisc,
uint8_t  msg_type 
)

Compose a string naming the message type for given protocol, in a static buffer.

If the message type string is known, return the message type name, otherwise return "<protocol discriminator name>:<message type in hex>".

Parameters
[in]pdiscprotocol discriminator like GSM48_PDISC_MM
[in]msg_typemessage type like GSM48_MT_MM_LOC_UPD_REQUEST
Returns
statically allocated string or string constant.

References gsm48_pdisc_msgtype_name_buf(), msg_type, and namebuf.

◆ gsm48_pdisc_msgtype_name_buf()

char * gsm48_pdisc_msgtype_name_buf ( char *  buf,
size_t  buf_len,
uint8_t  pdisc,
uint8_t  msg_type 
)

Compose a string naming the message type for given protocol, in a caller-provided buffer.

If the message type string is known, return the message type name, otherwise return "<protocol discriminator name>:<message type in hex>".

Parameters
[out]bufcaller-allcated output string buffer
[in]buf_lensize of buf in bytes
[in]pdiscprotocol discriminator like GSM48_PDISC_MM
[in]msg_typemessage type like GSM48_MT_MM_LOC_UPD_REQUEST
Returns
buf

References get_value_string(), gsm48_cc_msgtype_names, gsm48_mm_msgtype_names, gsm48_nc_ss_msgtype_names, GSM48_PDISC_BCAST_CC, GSM48_PDISC_CC, GSM48_PDISC_GROUP_CC, GSM48_PDISC_MM, gsm48_pdisc_name(), GSM48_PDISC_NC_SS, GSM48_PDISC_RR, gsm48_rr_msgtype_names, msg_type, and osmo_gsm44068_msg_type_names.

Referenced by gsm48_pdisc_msgtype_name(), and gsm48_pdisc_msgtype_name_c().

◆ gsm48_pdisc_msgtype_name_c()

char * gsm48_pdisc_msgtype_name_c ( const void *  ctx,
uint8_t  pdisc,
uint8_t  msg_type 
)

Compose a string naming the message type for given protocol, in a dynamically-allocated buffer.

If the message type string is known, return the message type name, otherwise return "<protocol discriminator name>:<message type in hex>".

Parameters
[in]ctxtalloc context from which to allocate output buffer
[in]pdiscprotocol discriminator like GSM48_PDISC_MM
[in]msg_typemessage type like GSM48_MT_MM_LOC_UPD_REQUEST
Returns
string representation in dynamically allocated output buffer.

References gsm48_pdisc_msgtype_name_buf(), msg_type, and namebuf.

◆ gsm48_push_l3hdr()

struct gsm48_hdr * gsm48_push_l3hdr ( struct msgb msg,
uint8_t  pdisc,
uint8_t  msg_type 
)

Wrap a given msg with gsm48_hdr structure.

Parameters
[out]msgA message to be wrapped
[in]pdiscGSM TS 04.07 protocol discriminator 1/2, sub-pdisc, trans_id or skip_ind 1/2, see section 11.2.3.1 for details
[in]msg_typeGSM TS 04.08 message type
Returns
pointer to pushed header within msg

References msg, msg_type, gsm48_hdr::msg_type, msgb_push(), and gsm48_hdr::proto_discr.

Referenced by gsm0480_create_ussd_notify(), and gsm0480_create_ussd_release_complete().

◆ gsm48_ra_equal()

bool gsm48_ra_equal ( const struct gprs_ra_id raid1,
const struct gprs_ra_id raid2 
)

Compare a TS 04.08 Routing Area Identifier.

Parameters
[in]raid1first Routing Area ID to compare.
[in]raid2second Routing Area ID to compare.
Returns
true if raid1 and raid2 match, false otherwise.

References gprs_ra_id::lac, gprs_ra_id::mcc, gprs_ra_id::mnc, gprs_ra_id::mnc_3_digits, and gprs_ra_id::rac.

◆ gsm48_rr_msg_name()

const char * gsm48_rr_msg_name ( uint8_t  msgtype)

return string representation of RR Message Type

References get_value_string(), and rr_msg_names.

◆ gsm48_rr_short_pd_msg_name()

const char * gsm48_rr_short_pd_msg_name ( uint8_t  msgtype)

return string representation of RR Message Type using the RR short protocol discriminator

References get_value_string(), and rr_msg_type_short_names.

◆ gsm48_set_dtx()

void gsm48_set_dtx ( struct gsm48_cell_options op,
enum gsm48_dtx_mode  full,
enum gsm48_dtx_mode  half,
bool  is_bcch 
)

Set DTX mode in Cell Options IE (3GPP TS 44.018)

Parameters
[in]opCell Options structure in which DTX parameters will be set
[in]fullMode for full-rate channels
[in]halfMode for half-rate channels
[in]is_bcchIndicates if we should use 10.5.2.3.1 instead of 10.5.2.3a.2

There is no space for separate DTX settings for Full and Half rate channels in BCCH - in this case full setting is used for both and half parameter is ignored.

References GSM48_DTX_MAY_BE_USED, GSM48_DTX_SHALL_BE_USED, and GSM48_DTX_SHALL_NOT_BE_USED.

◆ osmo_gsm48_classmark1_is_r99()

bool osmo_gsm48_classmark1_is_r99 ( const struct gsm48_classmark1 cm1)

◆ osmo_gsm48_classmark2_is_r99()

bool osmo_gsm48_classmark2_is_r99 ( const struct gsm48_classmark2 cm2,
uint8_t  cm2_len 
)

References cm2, and cm2_len.

Referenced by osmo_gsm48_classmark_is_r99().

◆ osmo_gsm48_classmark_a5_name()

const char * osmo_gsm48_classmark_a5_name ( const struct osmo_gsm48_classmark cm)

Return a string representation of A5 cipher algorithms indicated by Classmark 1, 2 and 3.

Parameters
[in]cmClassmarks.
Returns
A statically allocated string like "cm1{a5/1=supported} cm2{0x23= A5/2 A5/3} no-cm3"

References osmo_gsm48_classmark_a5_name_buf().

◆ osmo_gsm48_classmark_a5_name_buf()

char * osmo_gsm48_classmark_a5_name_buf ( char *  buf,
size_t  buf_len,
const struct osmo_gsm48_classmark cm 
)

Return a string representation of A5 cipher algorithms indicated by Classmark 1, 2 and 3.

Parameters
[in]cmClassmarks.
Returns
A statically allocated string like "cm1{a5/1=supported} cm2{0x23= A5/2 A5/3} no-cm3"

References osmo_gsm48_classmark::classmark1, osmo_gsm48_classmark::classmark1_set, osmo_gsm48_classmark::classmark2, osmo_gsm48_classmark::classmark2_len, osmo_gsm48_classmark::classmark3, osmo_gsm48_classmark::classmark3_len, and cm2.

Referenced by osmo_gsm48_classmark_a5_name(), and osmo_gsm48_classmark_a5_name_c().

◆ osmo_gsm48_classmark_a5_name_c()

char * osmo_gsm48_classmark_a5_name_c ( const void *  ctx,
const struct osmo_gsm48_classmark cm 
)

Return a string representation of A5 cipher algorithms indicated by Classmark 1, 2 and 3.

Parameters
[in]ctxtalloc context from which to allocate output buffer
[in]cmClassmarks.
Returns
string like "cm1{a5/1=supported} cm2{0x23= A5/2 A5/3} no-cm3" in dynamically-allocated output buffer.

References osmo_gsm48_classmark_a5_name_buf().

◆ osmo_gsm48_classmark_is_r99()

bool osmo_gsm48_classmark_is_r99 ( const struct osmo_gsm48_classmark cm)

Return true if any of Classmark 1 or Classmark 2 are present and indicate R99 capability.

Parameters
[in]cmClassmarks.
Returns
True if R99 or later, false if pre-R99 or no Classmarks are present.

References osmo_gsm48_classmark::classmark1, osmo_gsm48_classmark::classmark1_set, osmo_gsm48_classmark::classmark2, osmo_gsm48_classmark::classmark2_len, osmo_gsm48_classmark1_is_r99(), and osmo_gsm48_classmark2_is_r99().

◆ osmo_gsm48_classmark_supports_a5()

int osmo_gsm48_classmark_supports_a5 ( const struct osmo_gsm48_classmark cm,
uint8_t  a5 
)

Determine if the given Classmark (1/2/3) value permits a given A5/n cipher.

Parameters
[in]cmClassmarks.
[in]a5The N in A5/N for which to query whether support is indicated.
Returns
1 when the given A5/n is permitted, 0 when not (or a5 > 7), and negative if the respective MS Classmark is not known, where the negative number indicates the classmark type: -2 means Classmark 2 is not available. The idea is that when e.g. A5/3 is requested and the corresponding Classmark 3 is not available, that the caller can react by obtaining Classmark 3 and calling again once it is available.

References osmo_gsm48_classmark::classmark1, osmo_gsm48_classmark::classmark1_set, osmo_gsm48_classmark::classmark2, osmo_gsm48_classmark::classmark2_len, osmo_gsm48_classmark::classmark3, and osmo_gsm48_classmark::classmark3_len.

◆ osmo_gsm48_classmark_update()

void osmo_gsm48_classmark_update ( struct osmo_gsm48_classmark dst,
const struct osmo_gsm48_classmark src 
)

Overwrite dst with the Classmark information present in src.

Add an new Classmark and overwrite in dst what src has to offer, but where src has no Classmark information, leave dst unchanged. (For Classmark 2 and 3, dst will exactly match any non-zero Classmark length from src, hence may end up with a shorter Classmark after this call.)

Parameters
[out]dstThe target Classmark storage to be updated.
[in]srcThe new Classmark information to read from.

References osmo_gsm48_classmark::classmark1, osmo_gsm48_classmark::classmark1_set, osmo_gsm48_classmark::classmark2, osmo_gsm48_classmark::classmark2_len, osmo_gsm48_classmark::classmark3, osmo_gsm48_classmark::classmark3_len, and OSMO_MIN.

◆ osmo_gsm48_rfpowercap2powerclass()

int8_t osmo_gsm48_rfpowercap2powerclass ( enum gsm_band  band,
uint8_t  rf_power_cap 
)

Decode power class from Classmark1/2 RF power capability field.

Parameters
[in]rf_power_capThe RF power capability field (3 bits).
[in]bandthe band of the arfcn from where the classmark was received
Returns
the MS power class on success, negative on error.

References GSM_BAND_1800, and GSM_BAND_1900.

◆ osmo_mi_name()

const char * osmo_mi_name ( const uint8_t *  mi,
uint8_t  mi_len 
)

Deprecated, see osmo_mobile_identity instead.

Return a human readable representation of a Mobile Identity in static buffer.

Parameters
[in]miMobile Identity buffer containing 3GPP TS 04.08 style MI type and data.
[in]mi_lenLength of mi.
Returns
A string like "IMSI-1234567", "TMSI-0x1234ABCD" or "unknown", "TMSI-invalid"...

References GSM48_MI_SIZE, mi, mi_len, and osmo_mi_name_buf().

◆ osmo_mi_name_buf()

char * osmo_mi_name_buf ( char *  buf,
size_t  buf_len,
const uint8_t *  mi,
uint8_t  mi_len 
)

Deprecated, see osmo_mobile_identity instead.

Return a human readable representation of a Mobile Identity in caller-provided buffer.

Parameters
[out]bufcaller-provided output buffer
[in]buf_lensize of buf in bytes
[in]miMobile Identity buffer containing 3GPP TS 04.08 style MI type and data.
[in]mi_lenLength of mi.
Returns
buf

References GSM48_MI_SIZE, gsm48_mi_type_name(), GSM48_TMSI_LEN, GSM_MI_ODD, GSM_MI_TYPE_IMEI, GSM_MI_TYPE_IMEISV, GSM_MI_TYPE_IMSI, GSM_MI_TYPE_MASK, GSM_MI_TYPE_NONE, GSM_MI_TYPE_TMSI, mi, mi_len, and osmo_bcd2str().

Referenced by osmo_mi_name(), and osmo_mi_name_c().

◆ osmo_mi_name_c()

char * osmo_mi_name_c ( const void *  ctx,
const uint8_t *  mi,
uint8_t  mi_len 
)

Deprecated, see osmo_mobile_identity instead.

Return a human readable representation of a Mobile Identity in dynamically-allocated buffer.

Parameters
[in]ctxtalloc context from which to allocate output buffer
[in]miMobile Identity buffer containing 3GPP TS 04.08 style MI type and data.
[in]mi_lenLength of mi.
Returns
A string like "IMSI-1234567", "TMSI-0x1234ABCD" or "unknown", "TMSI-invalid" in a dynamically-allocated output buffer.

References GSM48_MI_SIZE, mi, mi_len, and osmo_mi_name_buf().

◆ osmo_mobile_identity_cmp()

int osmo_mobile_identity_cmp ( const struct osmo_mobile_identity *  a,
const struct osmo_mobile_identity *  b 
)

Compare two osmo_mobile_identity structs, returning typical cmp() result.

Parameters
[in]aLeft side osmo_mobile_identity.
[in]bRight side osmo_mobile_identity.
Returns
0 if both are equal, -1 if a < b, 1 if a > b.

References GSM_MI_TYPE_IMEI, GSM_MI_TYPE_IMEISV, GSM_MI_TYPE_IMSI, GSM_MI_TYPE_TMSI, and OSMO_CMP.

◆ osmo_mobile_identity_decode()

int osmo_mobile_identity_decode ( struct osmo_mobile_identity *  mi,
const uint8_t *  mi_data,
uint8_t  mi_len,
bool  allow_hex 
)

Extract Mobile Identity from encoded bytes (3GPP TS 24.008 10.5.1.4).

On failure (negative return value), mi->type == GSM_MI_TYPE_NONE, mi->string[] is all-zero and mi->tmsi == GSM_RESERVED_TMSI.

On success, mi->type reflects the decoded Mobile Identity type (GSM_MI_TYPE_IMSI, GSM_MI_TYPE_TMSI, GSM_MI_TYPE_IMEI or GSM_MI_TYPE_IMEISV).

On success, mi->string always contains a human readable representation of the Mobile Identity digits: IMSI, IMEI and IMEISV as digits like "12345678", and TMSI as "0x" and 8 hexadecimal digits like "0x1234abcd".

mi->tmsi contains the uint32_t TMSI value iff the extracted Mobile Identity was a TMSI, or GSM_RESERVED_TMSI otherwise.

Parameters
[out]miReturn buffer for decoded Mobile Identity.
[in]mi_dataThe encoded Mobile Identity octets.
[in]mi_lenNumber of octets in mi_data.
[in]allow_hexIf false, hexadecimal digits (>9) result in an error return value.
Returns
0 on success, negative on error: -EBADMSG = invalid length indication or invalid data, -EINVAL = unknown Mobile Identity type.

References GSM23003_IMEI_NUM_DIGITS, GSM23003_IMEI_NUM_DIGITS_NO_CHK, GSM23003_IMEISV_NUM_DIGITS, GSM23003_IMSI_MAX_DIGITS, GSM23003_TMSI_NUM_BYTES, GSM_MI_ODD, GSM_MI_TYPE_IMEI, GSM_MI_TYPE_IMEISV, GSM_MI_TYPE_IMSI, GSM_MI_TYPE_MASK, GSM_MI_TYPE_NONE, GSM_MI_TYPE_TMSI, GSM_RESERVED_TMSI, mi, mi_len, osmo_bcd2str(), and value_string::str.

Referenced by osmo_bssmap_le_ie_dec_imei(), osmo_bssmap_le_ie_dec_imsi(), and osmo_mobile_identity_decode_from_l3_buf().

◆ osmo_mobile_identity_decode_from_l3()

int osmo_mobile_identity_decode_from_l3 ( struct osmo_mobile_identity *  mi,
struct msgb msg,
bool  allow_hex 
)

Extract Mobile Identity from a Complete Layer 3 message.

Determine the Mobile Identity data and call osmo_mobile_identity_decode() to return a decoded struct osmo_mobile_identity.

Parameters
[out]miReturn buffer for decoded Mobile Identity.
[in]msgThe Complete Layer 3 message to extract from (LU, CM Service Req or Paging Resp).
Returns
0 on success, negative on error: return codes as defined in osmo_mobile_identity_decode(), or -ENOTSUP = not a Complete Layer 3 message,

References mi, msg, msgb_l3, msgb_l3len(), and osmo_mobile_identity_decode_from_l3_buf().

◆ osmo_mobile_identity_decode_from_l3_buf()

int osmo_mobile_identity_decode_from_l3_buf ( struct osmo_mobile_identity *  mi,
const uint8_t *  l3_data,
size_t  l3_len,
bool  allow_hex 
)

Extract Mobile Identity from a Complete Layer 3 message.

Determine the Mobile Identity data and call osmo_mobile_identity_decode() to return a decoded struct osmo_mobile_identity.

Parameters
[out]miReturn buffer for decoded Mobile Identity.
[in]l3_dataThe Complete Layer 3 message to extract from (LU, CM Service Req or Paging Resp).
[in]l3_lenLength of l3_data in bytes.
Returns
0 on success, negative on error: return codes as defined in osmo_mobile_identity_decode(), or -ENOTSUP = not a Complete Layer 3 message,

References cm2_len, gsm48_hdr::data, ENOTSUP, gsm48_hdr_msg_type, gsm48_hdr_pdisc(), GSM48_MT_MM_CM_REEST_REQ, GSM48_MT_MM_CM_SERV_REQ, GSM48_MT_MM_ID_RESP, GSM48_MT_MM_IMSI_DETACH_IND, GSM48_MT_MM_LOC_UPD_REQUEST, GSM48_MT_RR_PAG_RESP, GSM48_MT_RR_TALKER_IND, GSM48_PDISC_MM, GSM48_PDISC_RR, GSM_MI_TYPE_NONE, GSM_RESERVED_TMSI, if(), mi, gsm48_imsi_detach_ind::mi, mi_len, gsm48_imsi_detach_ind::mi_len, and osmo_mobile_identity_decode().

Referenced by osmo_mobile_identity_decode_from_l3().

◆ osmo_mobile_identity_encode_buf()

int osmo_mobile_identity_encode_buf ( uint8_t *  buf,
size_t  buflen,
const struct osmo_mobile_identity *  mi,
bool  allow_hex 
)

Encode Mobile Identity from uint32_t (TMSI) or digits string (all others) (3GPP TS 24.008 10.5.1.4).

Parameters
[out]bufReturn buffer for encoded Mobile Identity.
[in]buflensizeof(buf).
[in]miMobile identity to encode.
[in]allow_hexIf false, hexadecimal digits (>9) result in an error return value.
Returns
Amount of bytes written to buf, or negative on error.

References ENOTSUP, GSM_MI_ODD, GSM_MI_TYPE_IMEI, GSM_MI_TYPE_IMEISV, GSM_MI_TYPE_IMSI, GSM_MI_TYPE_MASK, GSM_MI_TYPE_TMSI, mi, osmo_mobile_identity_encoded_len(), and osmo_str2bcd().

Referenced by osmo_mobile_identity_encode_msgb().

◆ osmo_mobile_identity_encode_msgb()

int osmo_mobile_identity_encode_msgb ( struct msgb msg,
const struct osmo_mobile_identity *  mi,
bool  allow_hex 
)

Encode Mobile Identity type and BCD digits, appended to a msgb.

Example to add a GSM48_IE_MOBILE_ID IEI with tag and length to a msgb:

struct osmo_mobile_identity mi = { .type = GSM_MI_TYPE_IMSI }; OSMO_STRLCPY_ARRAY(mi.imsi, "1234567890123456"); uint8_t *l = msgb_tl_put(msg, GSM48_IE_MOBILE_ID); int rc = osmo_mobile_identity_encode_msgb(msg, &mi, false); if (rc < 0) goto error; *l = rc;

Example to add a BSSGP_IE_IMSI with tag and variable-size length, where the length needs to be known at the time of writing the IE tag-length header:

struct osmo_mobile_identity mi = { .type = GSM_MI_TYPE_IMSI, }; OSMO_STRLCPY_ARRAY(mi.imsi, pinfo->imsi); msgb_tvl_put(msg, BSSGP_IE_IMSI, osmo_mobile_identity_encoded_len(&mi, NULL)); if (osmo_mobile_identity_encode_msgb(msg, &mi, false) < 0) goto error;

References mi, msg, msgb_put(), msgb_tailroom(), and osmo_mobile_identity_encode_buf().

Referenced by gsm0808_create_common_id(), gsm0808_create_perform_location_request(), gsm0808_create_uplink_request(), and osmo_bssmap_le_enc_perform_loc_req().

◆ osmo_mobile_identity_encoded_len()

int osmo_mobile_identity_encoded_len ( const struct osmo_mobile_identity *  mi,
int *  mi_digits 
)

Return the number of encoded Mobile Identity octets, without actually encoding.

Useful to write tag-length header before encoding the MI.

Parameters
[in]miMobile Identity.
[out]mi_digitsIf not NULL, store the number of nibbles of used MI data (i.e. strlen(mi->string) or 8 for a TMSI).
Returns
octets that osmo_mobile_identity_encode_msgb() will write for this mi.

References ENOTSUP, GSM23003_IMEI_NUM_DIGITS, GSM23003_IMEI_NUM_DIGITS_NO_CHK, GSM23003_IMEISV_NUM_DIGITS, GSM23003_IMSI_MAX_DIGITS, GSM23003_IMSI_MIN_DIGITS, GSM23003_TMSI_NUM_BYTES, GSM_MI_TYPE_IMEI, GSM_MI_TYPE_IMEISV, GSM_MI_TYPE_IMSI, GSM_MI_TYPE_TMSI, and mi.

Referenced by osmo_mobile_identity_encode_buf().

◆ osmo_mobile_identity_to_str_buf()

int osmo_mobile_identity_to_str_buf ( char *  buf,
size_t  buflen,
const struct osmo_mobile_identity *  mi 
)

Return a human readable representation of a struct osmo_mobile_identity.

Write a string like "IMSI-1234567", "TMSI-0x1234ABCD" or "NONE", "NULL".

Parameters
[out]bufString buffer to write to.
[in]buflensizeof(buf).
[in]miDecoded Mobile Identity data.
Returns
the strlen() of the string written when buflen is sufficiently large, like snprintf().

References osmo_strbuf::buf, osmo_strbuf::chars_needed, gsm48_mi_type_name(), GSM_MI_TYPE_IMEI, GSM_MI_TYPE_IMEISV, GSM_MI_TYPE_IMSI, GSM_MI_TYPE_TMSI, mi, and OSMO_STRBUF_PRINTF.

Referenced by osmo_mobile_identity_to_str_c().

◆ osmo_mobile_identity_to_str_c()

char * osmo_mobile_identity_to_str_c ( void *  ctx,
const struct osmo_mobile_identity *  mi 
)

Like osmo_mobile_identity_to_str_buf(), but return the string in a talloc buffer.

Parameters
[in]ctxTalloc context to allocate from.
[in]miDecoded Mobile Identity data.
Returns
a string like "IMSI-1234567", "TMSI-0x1234ABCD" or "NONE", "NULL".

References mi, osmo_mobile_identity_to_str_buf(), and OSMO_NAME_C_IMPL.

◆ osmo_rai_name()

const char * osmo_rai_name ( const struct gprs_ra_id rai)

Return MCC-MNC-LAC-RAC as string, in a static buffer.

Parameters
[in]raiRAI to encode.
Returns
Static string buffer.

References osmo_rai_name_buf().

◆ osmo_rai_name_buf()

char * osmo_rai_name_buf ( char *  buf,
size_t  buf_len,
const struct gprs_ra_id rai 
)

Return MCC-MNC-LAC-RAC as string, in a caller-provided output buffer.

Parameters
[out]bufcaller-provided output buffer
[in]buf_lensize of buf in bytes
[in]raiRAI to encode.
Returns
buf

References gprs_ra_id::lac, gprs_ra_id::mcc, gprs_ra_id::mnc, gprs_ra_id::mnc_3_digits, osmo_mcc_name(), osmo_mnc_name(), and gprs_ra_id::rac.

Referenced by osmo_rai_name(), and osmo_rai_name_c().

◆ osmo_rai_name_c()

char * osmo_rai_name_c ( const void *  ctx,
const struct gprs_ra_id rai 
)

Return MCC-MNC-LAC-RAC as string, in dynamically-allocated output buffer.

Parameters
[in]ctxtalloc context from which to allocate output buffer
[in]raiRAI to encode.
Returns
string representation in dynamically-allocated output buffer.

References osmo_rai_name_buf().

◆ osmo_routing_area_id_decode()

int osmo_routing_area_id_decode ( struct osmo_routing_area_id dst,
const uint8_t *  ra_data,
size_t  ra_data_len 
)

Decode to struct osmo_routing_area_id from a 3GPP TS 24.008 § 10.5.5.15 Routing area identification.

Parameters
[out]dstStore the decoded result here.
[in]ra_dataThe start of a Routing Area ID in encoded form, to be decoded.
[in]ra_data_lenBuffer size available to read from at *ra_data.
Returns
the number of decoded bytes on success, or negative on error (if the input buffer is too small).

References gsm48_decode_lai2(), osmo_routing_area_id::lac, ra_id, and osmo_routing_area_id::rac.

◆ osmo_routing_area_id_encode_buf()

int osmo_routing_area_id_encode_buf ( uint8_t *  buf,
size_t  buflen,
const struct osmo_routing_area_id src 
)

Encode struct osmo_routing_area_id to a 3GPP TS 24.008 § 10.5.5.15 Routing area identification: write to a buffer.

Parameters
[out]bufReturn buffer for encoded Mobile Identity.
[in]buflensizeof(buf).
[in]srcRA to encode.
Returns
Amount of bytes written to buf, or negative on error.

References gsm48_generate_lai2(), osmo_routing_area_id::lac, ra_id, and osmo_routing_area_id::rac.

Referenced by osmo_routing_area_id_encode_msgb().

◆ osmo_routing_area_id_encode_msgb()

int osmo_routing_area_id_encode_msgb ( struct msgb msg,
const struct osmo_routing_area_id src 
)

Encode struct osmo_routing_area_id to a 3GPP TS 24.008 § 10.5.5.15 Routing area identification: append to msgb.

To succeed, the msgb must have tailroom >= sizeof(struct gsm48_ra_id).

Parameters
[out]msgAppend to this msgb.
[in]srcEncode this Routing Area ID.
Returns
Number of bytes appended to msgb, or negative on error.

References msg, msgb_put(), msgb_tailroom(), and osmo_routing_area_id_encode_buf().

◆ rr_cause_name()

const char * rr_cause_name ( uint8_t  cause)

return string representation of RR Cause value

References cause, get_value_string(), and rr_cause_names.

◆ smod()

static int32_t smod ( int32_t  n,
int32_t  m 
)
static

References n, and res.

Referenced by gsm48_decode_freq_list().

Variable Documentation

◆ bcd_num_digits

const char bcd_num_digits[]
static
Initial value:
= {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', '*', '#', 'a', 'b', 'c', '\0'
}

Referenced by asc_to_bcd(), and gsm48_decode_bcd_number2().

◆ cc_msg_names

const struct value_string cc_msg_names[]
static

Referenced by gsm48_cc_msg_name().

◆ cc_state_names

const char* cc_state_names[32]
static

Referenced by gsm48_cc_state_name().

◆ gprs_att_t_strs

const struct value_string* gprs_att_t_strs = gprs_att_t_strs_

◆ gprs_att_t_strs_

const struct value_string gprs_att_t_strs_[]
Initial value:
= {
{ GPRS_ATT_T_ATTACH, "GPRS attach" },
{ GPRS_ATT_T_ATT_WHILE_IMSI, "GPRS attach while IMSI attached" },
{ GPRS_ATT_T_COMBINED, "Combined GPRS/IMSI attach" },
{ 0, NULL }
}
#define GPRS_ATT_T_ATTACH
Definition: gsm_04_08_gprs.h:51
#define GPRS_ATT_T_COMBINED
Definition: gsm_04_08_gprs.h:53
#define GPRS_ATT_T_ATT_WHILE_IMSI
Definition: gsm_04_08_gprs.h:52

String names of GPRS Attach types according to 10.5.5.2.

◆ gprs_det_t_mo_strs

const struct value_string* gprs_det_t_mo_strs = gprs_det_t_mo_strs_

◆ gprs_det_t_mo_strs_

const struct value_string gprs_det_t_mo_strs_[]
Initial value:
= {
{ GPRS_DET_T_MO_GPRS, "GPRS detach" },
{ GPRS_DET_T_MO_IMSI, "IMSI detach" },
{ GPRS_DET_T_MO_COMBINED, "Combined GPRS/IMSI detach" },
{ 0, NULL }
}
#define GPRS_DET_T_MO_COMBINED
Definition: gsm_04_08_gprs.h:61
#define GPRS_DET_T_MO_IMSI
Definition: gsm_04_08_gprs.h:60
#define GPRS_DET_T_MO_GPRS
Definition: gsm_04_08_gprs.h:59

String names of GMM MO Detach Types according to 10.5.5.5.

◆ gprs_det_t_mt_strs

const struct value_string* gprs_det_t_mt_strs = gprs_det_t_mt_strs_

◆ gprs_det_t_mt_strs_

const struct value_string gprs_det_t_mt_strs_[]
Initial value:
= {
{ GPRS_DET_T_MT_REATT_REQ, "re-attach required" },
{ GPRS_DET_T_MT_REATT_NOTREQ, "re-attach not required" },
{ GPRS_DET_T_MT_IMSI, "IMSI detach (after VLR failure)" },
{ 0, NULL }
}
#define GPRS_DET_T_MT_IMSI
Definition: gsm_04_08_gprs.h:65
#define GPRS_DET_T_MT_REATT_REQ
Definition: gsm_04_08_gprs.h:63
#define GPRS_DET_T_MT_REATT_NOTREQ
Definition: gsm_04_08_gprs.h:64

String names of GMM MT Detach Types according to 10.5.5.5.

◆ gprs_msgt_gmm_names

const struct value_string gprs_msgt_gmm_names[]
Initial value:
= {
{ GSM48_MT_GMM_ATTACH_REQ, "ATTACH REQUEST" },
{ GSM48_MT_GMM_ATTACH_ACK, "ATTACH ACK" },
{ GSM48_MT_GMM_ATTACH_COMPL, "ATTACH COMPLETE" },
{ GSM48_MT_GMM_ATTACH_REJ, "ATTACH REJECT" },
{ GSM48_MT_GMM_DETACH_REQ, "DETACH REQUEST" },
{ GSM48_MT_GMM_DETACH_ACK, "DETACH ACK" },
{ GSM48_MT_GMM_RA_UPD_REQ, "RA UPDATE REQUEST" },
{ GSM48_MT_GMM_RA_UPD_ACK, "RA UPDATE ACK" },
{ GSM48_MT_GMM_RA_UPD_COMPL, "RA UPDATE COMPLETE" },
{ GSM48_MT_GMM_RA_UPD_REJ, "RA UPDATE REJECT" },
{ GSM48_MT_GMM_PTMSI_REALL_CMD, "PTMSI REALLOC CMD" },
{ GSM48_MT_GMM_PTMSI_REALL_COMPL, "PTMSI REALLOC COMPLETE" },
{ GSM48_MT_GMM_AUTH_CIPH_REQ, "AUTH & CIPHER REQUEST" },
{ GSM48_MT_GMM_AUTH_CIPH_RESP, "AUTH & CIPHER RESPONSE" },
{ GSM48_MT_GMM_AUTH_CIPH_REJ, "AUTH & CIPHER REJECT" },
{ GSM48_MT_GMM_AUTH_CIPH_FAIL, "AUTH & CIPHER FAILURE" },
{ GSM48_MT_GMM_ID_REQ, "IDENTITY REQUEST" },
{ GSM48_MT_GMM_ID_RESP, "IDENTITY RESPONSE" },
{ GSM48_MT_GMM_STATUS, "STATUS" },
{ GSM48_MT_GMM_INFO, "INFO" },
{ 0, NULL }
}
#define GSM48_MT_GMM_AUTH_CIPH_RESP
Definition: gsm_04_08_gprs.h:27
#define GSM48_MT_GMM_RA_UPD_COMPL
Definition: gsm_04_08_gprs.h:21
#define GSM48_MT_GMM_ID_REQ
Definition: gsm_04_08_gprs.h:30
#define GSM48_MT_GMM_RA_UPD_REQ
Definition: gsm_04_08_gprs.h:19
#define GSM48_MT_GMM_PTMSI_REALL_CMD
Definition: gsm_04_08_gprs.h:24
#define GSM48_MT_GMM_INFO
Definition: gsm_04_08_gprs.h:33
#define GSM48_MT_GMM_ATTACH_COMPL
Definition: gsm_04_08_gprs.h:14
#define GSM48_MT_GMM_AUTH_CIPH_FAIL
Definition: gsm_04_08_gprs.h:29
#define GSM48_MT_GMM_PTMSI_REALL_COMPL
Definition: gsm_04_08_gprs.h:25
#define GSM48_MT_GMM_ID_RESP
Definition: gsm_04_08_gprs.h:31
#define GSM48_MT_GMM_AUTH_CIPH_REJ
Definition: gsm_04_08_gprs.h:28
#define GSM48_MT_GMM_ATTACH_REQ
Definition: gsm_04_08_gprs.h:12
#define GSM48_MT_GMM_ATTACH_ACK
Definition: gsm_04_08_gprs.h:13
#define GSM48_MT_GMM_RA_UPD_ACK
Definition: gsm_04_08_gprs.h:20
#define GSM48_MT_GMM_STATUS
Definition: gsm_04_08_gprs.h:32
#define GSM48_MT_GMM_DETACH_REQ
Definition: gsm_04_08_gprs.h:16
#define GSM48_MT_GMM_RA_UPD_REJ
Definition: gsm_04_08_gprs.h:22
#define GSM48_MT_GMM_ATTACH_REJ
Definition: gsm_04_08_gprs.h:15
#define GSM48_MT_GMM_DETACH_ACK
Definition: gsm_04_08_gprs.h:17
#define GSM48_MT_GMM_AUTH_CIPH_REQ
Definition: gsm_04_08_gprs.h:26

String names of GMM message types.

◆ gprs_service_t_strs

const struct value_string* gprs_service_t_strs = gprs_service_t_strs_

◆ gprs_service_t_strs_

const struct value_string gprs_service_t_strs_[]
Initial value:
= {
{ GPRS_SERVICE_T_SIGNALLING, "signalling" },
{ GPRS_SERVICE_T_DATA, "data" },
{ GPRS_SERVICE_T_PAGING_RESP, "paging response" },
{ GPRS_SERVICE_T_MBMS_MC_SERV, "MBMS multicast service" },
{ GPRS_SERVICE_T_MBMS_BC_SERV, "MBMS broadcast service" },
{ 0, NULL }
}
@ GPRS_SERVICE_T_MBMS_MC_SERV
Definition: gsm_04_08_gprs.h:464
@ GPRS_SERVICE_T_SIGNALLING
Definition: gsm_04_08_gprs.h:461
@ GPRS_SERVICE_T_MBMS_BC_SERV
Definition: gsm_04_08_gprs.h:465
@ GPRS_SERVICE_T_PAGING_RESP
Definition: gsm_04_08_gprs.h:463
@ GPRS_SERVICE_T_DATA
Definition: gsm_04_08_gprs.h:462

String names of GMM Service Types.

◆ gprs_upd_t_strs

const struct value_string* gprs_upd_t_strs = gprs_upd_t_strs_

◆ gprs_upd_t_strs_

const struct value_string gprs_upd_t_strs_[]
Initial value:
= {
{ GPRS_UPD_T_RA, "RA updating" },
{ GPRS_UPD_T_RA_LA, "combined RA/LA updating" },
{ GPRS_UPD_T_RA_LA_IMSI_ATT, "combined RA/LA updating + IMSI attach" },
{ GPRS_UPD_T_PERIODIC, "periodic updating" },
{ 0, NULL }
}
#define GPRS_UPD_T_PERIODIC
Definition: gsm_04_08_gprs.h:74
#define GPRS_UPD_T_RA_LA
Definition: gsm_04_08_gprs.h:72
#define GPRS_UPD_T_RA_LA_IMSI_ATT
Definition: gsm_04_08_gprs.h:73
#define GPRS_UPD_T_RA
Definition: gsm_04_08_gprs.h:71

String names of GPRS Location Update Types.

◆ gsm48_att_tlvdef

const struct tlv_definition gsm48_att_tlvdef

TLV parser definitions for TS 04.08 CC.

◆ gsm48_cc_cause_names

const struct value_string gsm48_cc_cause_names[]

TS 04.08 10.5..4.11 Call Control Cause Values.

Referenced by gsm48_cc_cause_name().

◆ gsm48_cc_msgtype_names

const struct value_string gsm48_cc_msgtype_names[]

TS 04.08 CC Message Type names.

Referenced by gsm48_pdisc_msgtype_name_buf().

◆ gsm48_chan_mode_names

const struct value_string gsm48_chan_mode_names[]
Initial value:
= {
{ GSM48_CMODE_SIGN, "SIGNALLING" },
{ GSM48_CMODE_SPEECH_V1, "SPEECH_V1" },
{ GSM48_CMODE_SPEECH_EFR, "SPEECH_EFR" },
{ GSM48_CMODE_SPEECH_AMR, "SPEECH_AMR" },
{ GSM48_CMODE_SPEECH_V4, "SPEECH_V4" },
{ GSM48_CMODE_SPEECH_V5, "SPEECH_V5" },
{ GSM48_CMODE_SPEECH_V6, "SPEECH_V6" },
{ GSM48_CMODE_DATA_43k5_14k5, "DATA_43k5_14k5" },
{ GSM48_CMODE_DATA_29k0_14k5, "DATA_29k0_14k5" },
{ GSM48_CMODE_DATA_43k5_29k0, "DATA_43k5_29k0" },
{ GSM48_CMODE_DATA_14k5_43k5, "DATA_14k5_43k5" },
{ GSM48_CMODE_DATA_14k5_29k0, "DATA_14k5_29k0" },
{ GSM48_CMODE_DATA_29k0_43k5, "DATA_29k0_43k5" },
{ GSM48_CMODE_DATA_43k5, "DATA_43k5" },
{ GSM48_CMODE_DATA_32k0, "DATA_32k0" },
{ GSM48_CMODE_DATA_29k0, "DATA_29k0" },
{ GSM48_CMODE_DATA_14k5, "DATA_14k5" },
{ GSM48_CMODE_DATA_12k0, "DATA_12k0" },
{ GSM48_CMODE_DATA_6k0, "DATA_6k0" },
{ GSM48_CMODE_DATA_3k6, "DATA_3k6" },
{ GSM48_CMODE_SPEECH_V1_VAMOS, "SPEECH_V1_VAMOS" },
{ GSM48_CMODE_SPEECH_V2_VAMOS, "SPEECH_V2_VAMOS" },
{ GSM48_CMODE_SPEECH_V3_VAMOS, "SPEECH_V3_VAMOS" },
{ GSM48_CMODE_SPEECH_V5_VAMOS, "SPEECH_V5_VAMOS" },
{ 0, NULL },
}
@ GSM48_CMODE_DATA_6k0
CSD: 6.0 kbit/s radio interface rate, 4.8 kbit/s services (TCH/{F,H}4.8)
Definition: gsm_04_08.h:790
@ GSM48_CMODE_SPEECH_V3_VAMOS
Same as GSM48_CMODE_SPEECH_AMR, in VAMOS mode.
Definition: gsm_04_08.h:799
@ GSM48_CMODE_DATA_14k5_29k0
Definition: gsm_04_08.h:775
@ GSM48_CMODE_DATA_29k0_43k5
Definition: gsm_04_08.h:777
@ GSM48_CMODE_SPEECH_V5_VAMOS
Speech: GSM48_CMODE_SPEECH_V5, in VAMOS mode.
Definition: gsm_04_08.h:801
@ GSM48_CMODE_SPEECH_V1
Speech: FR (TCH/FS) or HR (TCH/HS)
Definition: gsm_04_08.h:754
@ GSM48_CMODE_DATA_3k6
CSD: 3.6 kbit/s radio interface rate, 2.4 kbit/s and less services (TCH/{F,H}2.4)
Definition: gsm_04_08.h:792
@ GSM48_CMODE_SPEECH_V6
Speech: OHR AMR (O-TCH/AHS)
Definition: gsm_04_08.h:764
@ GSM48_CMODE_SPEECH_V1_VAMOS
Same as GSM48_CMODE_SPEECH_V1, in VAMOS mode.
Definition: gsm_04_08.h:795
@ GSM48_CMODE_SIGN
Signalling only (TCH/F or TCH/H)
Definition: gsm_04_08.h:752
@ GSM48_CMODE_DATA_32k0
ECSD: 32.0 kbit/s radio interface rate, 32.0 kbit/s services (E-TCH/F32.0)
Definition: gsm_04_08.h:782
@ GSM48_CMODE_SPEECH_V2_VAMOS
Same as GSM48_CMODE_SPEECH_EFR, in VAMOS mode.
Definition: gsm_04_08.h:797
@ GSM48_CMODE_DATA_29k0
ECSD: 29.0 kbit/s radio interface rate, 28.8 kbit/s services (E-TCH/F28.8)
Definition: gsm_04_08.h:784
@ GSM48_CMODE_SPEECH_V5
Speech: FR AMR-WB (TCH/WFS)
Definition: gsm_04_08.h:762
@ GSM48_CMODE_DATA_12k0
CSD: 12.0 kbit/s radio interface rate, 9.6 kbit/s services (TCH/F9.6)
Definition: gsm_04_08.h:788
@ GSM48_CMODE_DATA_14k5_43k5
Definition: gsm_04_08.h:773
@ GSM48_CMODE_SPEECH_AMR
Speech: AMR (TCH/AFS or TCH/AHS)
Definition: gsm_04_08.h:758
@ GSM48_CMODE_DATA_43k5_14k5
Definition: gsm_04_08.h:767
@ GSM48_CMODE_SPEECH_V4
Speech: OFR AMR-WB (O-TCH/WFS) or OHR AMR-WB (O-TCH/WHS)
Definition: gsm_04_08.h:760
@ GSM48_CMODE_DATA_43k5_29k0
Definition: gsm_04_08.h:771
@ GSM48_CMODE_DATA_29k0_14k5
Definition: gsm_04_08.h:769
@ GSM48_CMODE_DATA_43k5
ECSD: 43.5 kbit/s radio interface rate, 43.2 kbit/s services (E-TCH/F43.2)
Definition: gsm_04_08.h:780
@ GSM48_CMODE_SPEECH_EFR
Speech: EFR (TCH/EFS)
Definition: gsm_04_08.h:756
@ GSM48_CMODE_DATA_14k5
CSD: 14.5 kbit/s radio interface rate, 14.4 kbit/s services (TCH/F14.4)
Definition: gsm_04_08.h:786

Referenced by gsm48_chan_mode_name().

◆ gsm48_gmm_cause_names

const struct value_string* gsm48_gmm_cause_names = gsm48_gmm_cause_names_

Referenced by osmo_oap_client_handle().

◆ gsm48_gmm_cause_names_

const struct value_string gsm48_gmm_cause_names_[]

10.5.5.14 GPRS MM Cause / Table 10.5.147

◆ gsm48_gsm_cause_names

const struct value_string* gsm48_gsm_cause_names = gsm48_gsm_cause_names_

◆ gsm48_gsm_cause_names_

const struct value_string gsm48_gsm_cause_names_[]

10.5.6.6 SM Cause / Table 10.5.157

◆ gsm48_mm_att_tlvdef

const struct tlv_definition gsm48_mm_att_tlvdef
Initial value:
= {
.def = {
},
}
@ TLV_TYPE_TLV
tag-length-value
Definition: tlv.h:513
@ TLV_TYPE_TV
tag-value (8bit)
Definition: tlv.h:512
@ TLV_TYPE_FIXED
fixed-length value-only
Definition: tlv.h:510
@ TLV_TYPE_SINGLE_TV
tag and value (both 4 bit) in 1 byte
Definition: tlv.h:516
@ TLV_TYPE_T
tag-only
Definition: tlv.h:511
#define GSM48_IE_MOBILE_ID
Definition: gsm_04_08.h:1774
#define GSM48_IE_CTS_PERMISSION
Definition: gsm_04_08.h:1882
#define GSM48_IE_PRIORITY_LEV_HO
Definition: gsm_04_08.h:1875
#define GSM48_IE_FOLLOW_ON_PROC
Definition: gsm_04_08.h:1881
#define GSM48_IE_NAME_SHORT
Definition: gsm_04_08.h:1776
#define GSM48_IE_NAME_LONG
Definition: gsm_04_08.h:1775
#define GSM48_IE_NET_TIME_TZ
Definition: gsm_04_08.h:1778
#define GSM48_IE_LSA_IDENT
Definition: gsm_04_08.h:1779
#define GSM48_IE_UTC
Definition: gsm_04_08.h:1777
#define GSM48_IE_LOCATION_AREA
Definition: gsm_04_08.h:1876
#define GSM48_IE_NET_DST
Definition: gsm_04_08.h:1780

TLV parser definitions for TS 04.08 MM.

◆ gsm48_mm_msgtype_names

const struct value_string gsm48_mm_msgtype_names[]
Initial value:
= {
{ 0, NULL }
}
#define OSMO_VALUE_STRING(x)
#define GSM48_MT_MM_AUTH_REJ
Definition: gsm_04_08.h:1662
#define GSM48_MT_MM_CM_SERV_ACC
Definition: gsm_04_08.h:1671
#define GSM48_MT_MM_CM_SERV_REJ
Definition: gsm_04_08.h:1672
#define GSM48_MT_MM_ID_RESP
Definition: gsm_04_08.h:1667
#define GSM48_MT_MM_CM_SERV_PROMPT
Definition: gsm_04_08.h:1675
#define GSM48_MT_MM_IMSI_DETACH_IND
Definition: gsm_04_08.h:1657
#define GSM48_MT_MM_AUTH_REQ
Definition: gsm_04_08.h:1663
#define GSM48_MT_MM_CM_REEST_REQ
Definition: gsm_04_08.h:1676
#define GSM48_MT_MM_STATUS
Definition: gsm_04_08.h:1680
#define GSM48_MT_MM_AUTH_FAIL
Definition: gsm_04_08.h:1665
#define GSM48_MT_MM_LOC_UPD_ACCEPT
Definition: gsm_04_08.h:1658
#define GSM48_MT_MM_NULL
Definition: gsm_04_08.h:1679
#define GSM48_MT_MM_ID_REQ
Definition: gsm_04_08.h:1666
#define GSM48_MT_MM_INFO
Definition: gsm_04_08.h:1681
#define GSM48_MT_MM_TMSI_REALL_CMD
Definition: gsm_04_08.h:1668
#define GSM48_MT_MM_AUTH_RESP
Definition: gsm_04_08.h:1664
#define GSM48_MT_MM_ABORT
Definition: gsm_04_08.h:1677
#define GSM48_MT_MM_LOC_UPD_REQUEST
Definition: gsm_04_08.h:1660
#define GSM48_MT_MM_CM_SERV_ABORT
Definition: gsm_04_08.h:1673
#define GSM48_MT_MM_CM_SERV_REQ
Definition: gsm_04_08.h:1674
#define GSM48_MT_MM_TMSI_REALL_COMPL
Definition: gsm_04_08.h:1669
#define GSM48_MT_MM_LOC_UPD_REJECT
Definition: gsm_04_08.h:1659

TS 04.08 MM Message Type names.

Referenced by gsm48_pdisc_msgtype_name_buf().

◆ gsm48_nc_ss_msgtype_names

const struct value_string gsm48_nc_ss_msgtype_names[]
Initial value:
= {
{ 0, NULL }
}
#define GSM0480_MTYPE_FACILITY
Definition: gsm_04_80.h:8
#define GSM0480_MTYPE_RELEASE_COMPLETE
Definition: gsm_04_80.h:7
#define GSM0480_MTYPE_REGISTER
Definition: gsm_04_80.h:9

TS 04.80, section 3.4 Messages for supplementary services control.

Referenced by gsm48_pdisc_msgtype_name_buf().

◆ gsm48_pdisc_names

const struct value_string gsm48_pdisc_names[]
Initial value:
= {
{ GSM48_PDISC_GROUP_CC, "VGCC" },
{ GSM48_PDISC_BCAST_CC, "VBCC" },
{ GSM48_PDISC_PDSS1, "PDSS1" },
{ GSM48_PDISC_CC, "CC" },
{ GSM48_PDISC_PDSS2, "PDSS2" },
{ GSM48_PDISC_MM, "MM" },
{ GSM48_PDISC_RR, "RR" },
{ GSM48_PDISC_MM_GPRS, "GMM" },
{ GSM48_PDISC_SMS, "SMS" },
{ GSM48_PDISC_NC_SS, "NCSS" },
{ GSM48_PDISC_LOC, "LCS" },
{ GSM48_PDISC_EXTEND, "EXTD" },
{ GSM48_PDISC_MASK, "MASK" },
{ 0, NULL }
}
#define GSM48_PDISC_MASK
Definition: gsm_04_08.h:1449
#define GSM48_PDISC_EXTEND
Definition: gsm_04_08.h:1447
#define GSM48_PDISC_LOC
Definition: gsm_04_08.h:1446
#define GSM48_PDISC_RR
Definition: gsm_04_08.h:1441
#define GSM48_PDISC_MM_GPRS
Definition: gsm_04_08.h:1442
#define GSM48_PDISC_MM
Definition: gsm_04_08.h:1440
#define GSM48_PDISC_SMS
Definition: gsm_04_08.h:1443
#define GSM48_PDISC_PDSS2
Definition: gsm_04_08.h:1438
#define GSM48_PDISC_GROUP_CC
Definition: gsm_04_08.h:1434
#define GSM48_PDISC_BCAST_CC
Definition: gsm_04_08.h:1435
#define GSM48_PDISC_SM_GPRS
Definition: gsm_04_08.h:1444
#define GSM48_PDISC_PDSS1
Definition: gsm_04_08.h:1436
#define GSM48_PDISC_NC_SS
Definition: gsm_04_08.h:1445
#define GSM48_PDISC_CC
Definition: gsm_04_08.h:1437

TS 04.08 Protocol Descriptor names.

Referenced by gsm48_pdisc_name().

◆ gsm48_reject_value_names

const struct value_string gsm48_reject_value_names[]

Referenced by gsm48_reject_value_name().

◆ gsm48_rr_att_tlvdef

const struct tlv_definition gsm48_rr_att_tlvdef

TLV parser definitions for TS 04.08 RR.

◆ gsm48_rr_msgtype_names

const struct value_string gsm48_rr_msgtype_names[]

TS 04.08 RR Message Type names.

Referenced by gsm48_pdisc_msgtype_name_buf().

◆ gsm_chan_t_names

const struct value_string gsm_chan_t_names[]
Initial value:
= {
{ GSM_LCHAN_NONE, "NONE" },
{ GSM_LCHAN_SDCCH, "SDCCH" },
{ GSM_LCHAN_TCH_F, "TCH_F" },
{ GSM_LCHAN_TCH_H, "TCH_H" },
{ GSM_LCHAN_UNKNOWN, "UNKNOWN" },
{ GSM_LCHAN_CCCH, "CCCH" },
{ GSM_LCHAN_PDTCH, "PDTCH" },
{ GSM_LCHAN_CBCH, "CBCH" },
{ 0, NULL },
}
@ GSM_LCHAN_TCH_H
Definition: gsm_utils.h:239
@ GSM_LCHAN_SDCCH
Definition: gsm_utils.h:237
@ GSM_LCHAN_TCH_F
Definition: gsm_utils.h:238
@ GSM_LCHAN_UNKNOWN
Definition: gsm_utils.h:240
@ GSM_LCHAN_PDTCH
Definition: gsm_utils.h:242
@ GSM_LCHAN_CBCH
Definition: gsm_utils.h:243
@ GSM_LCHAN_NONE
Definition: gsm_utils.h:236
@ GSM_LCHAN_CCCH
Definition: gsm_utils.h:241

Referenced by gsm_chan_t_name().

◆ mi_type_names

const struct value_string mi_type_names[]
static
Initial value:
= {
{ GSM_MI_TYPE_NONE, "NONE" },
{ GSM_MI_TYPE_IMSI, "IMSI" },
{ GSM_MI_TYPE_IMEI, "IMEI" },
{ GSM_MI_TYPE_IMEISV, "IMEI-SV" },
{ GSM_MI_TYPE_TMSI, "TMSI" },
{ 0, NULL }
}
#define GSM_MI_TYPE_TMSI
Definition: gsm_04_08.h:1771
#define GSM_MI_TYPE_IMSI
Definition: gsm_04_08.h:1768
#define GSM_MI_TYPE_IMEI
Definition: gsm_04_08.h:1769
#define GSM_MI_TYPE_NONE
Definition: gsm_04_08.h:1767
#define GSM_MI_TYPE_IMEISV
Definition: gsm_04_08.h:1770

Referenced by gsm48_mi_type_name().

◆ osmo_cm_service_type_names

const struct value_string osmo_cm_service_type_names[]
Initial value:
= {
{ GSM48_CMSERV_EMERGENCY, "Emergency-Call" },
{ GSM48_CMSERV_SMS, "Short-Messaging-Service" },
{ GSM48_CMSERV_SUP_SERV, "Supplementary-Service" },
{ GSM48_CMSERV_VGCS, "Voice-Group-Call" },
{ GSM48_CMSERV_VBS, "Voice-Broadcast-Call" },
{ GSM48_CMSERV_LOC_SERV, "Location-Service" },
{}
}
@ GSM48_CMSERV_MO_CALL_PACKET
Definition: gsm_04_08.h:1734
@ GSM48_CMSERV_VBS
Definition: gsm_04_08.h:1739
@ GSM48_CMSERV_SUP_SERV
Definition: gsm_04_08.h:1737
@ GSM48_CMSERV_VGCS
Definition: gsm_04_08.h:1738
@ GSM48_CMSERV_SMS
Definition: gsm_04_08.h:1736
@ GSM48_CMSERV_EMERGENCY
Definition: gsm_04_08.h:1735
@ GSM48_CMSERV_LOC_SERV
Definition: gsm_04_08.h:1740

Referenced by osmo_cm_service_type_name().

◆ osmo_lu_type_names

const struct value_string osmo_lu_type_names[]
Initial value:
= {
{ GSM48_LUPD_NORMAL, "NORMAL" },
{ GSM48_LUPD_PERIODIC, "PERIODIC" },
{ GSM48_LUPD_IMSI_ATT, "IMSI-ATTACH" },
{ GSM48_LUPD_RESERVED, "RESERVED" },
{}
}
#define GSM48_LUPD_NORMAL
Definition: gsm_04_08.h:1756
#define GSM48_LUPD_PERIODIC
Definition: gsm_04_08.h:1757
#define GSM48_LUPD_IMSI_ATT
Definition: gsm_04_08.h:1758
#define GSM48_LUPD_RESERVED
Definition: gsm_04_08.h:1759

Referenced by osmo_lu_type_name().

◆ rr_cause_names

const struct value_string rr_cause_names[]
static
Initial value:
= {
{ GSM48_RR_CAUSE_NORMAL, "Normal event" },
{ GSM48_RR_CAUSE_ABNORMAL_UNSPEC, "Abnormal release, unspecified" },
{ GSM48_RR_CAUSE_ABNORMAL_UNACCT, "Abnormal release, channel unacceptable" },
{ GSM48_RR_CAUSE_ABNORMAL_TIMER, "Abnormal release, timer expired" },
{ GSM48_RR_CAUSE_ABNORMAL_NOACT, "Abnormal release, no activity on radio path" },
{ GSM48_RR_CAUSE_PREMPTIVE_REL, "Preemptive release" },
{ GSM48_RR_CAUSE_UTRAN_CFG_UNK, "UTRAN configuration unknown" },
{ GSM48_RR_CAUSE_HNDOVER_IMP, "Handover impossible, timing advance out of range" },
{ GSM48_RR_CAUSE_CHAN_MODE_UNACCT, "Channel mode unacceptable" },
{ GSM48_RR_CAUSE_FREQ_NOT_IMPL, "Frequency not implemented" },
{ GSM48_RR_CAUSE_LEAVE_GROUP_CA, "Originator or talker leaving group call area" },
{ GSM48_RR_CAUSE_LOW_LEVEL_FAIL, "Lower layer failure" },
{ GSM48_RR_CAUSE_CALL_CLEARED, "Call already cleared" },
{ GSM48_RR_CAUSE_SEMANT_INCORR, "Semantically incorrect message" },
{ GSM48_RR_CAUSE_INVALID_MAND_INF, "Invalid mandatory information" },
{ GSM48_RR_CAUSE_MSG_TYPE_N, "Message type non-existent or not implemented" },
{ GSM48_RR_CAUSE_MSG_TYPE_N_COMPAT, "Message type not compatible with protocol state" },
{ GSM48_RR_CAUSE_COND_IE_ERROR, "Conditional IE error" },
{ GSM48_RR_CAUSE_NO_CELL_ALLOC_A, "No cell allocation available" },
{ GSM48_RR_CAUSE_PROT_ERROR_UNSPC, "Protocol error unspecified" },
{ 0, NULL },
}
@ GSM48_RR_CAUSE_HNDOVER_IMP
Definition: gsm_04_08.h:1940
@ GSM48_RR_CAUSE_COND_IE_ERROR
Definition: gsm_04_08.h:1950
@ GSM48_RR_CAUSE_CALL_CLEARED
Definition: gsm_04_08.h:1945
@ GSM48_RR_CAUSE_ABNORMAL_UNACCT
Definition: gsm_04_08.h:1935
@ GSM48_RR_CAUSE_MSG_TYPE_N
Definition: gsm_04_08.h:1948
@ GSM48_RR_CAUSE_PROT_ERROR_UNSPC
Definition: gsm_04_08.h:1952
@ GSM48_RR_CAUSE_ABNORMAL_UNSPEC
Definition: gsm_04_08.h:1934
@ GSM48_RR_CAUSE_NORMAL
Definition: gsm_04_08.h:1933
@ GSM48_RR_CAUSE_INVALID_MAND_INF
Definition: gsm_04_08.h:1947
@ GSM48_RR_CAUSE_FREQ_NOT_IMPL
Definition: gsm_04_08.h:1942
@ GSM48_RR_CAUSE_ABNORMAL_TIMER
Definition: gsm_04_08.h:1936
@ GSM48_RR_CAUSE_PREMPTIVE_REL
Definition: gsm_04_08.h:1938
@ GSM48_RR_CAUSE_CHAN_MODE_UNACCT
Definition: gsm_04_08.h:1941
@ GSM48_RR_CAUSE_SEMANT_INCORR
Definition: gsm_04_08.h:1946
@ GSM48_RR_CAUSE_MSG_TYPE_N_COMPAT
Definition: gsm_04_08.h:1949
@ GSM48_RR_CAUSE_UTRAN_CFG_UNK
Definition: gsm_04_08.h:1939
@ GSM48_RR_CAUSE_NO_CELL_ALLOC_A
Definition: gsm_04_08.h:1951
@ GSM48_RR_CAUSE_LEAVE_GROUP_CA
Definition: gsm_04_08.h:1943
@ GSM48_RR_CAUSE_ABNORMAL_NOACT
Definition: gsm_04_08.h:1937
@ GSM48_RR_CAUSE_LOW_LEVEL_FAIL
Definition: gsm_04_08.h:1944

Referenced by rr_cause_name().

◆ rr_msg_names

const struct value_string rr_msg_names[]
static

Referenced by gsm48_rr_msg_name().

◆ rr_msg_type_short_names

const struct value_string rr_msg_type_short_names[]
static
Initial value:
= {
{ GSM48_MT_RR_SH_SI10, "System Information Type 10" },
{ GSM48_MT_RR_SH_FACCH, "Notification/FACCH" },
{ GSM48_MT_RR_SH_UL_FREE, "Uplink Free" },
{ GSM48_MT_RR_SH_MEAS_REP, "Enhanced Measurement Report (uplink)" },
{ GSM48_MT_RR_SH_MEAS_INFO, "Measurement Information (downlink)" },
{ GSM48_MT_RR_SH_VGCS_RECON, "VBS/VGCS Reconfigure" },
{ GSM48_MT_RR_SH_VGCS_RECON2, "VBS/VGCS Reconfigure2" },
{ GSM48_MT_RR_SH_VGCS_INFO, "VGCS Additional Information" },
{ GSM48_MT_RR_SH_VGCS_SMS, "VGCS SMS Information" },
{ GSM48_MT_RR_SH_SI10bis, "System Information Type 10bis" },
{ GSM48_MT_RR_SH_SI10ter, "System Information Type 10ter" },
{ GSM48_MT_RR_SH_VGCS_NEIGH, "VGCS Neighbour Cell Information" },
{ GSM48_MT_RR_SH_APP_DATA, "Notify Application Data" },
{ 0, NULL }
}
#define GSM48_MT_RR_SH_VGCS_NEIGH
Definition: gsm_04_08.h:1653
#define GSM48_MT_RR_SH_VGCS_RECON2
Definition: gsm_04_08.h:1648
#define GSM48_MT_RR_SH_VGCS_INFO
Definition: gsm_04_08.h:1649
#define GSM48_MT_RR_SH_APP_DATA
Definition: gsm_04_08.h:1654
#define GSM48_MT_RR_SH_VGCS_RECON
Definition: gsm_04_08.h:1647
#define GSM48_MT_RR_SH_FACCH
Definition: gsm_04_08.h:1643
#define GSM48_MT_RR_SH_SI10ter
Definition: gsm_04_08.h:1652
#define GSM48_MT_RR_SH_SI10
Definition: gsm_04_08.h:1642
#define GSM48_MT_RR_SH_UL_FREE
Definition: gsm_04_08.h:1644
#define GSM48_MT_RR_SH_MEAS_REP
Definition: gsm_04_08.h:1645
#define GSM48_MT_RR_SH_MEAS_INFO
Definition: gsm_04_08.h:1646
#define GSM48_MT_RR_SH_SI10bis
Definition: gsm_04_08.h:1651
#define GSM48_MT_RR_SH_VGCS_SMS
Definition: gsm_04_08.h:1650

Referenced by gsm48_rr_short_pd_msg_name().