libosmogsm
0.11.0.54.60f31
Osmocom GSM library
|
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... | |
const char * | osmo_rai_name (const struct gprs_ra_id *rai) |
Return MCC-MNC-LAC-RAC as string, in a static 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_mi_type_name (uint8_t mi) |
return string representation of Mobile Identity Type 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) |
Generate TS 04.08 Mobile ID from TMSI. More... | |
uint8_t | gsm48_generate_mid (uint8_t *buf, const char *id, uint8_t mi_type) |
Generate TS 24.008 §10.5.1.4 Mobile ID. More... | |
int | gsm48_generate_mid_from_imsi (uint8_t *buf, const char *imsi) |
Generate TS 04.08 Mobile ID from IMSI. More... | |
int | gsm48_mi_to_string (char *string, const int str_len, const uint8_t *mi, const int mi_len) |
Convert TS 04.08 Mobile Identity (10.5.1.4) to string. 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... | |
int | gsm48_number_of_paging_subchannels (struct gsm48_control_channel_descr *chan_desc) |
Determine number of paging sub-channels. More... | |
const char * | gsm48_pdisc_msgtype_name (uint8_t pdisc, uint8_t msg_type) |
Compose a string naming the message type for given protocol. More... | |
int | gsm48_decode_bcd_number (char *output, int output_len, const uint8_t *bcd_lv, int 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, 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... | |
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 [] |
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_nc_ss_msgtype_names [] |
TS 04.80, section 3.4 Messages for supplementary services control. More... | |
const struct value_string | gsm48_reject_value_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_string * | gsm48_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_string * | gsm48_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_string * | gprs_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_string * | gprs_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_string * | gprs_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_string * | gprs_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_string * | gprs_service_t_strs = gprs_service_t_strs_ |
GSM Mobile Radion Interface L3 messages / TS 04.08.
|
static |
convert a single ASCII character to call-control BCD
References ARRAY_SIZE, and bcd_num_digits.
Referenced by gsm48_encode_bcd_number().
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.
[in] | ms_net_cap | Buffer with raw MS network capability IE value, 3 - 10 bytes |
[in] | cap_len | Length of ms_net_cap, in bytes |
[in] | gea | Version of GEA to check |
References GPRS_ALGO_GEA0, GPRS_ALGO_GEA1, GPRS_ALGO_GEA2, GPRS_ALGO_GEA3, and GPRS_ALGO_GEA4.
const char* gsm48_cc_msg_name | ( | uint8_t | msgtype | ) |
return string representation of CC Message Type
References get_value_string().
const char* gsm48_cc_state_name | ( | uint8_t | state | ) |
return string representation of CC State
References ARRAY_SIZE, and cc_state_names.
int gsm48_construct_ra | ( | uint8_t * | buf, |
const struct gprs_ra_id * | raid | ||
) |
Encode a TS 04.08 Routing Area Identifier.
[out] | buf | Caller-provided output buffer of 6 bytes |
[in] | raid | Routing Area ID to be encoded |
References gsm48_encode_ra().
int gsm48_decode_bcd_number | ( | char * | output, |
int | output_len, | ||
const uint8_t * | bcd_lv, | ||
int | h_len | ||
) |
decode a 'called/calling/connect party BCD number' as in 10.5.4.7
[out] | Caller-provided | output buffer |
[in] | bcd_lv | Length-Value portion of to-be-decoded IE |
[in] | h_len | Length of an optional heder between L and V portion |
References bcd_num_digits.
Referenced by gsm48_decode_called(), gsm48_decode_callerid(), and osmo_gsup_decode().
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)
[out] | Caller-provided | memory for decoded output [aram[in] LV portion of TS 04.08 Bearer Capability |
References gsm_mncc_bearer_cap::async, gsm_mncc_bearer_cap::coding, gsm_mncc_bearer_cap::data, GSM_MNCC_BCAP_FAX_G3, GSM_MNCC_BCAP_SPEECH, GSM_MNCC_BCAP_UNR_DIG, gsm_mncc_bearer_cap::interm_rate, gsm_mncc_bearer_cap::mode, gsm_mncc_bearer_cap::modem_type, gsm_mncc_bearer_cap::nr_data_bits, gsm_mncc_bearer_cap::nr_stop_bits, gsm_mncc_bearer_cap::parity, gsm_mncc_bearer_cap::radio, gsm_mncc_bearer_cap::rate_adaption, s, gsm_mncc_bearer_cap::sig_access, gsm_mncc_bearer_cap::speech_ctm, gsm_mncc_bearer_cap::speech_ver, gsm_mncc_bearer_cap::transfer, gsm_mncc_bearer_cap::transp, and gsm_mncc_bearer_cap::user_rate.
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)
[out] | called | Caller-provided memory for decoded number |
[in] | lv | Length-Value portion of IE |
References gsm48_decode_bcd_number(), gsm_mncc_number::number, gsm_mncc_number::plan, and gsm_mncc_number::type.
int gsm48_decode_callerid | ( | struct gsm_mncc_number * | callerid, |
const uint8_t * | lv | ||
) |
Decode TS 04.08 Caller ID.
[out] | called | Caller-provided memory for decoded number |
[in] | lv | Length-Value portion of IE |
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().
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().
int gsm48_decode_cause | ( | struct gsm_mncc_cause * | cause, |
const uint8_t * | lv | ||
) |
Decode TS 04.08 Cause IE (10.5.4.11)
[out] | cause | Caller-provided memory for output |
[in] | lv | LV portion of Cause IE |
References gsm_mncc_cause::coding, gsm_mncc_cause::diag, gsm_mncc_cause::diag_len, gsm_mncc_cause::location, gsm_mncc_cause::rec, gsm_mncc_cause::rec_val, and gsm_mncc_cause::value.
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)
[out] | Caller-provided | memory for decoded CC capabilities |
[in] | lv | Length-Value of IE 0 on success; negative on error |
References gsm_mncc_cccap::dtmf, and gsm_mncc_cccap::pcp.
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().
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.
int gsm48_decode_freq_list | ( | struct gsm_sysinfo_freq * | f, |
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.
[out] | f | Caller-provided output memory |
[in] | cd | Cell Channel Description IE |
[in] | len | Length of cd in bytes |
References gsm48_range_1024::f0, gsm_sysinfo_freq::mask, gsm48_range_512::orig_arfcn_hi, gsm48_range_256::orig_arfcn_hi, gsm48_range_128::orig_arfcn_hi, gsm48_var_bit::orig_arfcn_hi, gsm48_range_512::orig_arfcn_lo, gsm48_range_256::orig_arfcn_lo, gsm48_range_128::orig_arfcn_lo, gsm48_var_bit::orig_arfcn_lo, gsm48_range_512::orig_arfcn_mid, gsm48_range_256::orig_arfcn_mid, gsm48_range_128::orig_arfcn_mid, gsm48_var_bit::orig_arfcn_mid, smod(), gsm48_range_128::w1, gsm48_range_1024::w10, gsm48_range_512::w10, gsm48_range_256::w10, gsm48_range_128::w10, gsm48_range_512::w11, gsm48_range_128::w11, gsm48_range_1024::w11_hi, gsm48_range_256::w11_hi, gsm48_range_1024::w11_lo, gsm48_range_256::w11_lo, gsm48_range_256::w12, gsm48_range_128::w12, gsm48_range_1024::w12_hi, gsm48_range_512::w12_hi, gsm48_range_1024::w12_lo, gsm48_range_512::w12_lo, gsm48_range_256::w13, gsm48_range_128::w13, gsm48_range_1024::w13_hi, gsm48_range_512::w13_hi, gsm48_range_1024::w13_lo, gsm48_range_512::w13_lo, gsm48_range_512::w14, gsm48_range_128::w14, gsm48_range_1024::w14_hi, gsm48_range_256::w14_hi, gsm48_range_1024::w14_lo, gsm48_range_256::w14_lo, gsm48_range_512::w15, gsm48_range_256::w15, gsm48_range_128::w15, gsm48_range_1024::w15_hi, gsm48_range_1024::w15_lo, gsm48_range_1024::w16, gsm48_range_128::w16, gsm48_range_512::w16_hi, gsm48_range_256::w16_hi, gsm48_range_512::w16_lo, gsm48_range_256::w16_lo, gsm48_range_512::w17, gsm48_range_256::w17, gsm48_range_128::w17, gsm48_range_256::w18_hi, gsm48_range_128::w18_hi, gsm48_range_256::w18_lo, gsm48_range_128::w18_lo, gsm48_range_256::w19, gsm48_range_128::w19, gsm48_range_1024::w1_hi, gsm48_range_512::w1_hi, gsm48_range_256::w1_hi, gsm48_range_1024::w1_lo, gsm48_range_512::w1_lo, gsm48_range_256::w1_lo, gsm48_range_256::w2, gsm48_range_128::w2, gsm48_range_128::w20, gsm48_range_256::w20_hi, gsm48_range_256::w20_lo, gsm48_range_256::w21, gsm48_range_128::w21_hi, gsm48_range_128::w21_lo, gsm48_range_128::w22, gsm48_range_128::w23, gsm48_range_128::w24, gsm48_range_128::w25, gsm48_range_128::w26_hi, gsm48_range_128::w26_lo, gsm48_range_128::w27, gsm48_range_128::w28, gsm48_range_1024::w2_hi, gsm48_range_512::w2_hi, gsm48_range_1024::w2_lo, gsm48_range_512::w2_lo, gsm48_range_256::w3, gsm48_range_1024::w3_hi, gsm48_range_512::w3_hi, gsm48_range_128::w3_hi, gsm48_range_1024::w3_lo, gsm48_range_512::w3_lo, gsm48_range_128::w3_lo, gsm48_range_1024::w4_hi, gsm48_range_512::w4_hi, gsm48_range_256::w4_hi, gsm48_range_128::w4_hi, gsm48_range_1024::w4_lo, gsm48_range_512::w4_lo, gsm48_range_256::w4_lo, gsm48_range_128::w4_lo, gsm48_range_512::w5, gsm48_range_128::w5, gsm48_range_1024::w5_hi, gsm48_range_256::w5_hi, gsm48_range_1024::w5_lo, gsm48_range_256::w5_lo, gsm48_range_512::w6, gsm48_range_1024::w6_hi, gsm48_range_256::w6_hi, gsm48_range_128::w6_hi, gsm48_range_1024::w6_lo, gsm48_range_256::w6_lo, gsm48_range_128::w6_lo, gsm48_range_256::w7, gsm48_range_128::w7, gsm48_range_1024::w7_hi, gsm48_range_512::w7_hi, gsm48_range_1024::w7_lo, gsm48_range_512::w7_lo, gsm48_range_128::w8, gsm48_range_1024::w8_hi, gsm48_range_512::w8_hi, gsm48_range_256::w8_hi, gsm48_range_1024::w8_lo, gsm48_range_512::w8_lo, gsm48_range_256::w8_lo, gsm48_range_1024::w9, gsm48_range_128::w9, gsm48_range_512::w9_hi, gsm48_range_256::w9_hi, gsm48_range_512::w9_lo, and gsm48_range_256::w9_lo.
int gsm48_decode_keypad | ( | int * | keypad, |
const uint8_t * | lv | ||
) |
Decode TS 04.08 Keypad IE (10.5.4.17)
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.
[in] | Location | Area Identifier (encoded) |
[out] | mcc | Mobile Country Code |
[out] | mnc | Mobile Network Code |
[out] | lac | Location Area Code |
Attention: this function returns true integers, not hex!
References gsm48_decode_lai2(), osmo_location_area_id::lac, osmo_plmn_id::mcc, osmo_plmn_id::mnc, and osmo_location_area_id::plmn.
void gsm48_decode_lai2 | ( | const struct gsm48_loc_area_id * | lai, |
struct osmo_location_area_id * | decoded | ||
) |
Decode TS 04.08 Location Area Identifier.
[in] | Location | Area Identifier (encoded). |
[out] | decoded | Target 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, osmo_ntohs, osmo_plmn_from_bcd(), and osmo_location_area_id::plmn.
Referenced by decode_lai(), and gsm48_decode_lai().
int gsm48_decode_notify | ( | int * | notify, |
const uint8_t * | v | ||
) |
Decode TS 04.08 Notify IE (10.5.4.20)
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.
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().
int gsm48_decode_signal | ( | int * | signal, |
const uint8_t * | v | ||
) |
Decode TS 04.08 Signal IE (10.5.4.23)
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.
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.
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'
[out] | bcd_lv | Caller-provided output buffer |
[in] | max_len | Maximum Length of bcd_lv |
[in] | h_len | Length of an optional heder between L and V portion |
[in] | input | phone number as 0-terminated ASCII |
References asc_to_bcd().
Referenced by gsm340_gen_oa(), gsm48_encode_called(), gsm48_encode_callerid(), and osmo_gsup_encode().
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)
[out] | msg | Message Buffer to which IE is to be appended |
[in] | lv_only | Write only LV portion (1) or TLV (0) |
[in] | bcap | Decoded Bearer Capability to be encoded |
References gsm_mncc_bearer_cap::async, gsm_mncc_bearer_cap::coding, gsm_mncc_bearer_cap::data, GSM48_BCAP_ITCAP_FAX_G3, GSM48_BCAP_ITCAP_UNR_DIG_INF, GSM48_IE_BEARER_CAP, GSM_MNCC_BCAP_SPEECH, gsm_mncc_bearer_cap::interm_rate, gsm_mncc_bearer_cap::mode, gsm_mncc_bearer_cap::modem_type, msgb_lv_put(), msgb_tlv_put(), gsm_mncc_bearer_cap::nr_data_bits, gsm_mncc_bearer_cap::nr_stop_bits, gsm_mncc_bearer_cap::parity, gsm_mncc_bearer_cap::radio, gsm_mncc_bearer_cap::rate_adaption, s, gsm_mncc_bearer_cap::sig_access, gsm_mncc_bearer_cap::speech_ctm, gsm_mncc_bearer_cap::speech_ver, gsm_mncc_bearer_cap::transfer, and gsm_mncc_bearer_cap::user_rate.
int gsm48_encode_called | ( | struct msgb * | msg, |
const struct gsm_mncc_number * | called | ||
) |
Encode TS 04.08 Called Party IE (10.5.4.7)
[out] | msg | Mesage Buffer to which to append IE (as TLV) |
[in] | called | MNCC Number to encode/append |
References gsm48_encode_bcd_number(), GSM48_IE_CALLED_BCD, msgb_tlv_put(), gsm_mncc_number::number, gsm_mncc_number::plan, and gsm_mncc_number::type.
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.
[out] | msg | Mesage Buffer to which to append IE (as TLV) |
[in] | ie | IE Identifier (tag) |
[in] | max_len | maximum generated output in bytes |
[in] | callerid | MNCC Number to encode/append |
References gsm48_encode_bcd_number(), 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().
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(), and GSM48_IE_CALLING_BCD.
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)
[out] | msg | Message Buffer to which to append IE |
[in] | lv_only | Encode as LV (1) or TLV (0) |
[in] | cause | Cause value to be encoded |
References gsm_mncc_cause::coding, gsm_mncc_cause::diag, gsm_mncc_cause::diag_len, GSM48_IE_CAUSE, gsm_mncc_cause::location, msgb_lv_put(), msgb_tlv_put(), gsm_mncc_cause::rec, gsm_mncc_cause::rec_val, and gsm_mncc_cause::value.
int gsm48_encode_cccap | ( | struct msgb * | msg, |
const struct gsm_mncc_cccap * | ccap | ||
) |
Encodoe TS 04.08 Call Control Capabilities (10.5.4.5a)
[out] | msg | Message Buffer to which to append IE (as TLV) |
[in] | ccap | Decoded CC Capabilities to be encoded |
References gsm_mncc_cccap::dtmf, GSM48_IE_CC_CAP, msgb_tlv_put(), and gsm_mncc_cccap::pcp.
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(), and GSM48_IE_CONN_BCD.
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)
References GSM48_IE_FACILITY, GSM_MAX_FACILITY, gsm_mncc_facility::info, gsm_mncc_facility::len, msgb_lv_put(), and msgb_tlv_put().
int gsm48_encode_keypad | ( | struct msgb * | msg, |
int | keypad | ||
) |
Encode TS 04.08 Keypad IE (10.5.4.17)
References GSM48_IE_KPD_FACILITY, and msgb_tv_put().
int gsm48_encode_more | ( | struct msgb * | msg | ) |
Encode TS 04.08 More Data IE (10.5.4.19)
References GSM48_IE_MORE_DATA, and msgb_put().
int gsm48_encode_notify | ( | struct msgb * | msg, |
int | notify | ||
) |
Encode TS 04.08 Notify IE (10.5.4.20)
References msgb_v_put().
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)
References gsm_mncc_progress::coding, gsm_mncc_progress::descr, GSM48_IE_PROGR_IND, gsm_mncc_progress::location, msgb_lv_put(), and msgb_tlv_put().
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.
[out] | out | Caller-provided packed struct |
[in] | raid | Routing 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().
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(), and GSM48_IE_REDIR_BCD.
int gsm48_encode_signal | ( | struct msgb * | msg, |
int | signal | ||
) |
Encode TS 04.08 Signal IE (10.5.4.23)
References GSM48_IE_SIGNAL, and msgb_tv_put().
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, and msgb_tlv_put().
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)
References GSM48_IE_USER_USER, GSM_MAX_USERUSER, gsm_mncc_useruser::info, msgb_lv_put(), msgb_tlv_put(), and gsm_mncc_useruser::proto.
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.
[out] | lai48 | caller-provided memory for output |
[in] | mcc | Mobile Country Code |
[in] | mnc | Mobile Network Code |
[in] | lac | Location Area Code |
References gsm48_generate_lai2(), lac, osmo_plmn_id::mcc, and osmo_location_area_id::plmn.
void gsm48_generate_lai2 | ( | struct gsm48_loc_area_id * | lai48, |
const struct osmo_location_area_id * | lai | ||
) |
Encode TS 04.08 Location Area Identifier.
[out] | lai48 | caller-provided memory for output. |
[in] | lai | input of MCC-MNC-LAC. |
References gsm48_loc_area_id::digits, osmo_location_area_id::lac, gsm48_loc_area_id::lac, osmo_htons, osmo_plmn_to_bcd(), and osmo_location_area_id::plmn.
Referenced by gsm0808_create_layer3_2(), gsm0808_enc_cell_id_list2(), and gsm48_generate_lai().
uint8_t gsm48_generate_mid | ( | uint8_t * | buf, |
const char * | id, | ||
uint8_t | mi_type | ||
) |
Generate TS 24.008 §10.5.1.4 Mobile ID.
[out] | buf | Caller-provided output buffer |
[in] | id | Identity to be encoded |
References GSM48_IE_MOBILE_ID, length, and osmo_char2bcd().
Referenced by gsm48_generate_mid_from_imsi().
int gsm48_generate_mid_from_imsi | ( | uint8_t * | buf, |
const char * | imsi | ||
) |
Generate TS 04.08 Mobile ID from IMSI.
[out] | buf | Caller-provided output buffer |
[in] | imsi | IMSI to be encoded |
References gsm48_generate_mid(), and GSM_MI_TYPE_IMSI.
Referenced by gsm0808_create_paging2().
int gsm48_generate_mid_from_tmsi | ( | uint8_t * | buf, |
uint32_t | tmsi | ||
) |
Generate TS 04.08 Mobile ID from TMSI.
[out] | buf | Caller-provided output buffer (7 bytes) |
[in] | tmsi | TMSI to be encoded |
References GSM48_IE_MOBILE_ID, GSM48_TMSI_LEN, GSM_MI_TYPE_TMSI, and osmo_htonl.
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.
[in] | hdr | Message header |
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, and gsm48_hdr::msg_type.
Referenced by gsm48_pdisc_name().
void gsm48_mcc_mnc_from_bcd | ( | uint8_t * | bcd_src, |
uint16_t * | mcc, | ||
uint16_t * | mnc | ||
) |
References osmo_plmn_id::mcc, osmo_plmn_id::mnc, and osmo_plmn_from_bcd().
void gsm48_mcc_mnc_to_bcd | ( | uint8_t * | bcd_dst, |
uint16_t | mcc, | ||
uint16_t | mnc | ||
) |
References osmo_plmn_id::mcc, osmo_plmn_id::mnc, and osmo_plmn_to_bcd().
int gsm48_mi_to_string | ( | char * | string, |
const int | str_len, | ||
const uint8_t * | mi, | ||
const int | mi_len | ||
) |
Convert TS 04.08 Mobile Identity (10.5.1.4) to string.
[out] | string | Caller-provided buffer for output |
[in] | str_len | Length of string in bytes |
[in] | mi | Mobile Identity to be stringified |
[in] | mi_len | Length of mi in bytes |
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_len, and osmo_bcd2char().
const char* gsm48_mi_type_name | ( | uint8_t | mi | ) |
return string representation of Mobile Identity Type
References get_value_string().
int gsm48_number_of_paging_subchannels | ( | struct gsm48_control_channel_descr * | chan_desc | ) |
Determine number of paging sub-channels.
[in] | chan_desc | Control Channel Description |
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 gsm48_control_channel_descr::bs_pa_mfrms, gsm48_control_channel_descr::ccch_conf, gsm0502_get_n_pag_blocks(), OSMO_MAX, and RSL_BCCH_CCCH_CONF_1_C.
Referenced by gsm0502_calc_paging_group().
void gsm48_parse_ra | ( | struct gprs_ra_id * | raid, |
const uint8_t * | buf | ||
) |
Parse TS 04.08 Routing Area Identifier.
[out] | Caller-provided | memory for decoded RA ID |
[in] | buf | Input 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.
const char* gsm48_pdisc_msgtype_name | ( | uint8_t | pdisc, |
uint8_t | msg_type | ||
) |
Compose a string naming the message type for given protocol.
If the message type string is known, return the message type name, otherwise return "<protocol discriminator name>:<message type in hex>".
[in] | pdisc | protocol discriminator like GSM48_PDISC_MM |
[in] | msg_type | message type like GSM48_MT_MM_LOC_UPD_REQUEST |
References get_value_string(), gsm48_cc_msgtype_names, gsm48_mm_msgtype_names, gsm48_nc_ss_msgtype_names, GSM48_PDISC_CC, GSM48_PDISC_MM, gsm48_pdisc_name(), GSM48_PDISC_NC_SS, GSM48_PDISC_RR, gsm48_rr_msgtype_names, and namebuf.
const char* gsm48_rr_msg_name | ( | uint8_t | msgtype | ) |
return string representation of RR Message Type
References get_value_string().
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)
[in] | op | Cell Options structure in which DTX parameters will be set |
[in] | full | Mode for full-rate channels |
[in] | half | Mode for half-rate channels |
[in] | is_bcch | Indicates 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_cell_options::d, gsm48_cell_options::dtx, GSM48_DTX_MAY_BE_USED, GSM48_DTX_SHALL_BE_USED, and GSM48_DTX_SHALL_NOT_BE_USED.
Referenced by gsm48_hdr_msg_type_r99().
const char* osmo_rai_name | ( | const struct gprs_ra_id * | rai | ) |
Return MCC-MNC-LAC-RAC as string, in a static buffer.
[in] | rai | RAI to encode. |
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.
const char* rr_cause_name | ( | uint8_t | cause | ) |
return string representation of RR Cause value
References get_value_string().
|
static |
Referenced by gsm48_decode_freq_list().
|
static |
Referenced by asc_to_bcd(), and gsm48_decode_bcd_number().
|
static |
|
static |
Referenced by gsm48_cc_state_name().
const struct value_string* gprs_att_t_strs = gprs_att_t_strs_ |
const struct value_string gprs_att_t_strs_[] |
String names of GPRS Attach types according to 10.5.5.2.
const struct value_string* gprs_det_t_mo_strs = gprs_det_t_mo_strs_ |
const struct value_string gprs_det_t_mo_strs_[] |
String names of GMM MO Detach Types according to 10.5.5.5.
const struct value_string* gprs_det_t_mt_strs = gprs_det_t_mt_strs_ |
const struct value_string gprs_det_t_mt_strs_[] |
String names of GMM MT Detach Types according to 10.5.5.5.
const struct value_string gprs_msgt_gmm_names[] |
String names of GMM message types.
const struct value_string* gprs_service_t_strs = gprs_service_t_strs_ |
const struct value_string gprs_service_t_strs_[] |
String names of GMM Service Types.
const struct value_string* gprs_upd_t_strs = gprs_upd_t_strs_ |
const struct value_string gprs_upd_t_strs_[] |
String names of GPRS Location Update Types.
const struct tlv_definition gsm48_att_tlvdef |
TLV parser definitions for TS 04.08 CC.
const struct value_string gsm48_cc_msgtype_names[] |
TS 04.08 CC Message Type names.
Referenced by gsm48_pdisc_msgtype_name().
const struct value_string gsm48_chan_mode_names[] |
const struct value_string* gsm48_gmm_cause_names = gsm48_gmm_cause_names_ |
const struct value_string gsm48_gmm_cause_names_[] |
10.5.5.14 GPRS MM Cause / Table 10.5.147
const struct value_string* 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
const struct tlv_definition gsm48_mm_att_tlvdef |
TLV parser definitions for TS 04.08 MM.
const struct value_string gsm48_mm_msgtype_names[] |
TS 04.08 MM Message Type names.
Referenced by gsm48_pdisc_msgtype_name().
const struct value_string gsm48_nc_ss_msgtype_names[] |
TS 04.80, section 3.4 Messages for supplementary services control.
Referenced by gsm48_pdisc_msgtype_name().
const struct value_string gsm48_pdisc_names[] |
TS 04.08 Protocol Descriptor names.
Referenced by gsm48_pdisc_name().
const struct value_string gsm48_reject_value_names[] |
Referenced by gsm48_reject_value_name().
const struct tlv_definition gsm48_rr_att_tlvdef |
TLV parser definitions for TS 04.08 RR.
const struct value_string gsm48_rr_msgtype_names[] |
TS 04.08 RR Message Type names.
Referenced by gsm48_pdisc_msgtype_name().
const struct value_string gsm_chan_t_names[] |
|
static |
|
static |
|
static |