gsm48.c File Reference
`#include <stdint.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include <stdbool.h>`
`#include <inttypes.h>`
`#include <ctype.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/core/byteswap.h>`
`#include <osmocom/core/bit16gen.h>`
`#include <osmocom/core/bit32gen.h>`
`#include <osmocom/gsm/tlv.h>`
`#include <osmocom/gsm/gsm48.h>`
`#include <osmocom/gsm/gsm0502.h>`
`#include <osmocom/gsm/gsm_utils.h>`
`#include <osmocom/gsm/protocol/gsm_04_08.h>`
`#include <osmocom/gsm/protocol/gsm_04_80.h>`
`#include <osmocom/gsm/protocol/gsm_08_58.h>`
`#include <osmocom/gsm/protocol/gsm_04_08_gprs.h>`

## 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...

## 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 []

## Detailed Description

GSM Mobile Radio Interface Layer 3 messages 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0