libosmogsm  1.4.0
Osmocom GSM library
GSM 08.08 / 3GPP TS 48.008 A Interface

Files

file  gsm0808.h
 
file  gsm0808_utils.h
 
file  gsm0808.c
 Helper functions regarding the TS 08.08 / 48.008 A interface, primarily message generation/encoding.
 

Data Structures

struct  gsm0808_old_bss_to_new_bss_info
 3GPP TS 48.008 §3.2.2.5.8 Old BSS to New BSS information More...
 
struct  gsm0808_handover_required
 3GPP TS 48.008 §3.2.1.9 HANDOVER REQUIRED More...
 
struct  gsm0808_handover_required_reject
 3GPP TS 48.008 §3.2.1.37 HANDOVER REQUIRED REJECT More...
 
struct  gsm0808_handover_request
 3GPP TS 48.008 §3.2.1.8 HANDOVER REQUEST More...
 
struct  gsm0808_handover_request_ack
 
struct  gsm0808_handover_command
 
struct  gsm0808_handover_complete
 
struct  gsm0808_handover_failure
 
struct  gsm0808_handover_performed
 
union  gsm0808_cell_id_u
 Instead of this, use either struct gsm0808_cell_id or gsm0808_cell_id_list2. More...
 
struct  gsm0808_cell_id
 Parsed representation of Cell Identifier IE (3GPP TS 48.008 3.2.2.17) More...
 
struct  gsm0808_cell_id_list2
 Parsed representation of a Cell Identifier List IE (3GPP TS 48.008 3.2.2.27). More...
 
struct  osmo_lcls
 LCLS-related parameters from 3GPP TS 48.008. More...
 

Macros

#define BSSMAP_MSG_SIZE   1024
 
#define BSSMAP_MSG_HEADROOM   512
 
#define osmo_bssap_tlv_parse(dec, buf, len)   tlv_parse(dec, gsm0808_att_tlvdef(), buf, len, 0, 0)
 Parse BSSAP TLV structure using tlv_parse. More...
 
#define osmo_bssap_tlv_parse2(dec, dec_multiples, buf, len)    tlv_parse2(dec, dec_multiples, gsm0808_att_tlvdef(), buf, len, 0, 0)
 Parse BSSAP TLV structure using tlv_parse2. More...
 
#define GSM0808_CELL_ID_LIST2_MAXLEN   127
 (225-1)/2 is the maximum number of elements in a cell identifier list. More...
 

Functions

struct msgbgsm0808_create_layer3 (struct msgb *msg_l3, uint16_t nc, uint16_t cc, int lac, uint16_t _ci)
 Create "Complete L3 Info" for A, legacy implementation. More...
 
struct msgbgsm0808_create_layer3_aoip (const struct msgb *msg_l3, uint16_t nc, uint16_t cc, int lac, uint16_t _ci, const struct gsm0808_speech_codec_list *scl)
 Create "Complete L3 Info" for AoIP, legacy implementation. More...
 
struct msgbgsm0808_create_layer3_2 (const struct msgb *msg_l3, const struct osmo_cell_global_id *cell, const struct gsm0808_speech_codec_list *scl)
 Create "Complete L3 Info" for AoIP. More...
 
struct msgbgsm0808_create_reset (void)
 Create BSSMAP RESET message. More...
 
struct msgbgsm0808_create_reset_ack (void)
 Create BSSMAP RESET ACK message. More...
 
struct msgbgsm0808_create_clear_command (uint8_t cause)
 Create BSSMAP Clear Command message with BSSAP header before l3h and BSSMAP in l3h. More...
 
struct msgbgsm0808_create_clear_command2 (uint8_t cause, bool csfb_ind)
 Create BSSMAP Clear Command message. More...
 
struct msgbgsm0808_create_clear_complete (void)
 Create BSSMAP Clear Complete message. More...
 
struct msgbgsm0808_create_cipher (const struct gsm0808_encrypt_info *ei, const uint8_t *cipher_response_mode)
 Create BSSMAP Cipher Mode Command message. More...
 
struct msgbgsm0808_create_cipher_complete (struct msgb *layer3, uint8_t alg_id)
 Create BSSMAP Cipher Mode Complete message. More...
 
struct msgbgsm0808_create_cipher_reject (enum gsm0808_cause cause)
 Create BSSMAP Cipher Mode Reject message. More...
 
struct msgbgsm0808_create_cipher_reject_ext (enum gsm0808_cause_class class, uint8_t ext)
 Create BSSMAP Cipher Mode Reject message. More...
 
struct msgbgsm0808_create_classmark_request ()
 Create BSSMAP Classmark Request message. More...
 
struct msgbgsm0808_create_classmark_update (const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len)
 Create BSSMAP Classmark Update message. More...
 
struct msgbgsm0808_create_sapi_reject (uint8_t link_id)
 Create BSSMAP SAPI N Reject message. More...
 
struct msgbgsm0808_create_ass (const struct gsm0808_channel_type *ct, const uint16_t *cic, const struct sockaddr_storage *ss, const struct gsm0808_speech_codec_list *scl, const uint32_t *ci)
 Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1. More...
 
struct msgbgsm0808_create_ass2 (const struct gsm0808_channel_type *ct, const uint16_t *cic, const struct sockaddr_storage *ss, const struct gsm0808_speech_codec_list *scl, const uint32_t *ci, const uint8_t *kc, const struct osmo_lcls *lcls)
 Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1. More...
 
struct msgbgsm0808_create_ass_compl (uint8_t rr_cause, uint8_t chosen_channel, uint8_t encr_alg_id, uint8_t speech_mode, const struct sockaddr_storage *ss, const struct gsm0808_speech_codec *sc, const struct gsm0808_speech_codec_list *scl)
 Create BSSMAP Assignment Completed message. More...
 
struct msgbgsm0808_create_ass_compl2 (uint8_t rr_cause, uint8_t chosen_channel, uint8_t encr_alg_id, uint8_t speech_mode, const struct sockaddr_storage *ss, const struct gsm0808_speech_codec *sc, const struct gsm0808_speech_codec_list *scl, enum gsm0808_lcls_status lcls_bss_status)
 Create BSSMAP Assignment Completed message as per 3GPP TS 48.008 §3.2.1.2. More...
 
struct msgbgsm0808_create_assignment_completed (uint8_t rr_cause, uint8_t chosen_channel, uint8_t encr_alg_id, uint8_t speech_mode)
 Create BSSMAP Assignment Completed message. More...
 
struct msgbgsm0808_create_ass_fail (uint8_t cause, const uint8_t *rr_cause, const struct gsm0808_speech_codec_list *scl)
 Create BSSMAP Assignment Failure message. More...
 
struct msgbgsm0808_create_assignment_failure (uint8_t cause, uint8_t *rr_cause)
 Create BSSMAP Assignment Failure message. More...
 
struct msgbgsm0808_create_clear_rqst (uint8_t cause)
 Create BSSMAP Clear Request message. More...
 
struct msgbgsm0808_create_paging2 (const char *imsi, const uint32_t *tmsi, const struct gsm0808_cell_id_list2 *cil, const uint8_t *chan_needed)
 Create BSSMAP PAGING message. More...
 
struct msgbgsm0808_create_paging (const char *imsi, const uint32_t *tmsi, const struct gsm0808_cell_id_list *cil, const uint8_t *chan_needed)
 DEPRECATED: Use gsm0808_create_paging2 instead. More...
 
struct msgbgsm0808_create_lcls_conn_ctrl (enum gsm0808_lcls_config config, enum gsm0808_lcls_control control)
 Create BSSMAP LCLS CONNECT CONTROL message (TS 48.008 3.2.1.91). More...
 
struct msgbgsm0808_create_lcls_conn_ctrl_ack (enum gsm0808_lcls_status status)
 Create BSSMAP LCLS CONNECT CONTROL ACK message (TS 48.008 3.2.1.92). More...
 
struct msgbgsm0808_create_lcls_notification (enum gsm0808_lcls_status status, bool break_req)
 Create BSSMAP LCLS NOTIFICATION message (TS 48.008 3.2.1.93). More...
 
struct msgbgsm0808_create_common_id (const char *imsi, const struct osmo_plmn_id *selected_plmn_id, const struct osmo_plmn_id *last_used_eutran_plnm_id)
 Create BSSMAP COMMON ID message, 3GPP TS 48.008 3.2.1.68. More...
 
struct msgbgsm0808_create_handover_required (const struct gsm0808_handover_required *params)
 Create BSSMAP HANDOVER REQUIRED message. More...
 
struct msgbgsm0808_create_handover_required_reject (const struct gsm0808_handover_required_reject *params)
 Create BSSMAP HANDOVER REQUIRED REJECT message. More...
 
struct msgbgsm0808_create_handover_request (const struct gsm0808_handover_request *params)
 Create BSSMAP HANDOVER REQUEST message, 3GPP TS 48.008 3.2.1.8. More...
 
struct msgbgsm0808_create_handover_request_ack (const uint8_t *l3_info, uint8_t l3_info_len, uint8_t chosen_channel, uint8_t chosen_encr_alg, uint8_t chosen_speech_version)
 Same as gsm0808_create_handover_request_ack2() but with less parameters. More...
 
struct msgbgsm0808_create_handover_request_ack2 (const struct gsm0808_handover_request_ack *params)
 Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.008 3.2.1.10. More...
 
struct msgbgsm0808_create_handover_command (const struct gsm0808_handover_command *params)
 Create BSSMAP HANDOVER COMMAND message, 3GPP TS 48.008 3.2.1.11. More...
 
struct msgbgsm0808_create_handover_detect ()
 Create BSSMAP HANDOVER DETECT message, 3GPP TS 48.008 3.2.1.40. More...
 
struct msgbgsm0808_create_handover_succeeded ()
 Create BSSMAP HANDOVER SUCCEEDED message, 3GPP TS 48.008 3.2.1.13. More...
 
struct msgbgsm0808_create_handover_complete (const struct gsm0808_handover_complete *params)
 Create BSSMAP HANDOVER COMPLETE message, 3GPP TS 48.008 3.2.1.12. More...
 
struct msgbgsm0808_create_handover_failure (const struct gsm0808_handover_failure *params)
 Create BSSMAP HANDOVER FAILURE message, 3GPP TS 48.008 3.2.1.16. More...
 
struct msgbgsm0808_create_handover_performed (const struct gsm0808_handover_performed *params)
 Create BSSMAP HANDOVER PERFORMED message, 3GPP TS 48.008 3.2.1.25. More...
 
struct msgbgsm0808_create_dtap (struct msgb *msg_l3, uint8_t link_id)
 Create BSSMAP DTAP message. More...
 
void gsm0808_prepend_dtap_header (struct msgb *msg, uint8_t link_id)
 Prepend a DTAP header to given Message Buffer. More...
 
const struct tlv_definitiongsm0808_att_tlvdef (void)
 
const char * gsm0808_bssmap_name (uint8_t msg_type)
 Return string name of BSSMAP Message Type. More...
 
const char * gsm0808_bssap_name (uint8_t msg_type)
 Return string name of BSSAP Message Type. More...
 
const char * gsm0808_cause_name (enum gsm0808_cause cause)
 Return string name of BSSMAP Cause name. More...
 
const char * gsm0808_cause_class_name (enum gsm0808_cause_class class)
 Return string name of BSSMAP Cause Class name. More...
 
enum gsm0808_cause gsm0808_get_cause (const struct tlv_parsed *tp)
 Parse Cause TLV 3GPP TS 08.08 §3.2.2.5. More...
 
const char * gsm0808_diagnostics_octet_location_str (uint8_t pointer)
 
const char * gsm0808_diagnostics_bit_location_str (uint8_t bit_pointer)
 
static const char * gsm0808_lcls_config_name (enum gsm0808_lcls_config val)
 
static const char * gsm0808_lcls_control_name (enum gsm0808_lcls_control val)
 
static const char * gsm0808_lcls_status_name (enum gsm0808_lcls_status val)
 
char * osmo_lcls_dump (const struct osmo_lcls *lcls)
 Dump LCLS parameters (GCR excluded) into static string buffer for printing. More...
 
char * osmo_lcls_dump_buf (char *buf, size_t buf_len, const struct osmo_lcls *lcls)
 Dump LCLS parameters (GCR excluded) into string for printing. More...
 
char * osmo_lcls_dump_c (void *ctx, const struct osmo_lcls *lcls)
 
char * osmo_gcr_dump (const struct osmo_lcls *lcls)
 Dump GCR struct into static string buffer for printing. More...
 
char * osmo_gcr_dump_buf (char *buf, size_t buf_len, const struct osmo_lcls *lcls)
 Dump GCR struct into string for printing. More...
 
static const char * gsm0808_cell_id_discr_name (enum CELL_IDENT id_discr)
 
const char * gsm0808_cell_id_name (const struct gsm0808_cell_id *cid)
 Return a human readable representation of a Cell Identifier, like "LAC:123" or "CGI:001-01-42-23". More...
 
const char * gsm0808_cell_id_name2 (const struct gsm0808_cell_id *cid)
 Like gsm0808_cell_id_name() but uses a different static buffer. More...
 
char * gsm0808_cell_id_name_buf (char *buf, size_t buflen, const struct gsm0808_cell_id *cid)
 
char * gsm0808_cell_id_name_c (const void *ctx, const struct gsm0808_cell_id *cid)
 
const char * gsm0808_cell_id_list_name (const struct gsm0808_cell_id_list2 *cil)
 Return a human-readable representation of cil in a static buffer. More...
 
int gsm0808_cell_id_list_name_buf (char *buf, size_t buflen, const struct gsm0808_cell_id_list2 *cil)
 Return a human readable representation of the Cell Identifier List, like "LAC[2]:{123, 456}". More...
 
char * gsm0808_cell_id_list_name_c (const void *ctx, const struct gsm0808_cell_id_list2 *cil)
 
int gsm0808_cell_id_u_name (char *buf, size_t buflen, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u)
 Print a human readable name of the cell identifier to the char buffer. More...
 
bool gsm0808_cell_ids_match (const struct gsm0808_cell_id *id1, const struct gsm0808_cell_id *id2, bool exact_match)
 Return true if the common information between the two Cell Identifiers match. More...
 
int gsm0808_cell_id_matches_list (const struct gsm0808_cell_id *id, const struct gsm0808_cell_id_list2 *list, unsigned int match_nr, bool exact_match)
 Find an index in a Cell Identifier list that matches a given single Cell Identifer. More...
 
void gsm0808_cell_id_from_cgi (struct gsm0808_cell_id *cid, enum CELL_IDENT id_discr, const struct osmo_cell_global_id *cgi)
 Copy information from a CGI to form a Cell Identifier of the specified kind. More...
 
int gsm0808_cell_id_to_cgi (struct osmo_cell_global_id *cgi, const struct gsm0808_cell_id *cid)
 Overwrite parts of cgi with values from a Cell Identifier. More...
 
void gsm0808_msgb_put_cell_id_u (struct msgb *msg, enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u)
 
int gsm0808_decode_cell_id_u (union gsm0808_cell_id_u *out, enum CELL_IDENT discr, const uint8_t *buf, unsigned int len)
 Decode a single GSM 08.08 Cell ID list element payload. More...
 
int gsm0808_cell_id_size (enum CELL_IDENT discr)
 
uint8_t gsm0808_enc_cause (struct msgb *msg, uint16_t cause)
 
uint8_t gsm0808_enc_aoip_trasp_addr (struct msgb *msg, const struct sockaddr_storage *ss)
 
int gsm0808_dec_aoip_trasp_addr (struct sockaddr_storage *ss, const uint8_t *elem, uint8_t len)
 
int gsm0808_dec_osmux_cid (uint8_t *cid, const uint8_t *elem, uint8_t len)
 
uint8_t gsm0808_enc_lcls (struct msgb *msg, const struct osmo_lcls *lcls)
 Add LCLS parameters to a given msgb, 3GPP TS 48.008 §3.2.2.115 - 3.2.2.120. More...
 
int gsm0808_dec_lcls (struct osmo_lcls *lcls, const struct tlv_parsed *tp)
 Decode LCLS parameters to a given msgb, 3GPP TS 48.008 §3.2.2.115 - 3.2.2.120. More...
 
uint8_t gsm0808_enc_speech_codec (struct msgb *msg, const struct gsm0808_speech_codec *sc)
 Encode TS 08.08 Speech Codec IE. More...
 
int gsm0808_dec_speech_codec (struct gsm0808_speech_codec *sc, const uint8_t *elem, uint8_t len)
 Decode TS 08.08 Speech Codec IE. More...
 
uint8_t gsm0808_enc_speech_codec_list (struct msgb *msg, const struct gsm0808_speech_codec_list *scl)
 Encode TS 08.08 Speech Codec list. More...
 
int gsm0808_dec_speech_codec_list (struct gsm0808_speech_codec_list *scl, const uint8_t *elem, uint8_t len)
 Decode TS 08.08 Speech Codec list IE. More...
 
uint8_t gsm0808_enc_channel_type (struct msgb *msg, const struct gsm0808_channel_type *ct)
 Encode TS 08.08 Channel Type IE. More...
 
int gsm0808_dec_channel_type (struct gsm0808_channel_type *ct, const uint8_t *elem, uint8_t len)
 Decode TS 08.08 Channel Type IE. More...
 
uint8_t gsm0808_enc_encrypt_info (struct msgb *msg, const struct gsm0808_encrypt_info *ei)
 Encode TS 08.08 Encryption Information IE. More...
 
int gsm0808_dec_encrypt_info (struct gsm0808_encrypt_info *ei, const uint8_t *elem, uint8_t len)
 Decode TS 08.08 Encryption Information IE. More...
 
uint8_t gsm0808_enc_cell_id_list2 (struct msgb *msg, const struct gsm0808_cell_id_list2 *cil)
 Encode TS 08.08 Cell Identifier List IE. More...
 
uint8_t gsm0808_enc_cell_id_list (struct msgb *msg, const struct gsm0808_cell_id_list *cil) OSMO_DEPRECATED("use gsm0808_enc_cell_id_list2 instead")
 DEPRECATED: Use gsm0808_enc_cell_id_list2 instead. More...
 
int gsm0808_dec_cell_id_list2 (struct gsm0808_cell_id_list2 *cil, const uint8_t *elem, uint8_t len)
 Decode Cell Identifier List IE. More...
 
int gsm0808_dec_cell_id_list (struct gsm0808_cell_id_list *cil, const uint8_t *elem, uint8_t len) OSMO_DEPRECATED("use gsm0808_dec_cell_id_list2 instead")
 DEPRECATED: Use gsm0808_dec_cell_id_list2 instead. More...
 
int gsm0808_cell_id_list_add (struct gsm0808_cell_id_list2 *dst, const struct gsm0808_cell_id_list2 *src)
 Append entries from one Cell Identifier List to another. More...
 
void gsm0808_cell_id_to_list (struct gsm0808_cell_id_list2 *dst, const struct gsm0808_cell_id *src)
 Convert a single Cell Identifier to a Cell Identifier List with one entry. More...
 
uint8_t gsm0808_enc_cell_id (struct msgb *msg, const struct gsm0808_cell_id *ci)
 Encode Cell Identifier IE (3GPP TS 48.008 3.2.2.17). More...
 
int gsm0808_dec_cell_id (struct gsm0808_cell_id *ci, const uint8_t *elem, uint8_t len)
 Decode Cell Identifier IE (3GPP TS 48.008 3.2.2.17). More...
 
int gsm0808_chan_type_to_speech_codec (uint8_t perm_spch)
 Convert the representation of the permitted speech codec identifier that is used in struct gsm0808_channel_type to the speech codec representation we use in struct gsm0808_speech_codec. More...
 
int gsm0808_speech_codec_from_chan_type (struct gsm0808_speech_codec *sc, uint8_t perm_spch)
 Extrapolate a speech codec field from a given permitted speech parameter (channel type). More...
 
uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg (const struct gsm48_multi_rate_conf *cfg, bool fr)
 Determine a set of AMR speech codec configuration bits (S0-S15) from a given GSM 04.08 AMR configuration struct. More...
 
int gsm48_mr_cfg_from_gsm0808_sc_cfg (struct gsm48_multi_rate_conf *cfg, uint16_t s15_s0)
 Determine a GSM 04.08 AMR configuration struct from a set of speech codec configuration bits (S0-S15) More...
 
static enum gsm0808_cause_class gsm0808_cause_class (enum gsm0808_cause cause)
 
static bool gsm0808_cause_ext (enum gsm0808_cause cause)
 
int gsm0808_get_cipher_reject_cause (const struct tlv_parsed *tp) OSMO_DEPRECATED("Use gsm0808_get_cause() instead")
 
static uint8_t gsm0808_current_channel_type_1 (enum gsm_chan_t type)
 
static enum gsm0808_permitted_speech gsm0808_permitted_speech (enum gsm_chan_t type, enum gsm48_chan_mode mode)
 Return 3GPP TS 48.008 3.2.2.51 Speech Version aka permitted speech version indication in 3.2.2.11 Channel Type. More...
 
static uint8_t gsm0808_chosen_channel (enum gsm_chan_t type, enum gsm48_chan_mode mode)
 Return 3GPP TS 48.008 3.2.2.33 Chosen Channel. More...
 
const char * gsm0808_channel_type_name (const struct gsm0808_channel_type *ct)
 
char * gsm0808_channel_type_name_buf (char *buf, size_t buf_len, const struct gsm0808_channel_type *ct)
 
char * gsm0808_channel_type_name_c (const void *ctx, const struct gsm0808_channel_type *ct)
 
static uint8_t put_old_bss_to_new_bss_information (struct msgb *msg, const struct gsm0808_old_bss_to_new_bss_info *i)
 

Variables

struct msgb to not lose leading zeros in the MNC
 
const struct value_string gsm0808_lcls_config_names []
 
const struct value_string gsm0808_lcls_control_names []
 
const struct value_string gsm0808_lcls_status_names []
 
const struct value_string gsm0808_cell_id_discr_names []
 value_string[] for enum CELL_IDENT. More...
 
static __thread char str_buff [512]
 Char buffer to return strings from functions. More...
 
static const struct tlv_definition bss_att_tlvdef
 
const struct value_string gsm0406_dlci_sapi_names []
 
static const struct value_string gsm0808_msgt_names []
 
static const struct value_string gsm0808_bssap_names []
 
const struct value_string gsm0808_speech_codec_type_names []
 
const struct value_string gsm0808_permitted_speech_names []
 
const struct value_string gsm0808_chosen_enc_alg_names []
 
static const struct value_string gsm0808_cause_names []
 
static const struct value_string gsm0808_cause_class_names []
 
const struct value_string gsm0808_lcls_config_names []
 
const struct value_string gsm0808_lcls_control_names []
 
const struct value_string gsm0808_lcls_status_names []
 

Detailed Description

Macro Definition Documentation

◆ BSSMAP_MSG_HEADROOM

#define BSSMAP_MSG_HEADROOM   512

◆ BSSMAP_MSG_SIZE

#define BSSMAP_MSG_SIZE   1024

◆ GSM0808_CELL_ID_LIST2_MAXLEN

#define GSM0808_CELL_ID_LIST2_MAXLEN   127

(225-1)/2 is the maximum number of elements in a cell identifier list.

◆ osmo_bssap_tlv_parse

#define osmo_bssap_tlv_parse (   dec,
  buf,
  len 
)    tlv_parse(dec, gsm0808_att_tlvdef(), buf, len, 0, 0)

Parse BSSAP TLV structure using tlv_parse.

◆ osmo_bssap_tlv_parse2

#define osmo_bssap_tlv_parse2 (   dec,
  dec_multiples,
  buf,
  len 
)     tlv_parse2(dec, dec_multiples, gsm0808_att_tlvdef(), buf, len, 0, 0)

Parse BSSAP TLV structure using tlv_parse2.

Function Documentation

◆ gsm0808_att_tlvdef()

const struct tlv_definition * gsm0808_att_tlvdef ( void  )

◆ gsm0808_bssap_name()

const char * gsm0808_bssap_name ( uint8_t  msg_type)

Return string name of BSSAP Message Type.

◆ gsm0808_bssmap_name()

const char * gsm0808_bssmap_name ( uint8_t  msg_type)

Return string name of BSSMAP Message Type.

References get_value_string(), gsm0808_msgt_names, and msg_type.

◆ gsm0808_cause_class()

static enum gsm0808_cause_class gsm0808_cause_class ( enum gsm0808_cause  cause)
inlinestatic
Returns
3GPP TS 08.08 §3.2.2.5 Class of a given Cause

◆ gsm0808_cause_class_name()

const char * gsm0808_cause_class_name ( enum gsm0808_cause_class  class)

Return string name of BSSMAP Cause Class name.

References get_value_string(), and gsm0808_cause_class_names.

◆ gsm0808_cause_ext()

static bool gsm0808_cause_ext ( enum gsm0808_cause  cause)
inlinestatic
Returns
true if 3GPP TS 08.08 §3.2.2.5 Class has extended bit set

References cause.

◆ gsm0808_cause_name()

const char * gsm0808_cause_name ( enum gsm0808_cause  cause)

Return string name of BSSMAP Cause name.

◆ gsm0808_cell_id_discr_name()

static const char* gsm0808_cell_id_discr_name ( enum CELL_IDENT  id_discr)
inlinestatic

◆ gsm0808_cell_id_from_cgi()

void gsm0808_cell_id_from_cgi ( struct gsm0808_cell_id cid,
enum CELL_IDENT  id_discr,
const struct osmo_cell_global_id cgi 
)

◆ gsm0808_cell_id_list_add()

int gsm0808_cell_id_list_add ( struct gsm0808_cell_id_list2 dst,
const struct gsm0808_cell_id_list2 src 
)

Append entries from one Cell Identifier List to another.

The cell identifier types must be identical between the two lists.

Parameters
dst[out]Append entries to this list.
src[in]Append these entries to dst.
Returns
the nr of items added, or negative on error: -EINVAL if the id_discr mismatch between the lists, -ENOSPC if the destination list does not have enough space. If an error is returned, dst may have already been changed (particularly on -ENOSPC). Note that a return value of zero may occur when the src->id_list_len is zero, or when all entries from src already exist in dst, and does not indicate error per se.

References ARRAY_SIZE, CELL_IDENT_BSS, msgb::dst, gsm0808_cell_id_list2::id_discr, gsm0808_cell_id_list2::id_list, gsm0808_cell_id_list2::id_list_len, and same_cell_id_list_entries().

◆ gsm0808_cell_id_list_name()

const char* gsm0808_cell_id_list_name ( const struct gsm0808_cell_id_list2 cil)

Return a human-readable representation of cil in a static buffer.

If the list is too long, the output may be truncated. See also gsm0808_cell_id_list_name_buf().

References gsm0808_cell_id_list_name_buf().

◆ gsm0808_cell_id_list_name_buf()

int gsm0808_cell_id_list_name_buf ( char *  buf,
size_t  buflen,
const struct gsm0808_cell_id_list2 cil 
)

Return a human readable representation of the Cell Identifier List, like "LAC[2]:{123, 456}".

The return value semantics are like snprintf() and thus allow ensuring a complete untruncated string by determining the required string length from the return value. If buflen > 0, always nul-terminate the string in buf, also when it is truncated. If buflen == 0, do not modify buf, just return the would-be length.

Parameters
[out]bufDestination buffer to write string representation to.
[in]buflenAmount of memory available in buf.
[in]cilCell Identifer List.
Returns
Like snprintf(): the amount of characters (excluding terminating nul) written, or that would have been written if the buffer were large enough.

References APPEND_CELL_ID_U, APPEND_STR, CELL_IDENT_BSS, CELL_IDENT_NO_CELL, gsm0808_cell_id_discr_name(), gsm0808_cell_id_list2::id_discr, gsm0808_cell_id_list2::id_list, and gsm0808_cell_id_list2::id_list_len.

Referenced by gsm0808_cell_id_list_name(), and gsm0808_cell_id_list_name_c().

◆ gsm0808_cell_id_list_name_c()

char* gsm0808_cell_id_list_name_c ( const void *  ctx,
const struct gsm0808_cell_id_list2 cil 
)

◆ gsm0808_cell_id_matches_list()

int gsm0808_cell_id_matches_list ( const struct gsm0808_cell_id id,
const struct gsm0808_cell_id_list2 list,
unsigned int  match_nr,
bool  exact_match 
)

Find an index in a Cell Identifier list that matches a given single Cell Identifer.

Compare id against each entry in list using gsm0808_cell_ids_match(), and return the list index if a match is found. match_nr allows iterating all matches in the list. A match_nr <= 0 returns the first match in the list, match_nr == 1 the second match, etc., and if match_nr exceeds the available matches in the list, -1 is returned.

Parameters
[in]idCell Identifier to match.
[in]listCell Identifier list to search in.
[in]match_nrIgnore this many matches.
[in]exact_matchIf true, consider as match only if the CELL_IDENT types and all values are identical.
Returns
-1 if no match is found, list index if a match is found (i.e. rc == 0 means a match was found on the first entry).

References gsm0808_cell_id_u_match(), gsm0808_cell_id::id, gsm0808_cell_id_list2::id_discr, gsm0808_cell_id::id_discr, gsm0808_cell_id_list2::id_list, and gsm0808_cell_id_list2::id_list_len.

◆ gsm0808_cell_id_name()

const char* gsm0808_cell_id_name ( const struct gsm0808_cell_id cid)

Return a human readable representation of a Cell Identifier, like "LAC:123" or "CGI:001-01-42-23".

Parameters
[in]cidCell Identifer.
Returns
String in a static buffer.

References gsm0808_cell_id_name_buf().

◆ gsm0808_cell_id_name2()

const char* gsm0808_cell_id_name2 ( const struct gsm0808_cell_id cid)

Like gsm0808_cell_id_name() but uses a different static buffer.

Parameters
[in]cidCell Identifer.
Returns
String in a static buffer.

References gsm0808_cell_id_name_buf().

◆ gsm0808_cell_id_name_buf()

char* gsm0808_cell_id_name_buf ( char *  buf,
size_t  buflen,
const struct gsm0808_cell_id cid 
)

◆ gsm0808_cell_id_name_c()

char* gsm0808_cell_id_name_c ( const void *  ctx,
const struct gsm0808_cell_id cid 
)

◆ gsm0808_cell_id_size()

◆ gsm0808_cell_id_to_cgi()

int gsm0808_cell_id_to_cgi ( struct osmo_cell_global_id cgi,
const struct gsm0808_cell_id cid 
)

Overwrite parts of cgi with values from a Cell Identifier.

Place only those items given in cid into cgi, leaving other values unchanged.

Parameters
[out]cgiCell Global Identity to write to.
[in]cidCell Identity to read from.
Returns
a bitmask of items that were set: OSMO_CGI_PART_PLMN | OSMO_CGI_PART_LAC | OSMO_CGI_PART_CI; 0 if nothing was written to cgi.

References CELL_IDENT_BSS, CELL_IDENT_CI, CELL_IDENT_LAC, CELL_IDENT_LAC_AND_CI, CELL_IDENT_LAI, CELL_IDENT_NO_CELL, CELL_IDENT_UTRAN_LAC_RNC, CELL_IDENT_UTRAN_PLMN_LAC_RNC, CELL_IDENT_UTRAN_RNC, CELL_IDENT_WHOLE_GLOBAL, osmo_cell_global_id::cell_identity, gsm0808_cell_id_u::ci, osmo_lac_and_ci_id::ci, gsm0808_cell_id_u::global, gsm0808_cell_id::id, gsm0808_cell_id::id_discr, gsm0808_cell_id_u::lac, osmo_location_area_id::lac, osmo_lac_and_ci_id::lac, gsm0808_cell_id_u::lac_and_ci, osmo_cell_global_id::lai, gsm0808_cell_id_u::lai_and_lac, OSMO_CGI_PART_CI, OSMO_CGI_PART_LAC, and OSMO_CGI_PART_PLMN.

◆ gsm0808_cell_id_to_list()

void gsm0808_cell_id_to_list ( struct gsm0808_cell_id_list2 dst,
const struct gsm0808_cell_id src 
)

Convert a single Cell Identifier to a Cell Identifier List with one entry.

Parameters
dst[out]Overwrite this list.
src[in]Set dst to contain exactly this item.

References CELL_IDENT_BSS, CELL_IDENT_NO_CELL, msgb::dst, gsm0808_cell_id::id, gsm0808_cell_id::id_discr, gsm0808_cell_id_list2::id_discr, and gsm0808_cell_id_list2::id_list_len.

◆ gsm0808_cell_id_u_name()

int gsm0808_cell_id_u_name ( char *  buf,
size_t  buflen,
enum CELL_IDENT  id_discr,
const union gsm0808_cell_id_u u 
)

Print a human readable name of the cell identifier to the char buffer.

This is useful both for struct gsm0808_cell_id and struct gsm0808_cell_id_list2. See also gsm0808_cell_id_name() and gsm0808_cell_id_list_name().

Parameters
[out]bufDestination buffer to write string representation to.
[in]buflenAmount of memory available in buf.
[in]id_discrCell Identifier type.
[in]uCell Identifer value.
Returns
Like snprintf(): the amount of characters (excluding terminating nul) written, or that would have been written if the buffer were large enough.

References CELL_IDENT_CI, CELL_IDENT_LAC, CELL_IDENT_LAC_AND_CI, CELL_IDENT_LAI_AND_LAC, CELL_IDENT_WHOLE_GLOBAL, gsm0808_cell_id_u::ci, osmo_lac_and_ci_id::ci, gsm0808_cell_id_u::global, gsm0808_cell_id_discr_name(), gsm0808_cell_id_list2::id_discr, gsm0808_cell_id_u::lac, osmo_lac_and_ci_id::lac, gsm0808_cell_id_u::lac_and_ci, gsm0808_cell_id_u::lai_and_lac, osmo_cgi_name(), and osmo_lai_name().

◆ gsm0808_cell_ids_match()

bool gsm0808_cell_ids_match ( const struct gsm0808_cell_id id1,
const struct gsm0808_cell_id id2,
bool  exact_match 
)

Return true if the common information between the two Cell Identifiers match.

For example, if a LAC+CI is compared to LAC, return true if the LAC are the same. Note that CELL_IDENT_NO_CELL will always return false. Also CELL_IDENT_BSS will always return false, since this function cannot possibly know the bounds of the BSS, so the caller must handle CELL_IDENT_BSS specially.

Parameters
[in]id1Cell Identifier.
[in]id2Other Cell Identifier.
[in]exact_matchIf true, return true only if the CELL_IDENT types and all values are identical.
Returns
True if the common fields of the above match.

References gsm0808_cell_id_u_match(), gsm0808_cell_id::id, and gsm0808_cell_id::id_discr.

◆ gsm0808_chan_type_to_speech_codec()

int gsm0808_chan_type_to_speech_codec ( uint8_t  perm_spch)

Convert the representation of the permitted speech codec identifier that is used in struct gsm0808_channel_type to the speech codec representation we use in struct gsm0808_speech_codec.

Parameters
[in]perm_spchto be converted (see also gsm0808_permitted_speech)
Returns
GSM speech codec type; negative on error

The speech codec type, which is used in the channel type field to signal the permitted speech versions (codecs) has a different encoding than the type field in the speech codec type element (See also 3GPP TS 48.008, 3.2.2.11 and 3.2.2.103)

References GSM0808_PERM_FR1, GSM0808_PERM_FR2, GSM0808_PERM_FR3, GSM0808_PERM_FR4, GSM0808_PERM_FR5, GSM0808_PERM_HR1, GSM0808_PERM_HR3, GSM0808_PERM_HR4, GSM0808_PERM_HR6, GSM0808_SCT_FR1, GSM0808_SCT_FR2, GSM0808_SCT_FR3, GSM0808_SCT_FR4, GSM0808_SCT_FR5, GSM0808_SCT_HR1, GSM0808_SCT_HR3, GSM0808_SCT_HR4, and GSM0808_SCT_HR6.

Referenced by gsm0808_speech_codec_from_chan_type().

◆ gsm0808_channel_type_name()

const char* gsm0808_channel_type_name ( const struct gsm0808_channel_type ct)

◆ gsm0808_channel_type_name_buf()

◆ gsm0808_channel_type_name_c()

char* gsm0808_channel_type_name_c ( const void *  ctx,
const struct gsm0808_channel_type ct 
)

◆ gsm0808_chosen_channel()

static uint8_t gsm0808_chosen_channel ( enum gsm_chan_t  type,
enum gsm48_chan_mode  mode 
)
inlinestatic

◆ gsm0808_create_ass()

struct msgb * gsm0808_create_ass ( const struct gsm0808_channel_type ct,
const uint16_t *  cic,
const struct sockaddr_storage *  ss,
const struct gsm0808_speech_codec_list scl,
const uint32_t *  ci 
)

Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1.

Parameters
[in]ctChannel Type
[in]cicCircuit Identity Code (Classic A only)
[in]ssSocket Address of MSC-side RTP socket (AoIP only)
[in]sclSpeech Codec List (AoIP only)
[in]ciCall Identifier (Optional), §3.2.2.105
Returns
callee-allocated msgb with BSSMAP Assignment Request message

References gsm0808_create_ass2().

◆ gsm0808_create_ass2()

struct msgb * gsm0808_create_ass2 ( const struct gsm0808_channel_type ct,
const uint16_t *  cic,
const struct sockaddr_storage *  ss,
const struct gsm0808_speech_codec_list scl,
const uint32_t *  ci,
const uint8_t *  kc,
const struct osmo_lcls lcls 
)

Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1.

This is identical to gsm0808_create_ass(), but adds KC and LCLS IEs.

Parameters
[in]ctChannel Type
[in]cicCircuit Identity Code (Classic A only)
[in]ssSocket Address of MSC-side RTP socket (AoIP only)
[in]sclSpeech Codec List (AoIP only)
[in]ciCall Identifier (Optional), §3.2.2.105
[in]kcKc128 ciphering key (Optional, A5/4), §3.2.2.109
[in]lclsOptional LCLS parameters
Returns
callee-allocated msgb with BSSMAP Assignment Request message

References BSS_MAP_MSG_ASSIGMENT_RQST, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_enc_aoip_trasp_addr(), gsm0808_enc_channel_type(), gsm0808_enc_lcls(), gsm0808_enc_speech_codec_list(), GSM0808_IE_CALL_ID, GSM0808_IE_CIRCUIT_IDENTITY_CODE, GSM0808_IE_KC_128, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_fixed_put(), msgb_tv_push(), msgb_v_put(), OSMO_ASSERT, and osmo_htons.

Referenced by gsm0808_create_ass().

◆ gsm0808_create_ass_compl()

struct msgb * gsm0808_create_ass_compl ( uint8_t  rr_cause,
uint8_t  chosen_channel,
uint8_t  encr_alg_id,
uint8_t  speech_mode,
const struct sockaddr_storage *  ss,
const struct gsm0808_speech_codec sc,
const struct gsm0808_speech_codec_list scl 
)

Create BSSMAP Assignment Completed message.

Parameters
[in]rr_causeGSM 04.08 RR Cause value
[in]chosen_channelChosen Channel
[in]encr_alg_idEncryption Algorithm ID
[in]speech_modeSpeech Mode
[in]ssSocket Address of BSS-side RTP socket
[in]scSpeech Codec (current)
[in]sclSpeech Codec List (permitted)
Returns
callee-allocated msgb with BSSMAP Assignment Complete message

References gsm0808_create_ass_compl2(), GSM0808_LCLS_STS_NA, and rr_cause.

◆ gsm0808_create_ass_compl2()

struct msgb * gsm0808_create_ass_compl2 ( uint8_t  rr_cause,
uint8_t  chosen_channel,
uint8_t  encr_alg_id,
uint8_t  speech_mode,
const struct sockaddr_storage *  ss,
const struct gsm0808_speech_codec sc,
const struct gsm0808_speech_codec_list scl,
enum gsm0808_lcls_status  lcls_bss_status 
)

Create BSSMAP Assignment Completed message as per 3GPP TS 48.008 §3.2.1.2.

Parameters
[in]rr_causeGSM 04.08 RR Cause value
[in]chosen_channelChosen Channel
[in]encr_alg_idEncryption Algorithm ID
[in]speech_modeSpeech Mode
[in]ssSocket Address of BSS-side RTP socket
[in]scSpeech Codec (current)
[in]sclSpeech Codec List (permitted)
[in]lcls_bss_status§3.2.2.119 LCLS-BSS-Status, optional
Returns
callee-allocated msgb with BSSMAP Assignment Complete message

References BSS_MAP_MSG_ASSIGMENT_COMPLETE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_enc_aoip_trasp_addr(), gsm0808_enc_speech_codec(), gsm0808_enc_speech_codec_list(), GSM0808_IE_CHOSEN_CHANNEL, GSM0808_IE_CHOSEN_ENCR_ALG, GSM0808_IE_LCLS_BSS_STATUS, GSM0808_IE_RR_CAUSE, GSM0808_IE_SPEECH_VERSION, GSM0808_LCLS_STS_NA, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), msgb_tv_put(), msgb_v_put(), and rr_cause.

Referenced by gsm0808_create_ass_compl(), and gsm0808_create_assignment_completed().

◆ gsm0808_create_ass_fail()

struct msgb * gsm0808_create_ass_fail ( uint8_t  cause,
const uint8_t *  rr_cause,
const struct gsm0808_speech_codec_list scl 
)

Create BSSMAP Assignment Failure message.

Parameters
[in]causeBSSMAP Cause value
[in]rr_causeGSM 04.08 RR Cause value
[in]sclOptional Speech Cdec List (AoIP)
Returns
callee-allocated msgb with BSSMAP Assignment Failure message

References BSS_MAP_MSG_ASSIGMENT_FAILURE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, cause, gsm0808_enc_cause(), gsm0808_enc_speech_codec_list(), GSM0808_IE_RR_CAUSE, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), msgb_tv_put(), msgb_v_put(), and rr_cause.

Referenced by gsm0808_create_assignment_failure().

◆ gsm0808_create_assignment_completed()

struct msgb * gsm0808_create_assignment_completed ( uint8_t  rr_cause,
uint8_t  chosen_channel,
uint8_t  encr_alg_id,
uint8_t  speech_mode 
)

Create BSSMAP Assignment Completed message.

Parameters
[in]rr_causeGSM 04.08 RR Cause value
[in]chosen_channelChosen Channel
[in]encr_alg_idEncryption Algorithm ID
[in]speech_modeSpeech Mode
Returns
callee-allocated msgb with BSSMAP Assignment Complete message

References gsm0808_create_ass_compl2(), GSM0808_LCLS_STS_NA, and rr_cause.

◆ gsm0808_create_assignment_failure()

struct msgb * gsm0808_create_assignment_failure ( uint8_t  cause,
uint8_t *  rr_cause 
)

Create BSSMAP Assignment Failure message.

Parameters
[in]causeBSSMAP Cause value
[in]rr_causeGSM 04.08 RR Cause value
Returns
callee-allocated msgb with BSSMAP Assignment Failure message

References cause, gsm0808_create_ass_fail(), and rr_cause.

◆ gsm0808_create_cipher()

struct msgb * gsm0808_create_cipher ( const struct gsm0808_encrypt_info ei,
const uint8_t *  cipher_response_mode 
)

Create BSSMAP Cipher Mode Command message.

Parameters
[in]eiMandatory Encryption Information
[in]cipher_response_modeoptional 1-byte Cipher Response Mode
Returns
callee-allocated msgb with BSSMAP Cipher Mode Command message

References BSS_MAP_MSG_CIPHER_MODE_CMD, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_enc_encrypt_info(), GSM0808_IE_CIPHER_RESPONSE_MODE, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), msgb_tv_put(), msgb_v_put(), and OSMO_ASSERT.

◆ gsm0808_create_cipher_complete()

struct msgb * gsm0808_create_cipher_complete ( struct msgb layer3,
uint8_t  alg_id 
)

Create BSSMAP Cipher Mode Complete message.

Parameters
[in]layer3L3 Message to be included
[in]alg_idChosen Encrpytion Algorithm
Returns
callee-allocated msgb with BSSMAP Cipher Mode Complete message

References BSS_MAP_MSG_CIPHER_MODE_COMPLETE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_CHOSEN_ENCR_ALG, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS, msgb::l3h, msg, msgb_alloc_headroom(), msgb_l3len(), msgb_length(), msgb_tlv_put(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().

◆ gsm0808_create_cipher_reject()

struct msgb * gsm0808_create_cipher_reject ( enum gsm0808_cause  cause)

Create BSSMAP Cipher Mode Reject message.

Parameters
[in]cause3GPP TS 08.08 §3.2.2.5 cause value
Returns
callee-allocated msgb with BSSMAP Cipher Mode Reject message

References BSS_MAP_MSG_CIPHER_MODE_REJECT, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, cause, gsm0808_enc_cause(), msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_cipher_reject_ext()

struct msgb * gsm0808_create_cipher_reject_ext ( enum gsm0808_cause_class  class,
uint8_t  ext 
)

Create BSSMAP Cipher Mode Reject message.

Parameters
[in]class3GPP TS 08.08 §3.2.2.5 cause's class
[in]ext3GPP TS 08.08 §3.2.2.5 cause value (national application extension)
Returns
callee-allocated msgb with BSSMAP Cipher Mode Reject message

References BSS_MAP_MSG_CIPHER_MODE_REJECT, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, cause, gsm0808_enc_cause(), msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_classmark_request()

struct msgb * gsm0808_create_classmark_request ( )

Create BSSMAP Classmark Request message.

Returns
callee-allocated msgb with BSSMAP Classmark Request message

References BSS_MAP_MSG_CLASSMARK_RQST, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_classmark_update()

struct msgb * gsm0808_create_classmark_update ( const uint8_t *  cm2,
uint8_t  cm2_len,
const uint8_t *  cm3,
uint8_t  cm3_len 
)

Create BSSMAP Classmark Update message.

Parameters
[in]cm2Classmark 2
[in]cm2_lenlength (in octets) of cm2
[in]cm3Classmark 3
[in]cm3_lenlength (in octets) of cm3
Returns
callee-allocated msgb with BSSMAP Classmark Update message

References BSS_MAP_MSG_CLASSMARK_UPDATE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, cm2, cm2_len, GSM0808_IE_CLASSMARK_INFORMATION_T2, GSM0808_IE_CLASSMARK_INFORMATION_T3, msg, msgb_alloc_headroom(), msgb_length(), msgb_tlv_put(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_clear_command()

struct msgb * gsm0808_create_clear_command ( uint8_t  cause)

Create BSSMAP Clear Command message with BSSAP header before l3h and BSSMAP in l3h.

This is quite different from most (all?) other gsm0808_create_* which have l3h point to the BSSAP header. However, we have to keep this for backwards compatibility. Use gsm0808_create_clear_command2() for a 'modern' implementation.

Parameters
[in]causeTS 08.08 cause value
Returns
callee-allocated msgb with BSSMAP Clear Command message

References BSS_MAP_MSG_CLEAR_CMD, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, cause, gsm0808_enc_cause(), msg, msgb_alloc_headroom(), msgb_tv_put(), and msgb_v_put().

◆ gsm0808_create_clear_command2()

struct msgb * gsm0808_create_clear_command2 ( uint8_t  cause,
bool  csfb_ind 
)

Create BSSMAP Clear Command message.

Parameters
[in]causeTS 08.08 cause value.
[in]csfb_indindicate that the call was established in an CSFB context.
Returns
callee-allocated msgb with BSSMAP Clear Command message.

References BSS_MAP_MSG_CLEAR_CMD, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, cause, gsm0808_enc_cause(), GSM0808_IE_CSFB_INDICATION, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_clear_complete()

struct msgb * gsm0808_create_clear_complete ( void  )

Create BSSMAP Clear Complete message.

Returns
callee-allocated msgb with BSSMAP Clear Complete message

References BSS_MAP_MSG_CLEAR_COMPLETE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, msg, msgb_alloc_headroom(), and msgb_tlv_put().

◆ gsm0808_create_clear_rqst()

struct msgb * gsm0808_create_clear_rqst ( uint8_t  cause)

Create BSSMAP Clear Request message.

Parameters
[in]causeBSSMAP Cause value
Returns
callee-allocated msgb with BSSMAP Clear Request message

References BSS_MAP_MSG_CLEAR_RQST, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, cause, gsm0808_enc_cause(), msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_common_id()

struct msgb * gsm0808_create_common_id ( const char *  imsi,
const struct osmo_plmn_id selected_plmn_id,
const struct osmo_plmn_id last_used_eutran_plnm_id 
)

Create BSSMAP COMMON ID message, 3GPP TS 48.008 3.2.1.68.

Parameters
[in]imsiIMSI digits (decimal string).
[in]selected_plmn_idSelected PLMN ID to encode, or NULL to not encode this IE.
[in]last_used_eutran_plnm_idLast used E-UTRAN PLMN ID to encode, or NULL to not encode this IE.
Returns
callee-allocated msgb with BSSMAP COMMON ID message, or NULL if encoding failed.

References BSS_MAP_MSG_COMMON_ID, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_IMSI, GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID, GSM0808_IE_SELECTED_PLMN_ID, GSM_MI_TYPE_IMSI, mi, msg, msgb_alloc_headroom(), msgb_free(), msgb_length(), msgb_put(), msgb_tl_put(), msgb_tv_push(), msgb_v_put(), osmo_mobile_identity_encode_msgb(), osmo_plmn_to_bcd(), and OSMO_STRLCPY_ARRAY.

◆ gsm0808_create_dtap()

struct msgb * gsm0808_create_dtap ( struct msgb msg_l3,
uint8_t  link_id 
)

Create BSSMAP DTAP message.

Parameters
[in]msg_l3Messge Buffer containing Layer3 message
[in]link_idLink Identifier
Returns
callee-allocated msgb with BSSMAP DTAP message

References BSSAP_MSG_DTAP, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, data, header, msgb::l3h, link_id, msg, msgb_alloc_headroom(), msgb_l3len(), and msgb_put().

◆ gsm0808_create_handover_command()

◆ gsm0808_create_handover_complete()

◆ gsm0808_create_handover_detect()

struct msgb * gsm0808_create_handover_detect ( )

Create BSSMAP HANDOVER DETECT message, 3GPP TS 48.008 3.2.1.40.

Sent from the MT BSC back to the MSC when the MS has sent a handover RACH request and the MT BSC has received the Handover Detect message.

References BSS_MAP_MSG_HANDOVER_DETECT, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_handover_failure()

◆ gsm0808_create_handover_performed()

◆ gsm0808_create_handover_request()

struct msgb * gsm0808_create_handover_request ( const struct gsm0808_handover_request params)

Create BSSMAP HANDOVER REQUEST message, 3GPP TS 48.008 3.2.1.8.

Sent from the MSC to the potential new target cell during inter-BSC handover, or to the target MSC during inter-MSC handover.

References gsm0808_handover_request::aoip_transport_layer, BSS_MAP_MSG_HANDOVER_RQST, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_handover_request::call_id, gsm0808_handover_request::call_id_present, gsm0808_handover_request::cause, gsm0808_handover_request::cell_identifier_serving, gsm0808_handover_request::cell_identifier_target, gsm0808_handover_request::channel_type, gsm0808_handover_request::chosen_encryption_algorithm_serving, 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, gsm0808_handover_request::classmark_information, gsm0808_handover_request::codec_list_msc_preferred, gsm0808_handover_request::current_channel_type_1, gsm0808_handover_request::current_channel_type_1_present, gsm0808_handover_request::encryption_information, gsm0808_handover_request::global_call_reference, gsm0808_handover_request::global_call_reference_len, gsm0808_enc_aoip_trasp_addr(), gsm0808_enc_cause(), gsm0808_enc_cell_id(), gsm0808_enc_channel_type(), gsm0808_enc_encrypt_info(), gsm0808_enc_speech_codec_list(), GSM0808_IE_CALL_ID, GSM0808_IE_CHOSEN_ENCR_ALG, GSM0808_IE_CLASSMARK_INFORMATION_T2, GSM0808_IE_CLASSMARK_INFORMATION_T3, GSM0808_IE_CLASSMARK_INFORMATION_TYPE_1, GSM0808_IE_CURRENT_CHANNEL_TYPE_1, GSM0808_IE_GLOBAL_CALL_REF, GSM0808_IE_IMSI, GSM0808_IE_OLD_BSS_TO_NEW_BSS_INFORMATION, GSM0808_IE_SPEECH_VERSION, gsm48_generate_mid_from_imsi(), GSM48_MI_SIZE, gsm0808_handover_request::imsi, msg, msgb_alloc_headroom(), msgb_length(), msgb_tlv_put(), msgb_tv_fixed_put(), msgb_tv_push(), msgb_tv_put(), msgb_v_put(), gsm0808_handover_request::old_bss_to_new_bss_info, gsm0808_handover_request::old_bss_to_new_bss_info_present, gsm0808_handover_request::old_bss_to_new_bss_info_raw, gsm0808_handover_request::old_bss_to_new_bss_info_raw_len, put_old_bss_to_new_bss_information(), and gsm0808_handover_request::speech_version_used.

◆ gsm0808_create_handover_request_ack()

struct msgb * gsm0808_create_handover_request_ack ( const uint8_t *  l3_info,
uint8_t  l3_info_len,
uint8_t  chosen_channel,
uint8_t  chosen_encr_alg,
uint8_t  chosen_speech_version 
)

◆ gsm0808_create_handover_request_ack2()

◆ gsm0808_create_handover_required()

◆ gsm0808_create_handover_required_reject()

struct msgb * gsm0808_create_handover_required_reject ( const struct gsm0808_handover_required_reject params)

Create BSSMAP HANDOVER REQUIRED REJECT message.

Returns
newly allocated msgb with BSSMAP HANDOVER REQUIRED REJECT message.

References BSS_MAP_MSG_HANDOVER_REQUIRED_REJECT, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_handover_required_reject::cause, gsm0808_enc_cause(), msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_handover_succeeded()

struct msgb * gsm0808_create_handover_succeeded ( )

Create BSSMAP HANDOVER SUCCEEDED message, 3GPP TS 48.008 3.2.1.13.

Sent from the MSC back to the old BSS to notify that the MS has successfully accessed the new BSS.

References BSS_MAP_MSG_HANDOVER_SUCCEEDED, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_layer3()

struct msgb * gsm0808_create_layer3 ( struct msgb msg_l3,
uint16_t  nc,
uint16_t  cc,
int  lac,
uint16_t  _ci 
)

Create "Complete L3 Info" for A, legacy implementation.

Instead use gsm0808_create_layer3_2() with the scl parameter passed as NULL, which is capable of three-digit MNC with leading zeros.

Parameters
[in]msg_l3msgb containing Layer 3 Message
[in]ncMobile Network Code
[in]ccMobile Country Code
[in]lacLocation Area Code
[in]_ciCell Identity
Returns
callee-allocated msgb with Complete L3 Info message

References gsm0808_create_layer3_2(), lac, osmo_cell_global_id::lai, osmo_plmn_id::mcc, and osmo_location_area_id::plmn.

◆ gsm0808_create_layer3_2()

struct msgb * gsm0808_create_layer3_2 ( const struct msgb msg_l3,
const struct osmo_cell_global_id cell,
const struct gsm0808_speech_codec_list scl 
)

Create "Complete L3 Info" for AoIP.

Parameters
[in]msg_l3msgb containing Layer 3 Message – not modified by this call.
[in]cellMCC, MNC, LAC, CI to identify the cell.
[in]sclSpeech Codec List, optional.
Returns
newly allocated msgb with Complete L3 Info message

References __attribute__, BSS_MAP_MSG_COMPLETE_LAYER_3, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, CELL_IDENT_WHOLE_GLOBAL, osmo_cell_global_id::cell_identity, gsm0808_enc_speech_codec_list(), GSM0808_IE_CELL_IDENTIFIER, GSM0808_IE_LAYER_3_INFORMATION, gsm48_generate_lai2(), msgb::l3h, osmo_cell_global_id::lai, lai, msg, msgb_alloc_headroom(), msgb_l3len(), msgb_length(), msgb_tlv_put(), msgb_tv_push(), msgb_v_put(), and osmo_htons.

Referenced by gsm0808_create_layer3(), and gsm0808_create_layer3_aoip().

◆ gsm0808_create_layer3_aoip()

struct msgb * gsm0808_create_layer3_aoip ( const struct msgb msg_l3,
uint16_t  nc,
uint16_t  cc,
int  lac,
uint16_t  _ci,
const struct gsm0808_speech_codec_list scl 
)

Create "Complete L3 Info" for AoIP, legacy implementation.

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

Parameters
[in]msg_l3msgb containing Layer 3 Message
[in]ncMobile Network Code
[in]ccMobile Country Code
[in]lacLocation Area Code
[in]_ciCell Identity
[in]sclSpeech Codec List
Returns
callee-allocated msgb with Complete L3 Info message

References gsm0808_create_layer3_2(), lac, osmo_cell_global_id::lai, osmo_plmn_id::mcc, and osmo_location_area_id::plmn.

◆ gsm0808_create_lcls_conn_ctrl()

struct msgb * gsm0808_create_lcls_conn_ctrl ( enum gsm0808_lcls_config  config,
enum gsm0808_lcls_control  control 
)

Create BSSMAP LCLS CONNECT CONTROL message (TS 48.008 3.2.1.91).

Parameters
[in]configLCLS Configuration
[in]controlLCLS Connection Status Control
Returns
callee-allocated msgb with BSSMAP LCLS NOTIFICATION

References BSS_MAP_MSG_LCLS_CONNECT_CTRL, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, config, GSM0808_IE_LCLS_CONFIG, GSM0808_LCLS_CFG_NA, GSM0808_LCLS_CSC_NA, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().

◆ gsm0808_create_lcls_conn_ctrl_ack()

struct msgb * gsm0808_create_lcls_conn_ctrl_ack ( enum gsm0808_lcls_status  status)

Create BSSMAP LCLS CONNECT CONTROL ACK message (TS 48.008 3.2.1.92).

Parameters
[in]statusLCLS BSS Status
Returns
callee-allocated msgb with BSSMAP LCLS NOTIFICATION

References BSS_MAP_MSG_LCLS_CONNECT_CTRL_ACK, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_LCLS_BSS_STATUS, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().

◆ gsm0808_create_lcls_notification()

struct msgb * gsm0808_create_lcls_notification ( enum gsm0808_lcls_status  status,
bool  break_req 
)

Create BSSMAP LCLS NOTIFICATION message (TS 48.008 3.2.1.93).

Parameters
[in]statusLCLS BSS Status
[in]break_reqInclude the LCLS BREAK REQ IE (true) or not (false)
Returns
callee-allocated msgb with BSSMAP LCLS NOTIFICATION

References BSS_MAP_MSG_LCLS_NOTIFICATION, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_LCLS_BREAK_REQ, GSM0808_IE_LCLS_BSS_STATUS, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().

◆ gsm0808_create_paging()

struct msgb * gsm0808_create_paging ( const char *  imsi,
const uint32_t *  tmsi,
const struct gsm0808_cell_id_list cil,
const uint8_t *  chan_needed 
)

DEPRECATED: Use gsm0808_create_paging2 instead.

Create BSSMAP PAGING message.

Parameters
[in]imsiMandatory paged IMSI in string representation
[in]tmsiOptional paged TMSI
[in]cilCell Identity List (where to page)
[in]chan_neededChannel Type needed
Returns
callee-allocated msgb with BSSMAP PAGING message

References GSM0808_CELL_ID_LIST2_MAXLEN, gsm0808_create_paging2(), gsm0808_cell_id_list2::id_discr, gsm0808_cell_id_list::id_discr, gsm0808_cell_id_list2::id_list, gsm0808_cell_id_list::id_list_lac, gsm0808_cell_id_list2::id_list_len, gsm0808_cell_id_list::id_list_len, gsm0808_cell_id_u::lac, and OSMO_ASSERT.

◆ gsm0808_create_paging2()

struct msgb * gsm0808_create_paging2 ( const char *  imsi,
const uint32_t *  tmsi,
const struct gsm0808_cell_id_list2 cil,
const uint8_t *  chan_needed 
)

Create BSSMAP PAGING message.

Parameters
[in]imsiMandatory paged IMSI in string representation
[in]tmsiOptional paged TMSI
[in]cilMandatory Cell Identity List (where to page)
[in]chan_neededChannel Type needed
Returns
callee-allocated msgb with BSSMAP PAGING message

References BSS_MAP_MSG_PAGING, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_enc_cell_id_list2(), GSM0808_IE_CHANNEL_NEEDED, GSM0808_IE_IMSI, GSM0808_IE_TMSI, gsm48_generate_mid_from_imsi(), GSM48_MI_SIZE, msg, msgb_alloc_headroom(), msgb_length(), msgb_tlv_put(), msgb_tv_push(), msgb_tv_put(), msgb_v_put(), OSMO_ASSERT, and osmo_htonl.

Referenced by gsm0808_create_paging().

◆ gsm0808_create_reset()

struct msgb * gsm0808_create_reset ( void  )

◆ gsm0808_create_reset_ack()

struct msgb * gsm0808_create_reset_ack ( void  )

Create BSSMAP RESET ACK message.

Returns
callee-allocated msgb with BSSMAP Reset ACK message

References BSS_MAP_MSG_RESET_ACKNOWLEDGE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), and msgb_v_put().

◆ gsm0808_create_sapi_reject()

struct msgb * gsm0808_create_sapi_reject ( uint8_t  link_id)

Create BSSMAP SAPI N Reject message.

Parameters
[in]link_idLink Identifier
Returns
callee-allocated msgb with BSSMAP SAPI N Reject message

References BSS_MAP_MSG_SAPI_N_REJECT, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_CAUSE_BSS_NOT_EQUIPPED, gsm0808_enc_cause(), GSM0808_IE_DLCI, link_id, msg, msgb_alloc_headroom(), msgb_length(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().

◆ gsm0808_current_channel_type_1()

static uint8_t gsm0808_current_channel_type_1 ( enum gsm_chan_t  type)
inlinestatic
Returns
3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum gsm_chan_t.

◆ gsm0808_dec_aoip_trasp_addr()

int gsm0808_dec_aoip_trasp_addr ( struct sockaddr_storage *  ss,
const uint8_t *  elem,
uint8_t  len 
)

◆ gsm0808_dec_cell_id()

int gsm0808_dec_cell_id ( struct gsm0808_cell_id ci,
const uint8_t *  elem,
uint8_t  len 
)

Decode Cell Identifier IE (3GPP TS 48.008 3.2.2.17).

Parameters
[out]ciCaller-provided memory to store Cell ID.
[in]elemIE value to be decoded.
[in]lenLength of elem in bytes.
Returns
number of bytes parsed; negative on error

References CELL_IDENT_BSS, CELL_IDENT_NO_CELL, gsm0808_dec_cell_id_list2(), gsm0808_cell_id::id, gsm0808_cell_id::id_discr, gsm0808_cell_id_list2::id_discr, gsm0808_cell_id_list2::id_list, gsm0808_cell_id_list2::id_list_len, and len.

◆ gsm0808_dec_cell_id_list()

int gsm0808_dec_cell_id_list ( struct gsm0808_cell_id_list cil,
const uint8_t *  elem,
uint8_t  len 
)

DEPRECATED: Use gsm0808_dec_cell_id_list2 instead.

Decode Cell Identifier List IE

Parameters
[out]cilCaller-provided memory to store Cell ID list
[in]elemIE value to be decoded
[in]lenLength of elem in bytes
Returns
number of bytes parsed; negative on error

References CELL_IDENT_BSS, CELL_IDENT_LAC, gsm0808_cell_id_list::id_discr, gsm0808_cell_id_list::id_list_lac, gsm0808_cell_id_list::id_list_len, len, and OSMO_ASSERT.

◆ gsm0808_dec_cell_id_list2()

int gsm0808_dec_cell_id_list2 ( struct gsm0808_cell_id_list2 cil,
const uint8_t *  elem,
uint8_t  len 
)

Decode Cell Identifier List IE.

Parameters
[out]cilCaller-provided memory to store Cell ID list
[in]elemIE value to be decoded
[in]lenLength of elem in bytes
Returns
number of bytes parsed; negative on error

References CELL_IDENT_BSS, CELL_IDENT_CI, CELL_IDENT_LAC, CELL_IDENT_LAC_AND_CI, CELL_IDENT_LAI_AND_LAC, CELL_IDENT_NO_CELL, CELL_IDENT_WHOLE_GLOBAL, gsm0808_cell_id_list2::id_discr, gsm0808_cell_id_list2::id_list_len, len, OSMO_ASSERT, parse_cell_id_ci_list(), parse_cell_id_global_list(), parse_cell_id_lac_and_ci_list(), parse_cell_id_lac_list(), and parse_cell_id_lai_and_lac().

Referenced by gsm0808_dec_cell_id().

◆ gsm0808_dec_channel_type()

int gsm0808_dec_channel_type ( struct gsm0808_channel_type ct,
const uint8_t *  elem,
uint8_t  len 
)

Decode TS 08.08 Channel Type IE.

Parameters
[out]ctCaller-provided memory to store channel type
[in]elemIE Value to be decoded
[in]lenLength of elem in bytes
Returns
number of bytes parsed; negative on error

See also 3GPP TS 48.008 3.2.2.11 Channel Type

References ARRAY_SIZE, gsm0808_channel_type::ch_indctr, gsm0808_channel_type::ch_rate_type, OSMO_ASSERT, gsm0808_channel_type::perm_spch, and gsm0808_channel_type::perm_spch_len.

◆ gsm0808_dec_encrypt_info()

int gsm0808_dec_encrypt_info ( struct gsm0808_encrypt_info ei,
const uint8_t *  elem,
uint8_t  len 
)

Decode TS 08.08 Encryption Information IE.

Parameters
[out]eiCaller-provided memory to store encryption information
[in]elemIE value to be decoded
[in]lenLength of elem in bytes
Returns
number of bytes parsed; negative on error

References ENCRY_INFO_PERM_ALGO_MAXLEN, gsm0808_encrypt_info::key, gsm0808_encrypt_info::key_len, len, OSMO_ASSERT, gsm0808_encrypt_info::perm_algo, and gsm0808_encrypt_info::perm_algo_len.

◆ gsm0808_dec_lcls()

int gsm0808_dec_lcls ( struct osmo_lcls lcls,
const struct tlv_parsed tp 
)

Decode LCLS parameters to a given msgb, 3GPP TS 48.008 §3.2.2.115 - 3.2.2.120.

Parameters
[out]lclsCaller-provided memory to store LCLS-related data
[in]tpIE values to be decoded
Returns
GCR size or negative on error

References osmo_lcls::config, osmo_lcls::control, osmo_lcls::corr_needed, osmo_lcls::gcr, osmo_lcls::gcr_available, gsm0808_dec_gcr(), GSM0808_IE_LCLS_CONFIG, GSM0808_IE_LCLS_CONN_STATUS_CTRL, GSM0808_IE_LCLS_CORR_NOT_NEEDED, GSM0808_LCLS_CFG_NA, GSM0808_LCLS_CSC_NA, TLVP_PRESENT, and tlvp_val8().

◆ gsm0808_dec_osmux_cid()

int gsm0808_dec_osmux_cid ( uint8_t *  cid,
const uint8_t *  elem,
uint8_t  len 
)

References OSMO_DEPRECATED.

◆ gsm0808_dec_speech_codec()

int gsm0808_dec_speech_codec ( struct gsm0808_speech_codec sc,
const uint8_t *  elem,
uint8_t  len 
)

Decode TS 08.08 Speech Codec IE.

Parameters
[out]scCaller-allocated memory for Speech Codec
[in]elemIE value to be decoded
[in]lenLength of elem in bytes
Returns
number of bytes parsed; negative on error

References gsm0808_speech_codec::cfg, gsm0808_speech_codec::fi, GSM0808_SCT_CSD, GSM0808_SCT_FR1, GSM0808_SCT_FR2, GSM0808_SCT_FR3, GSM0808_SCT_FR4, GSM0808_SCT_FR5, GSM0808_SCT_HR1, GSM0808_SCT_HR3, GSM0808_SCT_HR4, GSM0808_SCT_HR6, header, len, OSMO_ASSERT, gsm0808_speech_codec::pi, gsm0808_speech_codec::pt, gsm0808_speech_codec::tf, and gsm0808_speech_codec::type.

Referenced by gsm0808_dec_speech_codec_list().

◆ gsm0808_dec_speech_codec_list()

int gsm0808_dec_speech_codec_list ( struct gsm0808_speech_codec_list scl,
const uint8_t *  elem,
uint8_t  len 
)

Decode TS 08.08 Speech Codec list IE.

Parameters
[out]sclCaller-provided memory to store codec list
[in]elemIE value to be decoded
[in]lenLength of elem in bytes
Returns
number of bytes parsed; negative on error

See also 3GPP TS 48.008 3.2.2.103 Speech Codec List

References ARRAY_SIZE, gsm0808_speech_codec_list::codec, gsm0808_dec_speech_codec(), len, gsm0808_speech_codec_list::len, and OSMO_ASSERT.

◆ gsm0808_decode_cell_id_u()

int gsm0808_decode_cell_id_u ( union gsm0808_cell_id_u out,
enum CELL_IDENT  discr,
const uint8_t *  buf,
unsigned int  len 
)

Decode a single GSM 08.08 Cell ID list element payload.

Parameters
[out]outcaller-provided output union
[in]discrCell ID discriminator describing type to be decoded
[in]bufUser-provided input buffer containing binary Cell ID list element
[in]lenLength of buf
Returns
0 on success; negative on error

References osmo_strbuf::buf, CELL_IDENT_BSS, CELL_IDENT_CI, CELL_IDENT_LAC, CELL_IDENT_LAC_AND_CI, CELL_IDENT_LAI_AND_LAC, CELL_IDENT_NO_CELL, CELL_IDENT_WHOLE_GLOBAL, osmo_cell_global_id::cell_identity, gsm0808_cell_id_u::ci, osmo_lac_and_ci_id::ci, decode_lai(), gsm0808_cell_id_u::global, gsm0808_cell_id_u::lac, osmo_lac_and_ci_id::lac, gsm0808_cell_id_u::lac_and_ci, osmo_cell_global_id::lai, gsm0808_cell_id_u::lai_and_lac, and len.

Referenced by cbsp_decode_cell_list(), cbsp_decode_fail_list(), cbsp_decode_loading_list(), and cbsp_decode_num_compl_list().

◆ gsm0808_diagnostics_bit_location_str()

const char * gsm0808_diagnostics_bit_location_str ( uint8_t  bit_pointer)

◆ gsm0808_diagnostics_octet_location_str()

const char * gsm0808_diagnostics_octet_location_str ( uint8_t  pointer)

References str_buff.

◆ gsm0808_enc_aoip_trasp_addr()

uint8_t gsm0808_enc_aoip_trasp_addr ( struct msgb msg,
const struct sockaddr_storage *  ss 
)

◆ gsm0808_enc_cause()

◆ gsm0808_enc_cell_id()

uint8_t gsm0808_enc_cell_id ( struct msgb msg,
const struct gsm0808_cell_id ci 
)

Encode Cell Identifier IE (3GPP TS 48.008 3.2.2.17).

Parameters
[out]msgMessage Buffer to which IE is to be appended
[in]ciCell ID to be encoded
Returns
number of bytes appended to msg

References gsm0808_enc_cell_id_list2(), GSM0808_IE_CELL_IDENTIFIER, gsm0808_cell_id::id, gsm0808_cell_id::id_discr, gsm0808_cell_id_list2::id_discr, msg, and OSMO_ASSERT.

Referenced by gsm0808_create_handover_command(), gsm0808_create_handover_performed(), and gsm0808_create_handover_request().

◆ gsm0808_enc_cell_id_list()

uint8_t gsm0808_enc_cell_id_list ( struct msgb msg,
const struct gsm0808_cell_id_list cil 
)

DEPRECATED: Use gsm0808_enc_cell_id_list2 instead.

Encode TS 08.08 Cell Identifier List IE

Parameters
[out]msgMessage Buffer to which IE is to be appended
[in]cilCell ID List to be encoded
Returns
number of bytes appended to msg

References CELL_ID_LIST_LAC_MAXLEN, CELL_IDENT_BSS, CELL_IDENT_LAC, GSM0808_IE_CELL_IDENTIFIER_LIST, gsm0808_cell_id_list::id_discr, gsm0808_cell_id_list::id_list_lac, gsm0808_cell_id_list::id_list_len, msg, msgb_put(), msgb_put_u16(), msgb_put_u8(), and OSMO_ASSERT.

◆ gsm0808_enc_cell_id_list2()

uint8_t gsm0808_enc_cell_id_list2 ( struct msgb msg,
const struct gsm0808_cell_id_list2 cil 
)

Encode TS 08.08 Cell Identifier List IE.

Parameters
[out]msgMessage Buffer to which IE is to be appended
[in]cilCell ID List to be encoded
Returns
number of bytes appended to msg

References GSM0808_CELL_ID_LIST2_MAXLEN, GSM0808_IE_CELL_IDENTIFIER_LIST, gsm0808_msgb_put_cell_id_u(), gsm0808_cell_id_list2::id_discr, gsm0808_cell_id_list2::id_list, gsm0808_cell_id_list2::id_list_len, msg, msgb_put(), msgb_put_u8(), and OSMO_ASSERT.

Referenced by gsm0808_create_handover_required(), gsm0808_create_paging2(), gsm0808_enc_cell_id(), and same_cell_id_list_entries().

◆ gsm0808_enc_channel_type()

uint8_t gsm0808_enc_channel_type ( struct msgb msg,
const struct gsm0808_channel_type ct 
)

Encode TS 08.08 Channel Type IE.

Parameters
[out]msgMessage Buffer to which IE is to be appended
[in]ctChannel Type to be encoded
Returns
number of bytes added to msg

See also 3GPP TS 48.008 3.2.2.11 Channel Type

References gsm0808_channel_type::ch_indctr, gsm0808_channel_type::ch_rate_type, CHANNEL_TYPE_ELEMENT_MAXLEN, GSM0808_CHAN_SIGN, GSM0808_CHAN_SPEECH, GSM0808_IE_CHANNEL_TYPE, msg, msgb_put(), msgb_put_u8(), OSMO_ASSERT, gsm0808_channel_type::perm_spch, and gsm0808_channel_type::perm_spch_len.

Referenced by gsm0808_create_ass2(), and gsm0808_create_handover_request().

◆ gsm0808_enc_encrypt_info()

uint8_t gsm0808_enc_encrypt_info ( struct msgb msg,
const struct gsm0808_encrypt_info ei 
)

Encode TS 08.08 Encryption Information IE.

Parameters
[out]msgMessage Buffer to which IE is to be appended
[in]eiEncryption Information to be encoded
Returns
number of bytes appended to msg

References ARRAY_SIZE, ENCRY_INFO_PERM_ALGO_MAXLEN, GSM0808_IE_ENCRYPTION_INFORMATION, gsm0808_encrypt_info::key, gsm0808_encrypt_info::key_len, msg, msgb_put(), msgb_put_u8(), OSMO_ASSERT, gsm0808_encrypt_info::perm_algo, and gsm0808_encrypt_info::perm_algo_len.

Referenced by gsm0808_create_cipher(), and gsm0808_create_handover_request().

◆ gsm0808_enc_lcls()

uint8_t gsm0808_enc_lcls ( struct msgb msg,
const struct osmo_lcls lcls 
)

Add LCLS parameters to a given msgb, 3GPP TS 48.008 §3.2.2.115 - 3.2.2.120.

Parameters
[out]msgMessage Buffer for appending IE
[in]lclsLCLS-related data
Returns
number of bytes added to msg or 0 on error

References osmo_lcls::config, osmo_lcls::control, osmo_lcls::corr_needed, osmo_lcls::gcr, osmo_lcls::gcr_available, gsm0808_enc_gcr(), GSM0808_IE_LCLS_CONFIG, GSM0808_IE_LCLS_CONN_STATUS_CTRL, GSM0808_IE_LCLS_CORR_NOT_NEEDED, GSM0808_LCLS_CFG_NA, GSM0808_LCLS_CSC_NA, msg, msgb_tv_put(), and msgb_v_put().

Referenced by gsm0808_create_ass2().

◆ gsm0808_enc_speech_codec()

uint8_t gsm0808_enc_speech_codec ( struct msgb msg,
const struct gsm0808_speech_codec sc 
)

Encode TS 08.08 Speech Codec IE.

Parameters
[out]msgMessage Buffer to which IE will be appended
[in]scSpeech Codec to be encoded into IE
Returns
number of bytes appended to msg

See also 3GPP TS 48.008 3.2.2.103 Speech Codec List

References enc_speech_codec(), GSM0808_IE_SPEECH_CODEC, msg, msgb_put(), msgb_put_u8(), and OSMO_ASSERT.

Referenced by gsm0808_create_ass_compl2(), gsm0808_create_handover_complete(), gsm0808_create_handover_performed(), and gsm0808_create_handover_request_ack2().

◆ gsm0808_enc_speech_codec_list()

uint8_t gsm0808_enc_speech_codec_list ( struct msgb msg,
const struct gsm0808_speech_codec_list scl 
)

Encode TS 08.08 Speech Codec list.

Parameters
[out]msgMessage Buffer to which IE is to be appended
[in]sclSpeech Codec List to be encoded into IE
Returns
number of bytes added to msg

See also 3GPP TS 48.008 3.2.2.103 Speech Codec List

References gsm0808_speech_codec_list::codec, enc_speech_codec(), GSM0808_IE_SPEECH_CODEC_LIST, gsm0808_speech_codec_list::len, msg, msgb_put(), msgb_put_u8(), and OSMO_ASSERT.

Referenced by gsm0808_create_ass2(), gsm0808_create_ass_compl2(), gsm0808_create_ass_fail(), gsm0808_create_handover_complete(), gsm0808_create_handover_failure(), gsm0808_create_handover_request(), and gsm0808_create_layer3_2().

◆ gsm0808_get_cause()

enum gsm0808_cause gsm0808_get_cause ( const struct tlv_parsed tp)

Parse Cause TLV 3GPP TS 08.08 §3.2.2.5.

Returns
Cause value

References cause, get_value_string(), and gsm0808_cause_names.

Referenced by gsm0808_get_cipher_reject_cause().

◆ gsm0808_get_cipher_reject_cause()

int gsm0808_get_cipher_reject_cause ( const struct tlv_parsed tp)

References gsm0808_get_cause().

◆ gsm0808_lcls_config_name()

static const char* gsm0808_lcls_config_name ( enum gsm0808_lcls_config  val)
inlinestatic

◆ gsm0808_lcls_control_name()

static const char* gsm0808_lcls_control_name ( enum gsm0808_lcls_control  val)
inlinestatic

◆ gsm0808_lcls_status_name()

static const char* gsm0808_lcls_status_name ( enum gsm0808_lcls_status  val)
inlinestatic

◆ gsm0808_msgb_put_cell_id_u()

◆ gsm0808_permitted_speech()

static enum gsm0808_permitted_speech gsm0808_permitted_speech ( enum gsm_chan_t  type,
enum gsm48_chan_mode  mode 
)
inlinestatic

Return 3GPP TS 48.008 3.2.2.51 Speech Version aka permitted speech version indication in 3.2.2.11 Channel Type.

References GSM_LCHAN_SDCCH, GSM_LCHAN_TCH_F, GSM_LCHAN_TCH_H, and type.

◆ gsm0808_prepend_dtap_header()

void gsm0808_prepend_dtap_header ( struct msgb msg,
uint8_t  link_id 
)

Prepend a DTAP header to given Message Buffer.

Parameters
[in]msgbMessage Buffer
[in]link_idLink Identifier

References BSSAP_MSG_DTAP, link_id, msg, and msgb_push().

◆ gsm0808_sc_cfg_from_gsm48_mr_cfg()

uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg ( const struct gsm48_multi_rate_conf cfg,
bool  fr 
)

Determine a set of AMR speech codec configuration bits (S0-S15) from a given GSM 04.08 AMR configuration struct.

Parameters
[in]cfgAMR configuration in GSM 04.08 format.
[in]hintif the resulting configuration shall be used with a FR or HR TCH.
Returns
configuration bits (S0-S15)

References GSM0808_SC_CFG_AMR_4_75_5_90_7_40_12_20, GSM0808_SC_CFG_DEFAULT_AMR_10_2, GSM0808_SC_CFG_DEFAULT_AMR_12_2, GSM0808_SC_CFG_DEFAULT_AMR_4_75, GSM0808_SC_CFG_DEFAULT_AMR_5_15, GSM0808_SC_CFG_DEFAULT_AMR_5_90, GSM0808_SC_CFG_DEFAULT_AMR_6_70, GSM0808_SC_CFG_DEFAULT_AMR_7_40, GSM0808_SC_CFG_DEFAULT_AMR_7_95, GSM0808_SC_CFG_DEFAULT_FR_AMR, and GSM0808_SC_CFG_DEFAULT_HR_AMR.

◆ gsm0808_speech_codec_from_chan_type()

int gsm0808_speech_codec_from_chan_type ( struct gsm0808_speech_codec sc,
uint8_t  perm_spch 
)

Extrapolate a speech codec field from a given permitted speech parameter (channel type).

Parameters
[out]scCaller provided memory to store the resulting speech codec
[in]perm_spchvalue that is used to derive the speech codec info (see also: enum gsm0808_speech_codec_type in gsm0808_utils.h)
Returns
zero when successful; negative on error

References gsm0808_speech_codec::cfg, gsm0808_speech_codec::fi, gsm0808_chan_type_to_speech_codec(), GSM0808_SC_CFG_DEFAULT_FR_AMR, GSM0808_SC_CFG_DEFAULT_FR_AMR_WB, GSM0808_SC_CFG_DEFAULT_HR_AMR, GSM0808_SC_CFG_DEFAULT_OFR_AMR_WB, GSM0808_SC_CFG_DEFAULT_OHR_AMR, GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB, GSM0808_SCT_FR3, GSM0808_SCT_FR4, GSM0808_SCT_FR5, GSM0808_SCT_HR3, GSM0808_SCT_HR4, GSM0808_SCT_HR6, and gsm0808_speech_codec::type.

◆ gsm48_mr_cfg_from_gsm0808_sc_cfg()

int gsm48_mr_cfg_from_gsm0808_sc_cfg ( struct gsm48_multi_rate_conf cfg,
uint16_t  s15_s0 
)

Determine a GSM 04.08 AMR configuration struct from a set of speech codec configuration bits (S0-S15)

Parameters
[out]cfgAMR configuration in GSM 04.08 format.
[in]s15_s0configuration bits (S15-S0, non-ambiguous).
Returns
zero when successful; negative on error

References GSM0808_SC_CFG_AMR_10_2, GSM0808_SC_CFG_AMR_12_2, GSM0808_SC_CFG_AMR_4_75, GSM0808_SC_CFG_AMR_4_75_5_90_7_40_12_20, GSM0808_SC_CFG_AMR_5_90, GSM0808_SC_CFG_AMR_6_70, GSM0808_SC_CFG_AMR_7_40, and GSM0808_SC_CFG_AMR_7_95.

◆ osmo_gcr_dump()

char* osmo_gcr_dump ( const struct osmo_lcls lcls)

Dump GCR struct into static string buffer for printing.

Parameters
[in]lclspointer to the struct to print.
Returns
string representation of GCR in static buffer or NULL on error.

References dbuf, and osmo_gcr_dump_buf().

◆ osmo_gcr_dump_buf()

char* osmo_gcr_dump_buf ( char *  buf,
size_t  buf_len,
const struct osmo_lcls lcls 
)

Dump GCR struct into string for printing.

Parameters
[out]bufcaller-allocated output string buffer
[in]buf_lensize of buf in bytes
[in]lclspointer to the struct to print.
Returns
string representation of GCR or NULL on error.

References osmo_strbuf::buf, osmo_gcr_parsed::cr, dbuf, osmo_lcls::gcr, osmo_lcls::gcr_available, osmo_gcr_parsed::net, osmo_gcr_parsed::net_len, osmo_gcr_parsed::node, osmo_hexdump_nospc(), and OSMO_STRBUF_PRINTF.

Referenced by osmo_gcr_dump().

◆ osmo_lcls_dump()

char* osmo_lcls_dump ( const struct osmo_lcls lcls)

Dump LCLS parameters (GCR excluded) into static string buffer for printing.

Parameters
[in]lclspointer to the struct to print.
Returns
string representation of LCLS in static buffer or NULL on error.

References dbuf, and osmo_lcls_dump_buf().

◆ osmo_lcls_dump_buf()

char* osmo_lcls_dump_buf ( char *  buf,
size_t  buf_len,
const struct osmo_lcls lcls 
)

Dump LCLS parameters (GCR excluded) into string for printing.

Parameters
[out]bufcaller-allocated output string buffer
[in]buf_lensize of buf in bytes
[in]lclspointer to the struct to print.
Returns
string representation of LCLS or NULL on error.

References osmo_strbuf::buf, osmo_lcls::config, osmo_lcls::control, osmo_lcls::corr_needed, dbuf, gsm0808_lcls_config_name(), gsm0808_lcls_control_name(), and OSMO_STRBUF_PRINTF.

Referenced by osmo_lcls_dump(), and osmo_lcls_dump_c().

◆ osmo_lcls_dump_c()

char* osmo_lcls_dump_c ( void *  ctx,
const struct osmo_lcls lcls 
)

◆ put_old_bss_to_new_bss_information()

Variable Documentation

◆ bss_att_tlvdef

const struct tlv_definition bss_att_tlvdef
static

◆ gsm0406_dlci_sapi_names

const struct value_string gsm0406_dlci_sapi_names[]
Initial value:
= {
{ DLCI_SAPI_RR_MM_CC, "RR/MM/CC" },
{ DLCI_SAPI_SMS, "SMS" },
{ 0, NULL }
}

Referenced by gsm0406_dlci_sapi_name().

◆ gsm0808_bssap_names

const struct value_string gsm0808_bssap_names[]
static
Initial value:
= {
{ BSSAP_MSG_BSS_MANAGEMENT, "MANAGEMENT" },
{ BSSAP_MSG_DTAP, "DTAP" },
{ 0, NULL }
}

◆ gsm0808_cause_class_names

const struct value_string gsm0808_cause_class_names[]
static
Initial value:
= {
{ GSM0808_CAUSE_CLASS_NORM0, "Normal event" },
{ GSM0808_CAUSE_CLASS_NORM1, "Normal event" },
{ GSM0808_CAUSE_CLASS_RES_UNAVAIL, "Resource unavailable" },
{ GSM0808_CAUSE_CLASS_SRV_OPT_NA, "Service or option not available" },
{ GSM0808_CAUSE_CLASS_SRV_OPT_NIMPL, "Service or option not implemented" },
{ GSM0808_CAUSE_CLASS_INVAL, "Invalid message" },
{ GSM0808_CAUSE_CLASS_PERR, "Protocol error" },
{ GSM0808_CAUSE_CLASS_INTW, "Interworking" },
{ 0, NULL }
}

Referenced by gsm0808_cause_class_name().

◆ gsm0808_cause_names

const struct value_string gsm0808_cause_names[]
static

Referenced by gsm0808_get_cause().

◆ gsm0808_cell_id_discr_names

const struct value_string gsm0808_cell_id_discr_names[]
extern

value_string[] for enum CELL_IDENT.

Referenced by gsm0808_cell_id_discr_name().

◆ gsm0808_chosen_enc_alg_names

const struct value_string gsm0808_chosen_enc_alg_names[]
Initial value:
= {
{ GSM0808_ALG_ID_A5_0, "A5/0" },
{ GSM0808_ALG_ID_A5_1, "A5/1" },
{ GSM0808_ALG_ID_A5_2, "A5/2" },
{ GSM0808_ALG_ID_A5_3, "A5/3" },
{ GSM0808_ALG_ID_A5_4, "A5/4" },
{ GSM0808_ALG_ID_A5_5, "A5/5" },
{ GSM0808_ALG_ID_A5_6, "A5/6" },
{ GSM0808_ALG_ID_A5_7, "A5/7" },
{ 0, NULL }
}

◆ gsm0808_lcls_config_names [1/2]

const struct value_string gsm0808_lcls_config_names[]
extern

◆ gsm0808_lcls_config_names [2/2]

const struct value_string gsm0808_lcls_config_names[]
Initial value:
= {
{ GSM0808_LCLS_CFG_BOTH_WAY, "Connect both-way" },
"Connect both-way, bi-cast UL to CN" },
"Connect both-way, send access DL from CN" },
"Connect both-way, send access DL from CN, block local DL" },
"Connect both-way, bi-cast UL to CN, send access DL from CN" },
"Connect both-way, bi-cast UL to CN, send access DL from CN, block local DL" },
{ GSM0808_LCLS_CFG_NA, "Not available" },
{ 0, NULL }
}

Referenced by gsm0808_lcls_config_name().

◆ gsm0808_lcls_control_names [1/2]

const struct value_string gsm0808_lcls_control_names[]
extern

◆ gsm0808_lcls_control_names [2/2]

const struct value_string gsm0808_lcls_control_names[]
Initial value:
= {
{ GSM0808_LCLS_CSC_CONNECT, "Connect" },
{ GSM0808_LCLS_CSC_DO_NOT_CONNECT, "Do not connect" },
{ GSM0808_LCLS_CSC_RELEASE_LCLS, "Release LCLS" },
{ GSM0808_LCLS_CSC_BICAST_UL_AT_HANDOVER, "Bi-cast UL at Handover" },
{ GSM0808_LCLS_CSC_BICAST_UL_AND_RECV_DL_AT_HANDOVER, "Bi-cast UL and receive DL at Handover" },
{ GSM0808_LCLS_CSC_NA, "Not available" },
{ 0, NULL }
}

Referenced by gsm0808_lcls_control_name().

◆ gsm0808_lcls_status_names [1/2]

const struct value_string gsm0808_lcls_status_names[]
extern

◆ gsm0808_lcls_status_names [2/2]

const struct value_string gsm0808_lcls_status_names[]
Initial value:
= {
{ GSM0808_LCLS_STS_NOT_YET_LS, "Call not yet locally switched" },
{ GSM0808_LCLS_STS_NOT_POSSIBLE_LS, "Call not possible to be locally switched" },
{ GSM0808_LCLS_STS_NO_LONGER_LS, "Call is no longer locally switched" },
{ GSM0808_LCLS_STS_REQ_LCLS_NOT_SUPP, "Requested LCLS configuration is not supported" },
{ GSM0808_LCLS_STS_LOCALLY_SWITCHED, "Call is locally switched with requested LCLS config" },
{ GSM0808_LCLS_STS_NA, "Not available" },
{ 0, NULL }
}

Referenced by gsm0808_lcls_status_name().

◆ gsm0808_msgt_names

const struct value_string gsm0808_msgt_names[]
static

Referenced by gsm0808_bssmap_name().

◆ gsm0808_permitted_speech_names

const struct value_string gsm0808_permitted_speech_names[]
Initial value:
= {
{ GSM0808_PERM_FR1, "FR1" },
{ GSM0808_PERM_FR2, "FR2" },
{ GSM0808_PERM_FR3, "FR3" },
{ GSM0808_PERM_FR4, "FR4" },
{ GSM0808_PERM_FR5, "FR5" },
{ GSM0808_PERM_HR1, "HR1" },
{ GSM0808_PERM_HR2, "HR2" },
{ GSM0808_PERM_HR3, "HR3" },
{ GSM0808_PERM_HR4, "HR4" },
{ GSM0808_PERM_HR6, "HR6" },
{ 0, NULL }
}

Referenced by gsm0808_permitted_speech_name().

◆ gsm0808_speech_codec_type_names

const struct value_string gsm0808_speech_codec_type_names[]
Initial value:
= {
{ GSM0808_SCT_FR1, "FR1" },
{ GSM0808_SCT_FR2, "FR2" },
{ GSM0808_SCT_FR3, "FR3" },
{ GSM0808_SCT_FR4, "FR4" },
{ GSM0808_SCT_FR5, "FR5" },
{ GSM0808_SCT_HR1, "HR1" },
{ GSM0808_SCT_HR3, "HR3" },
{ GSM0808_SCT_HR4, "HR4" },
{ GSM0808_SCT_HR6, "HR6" },
{ GSM0808_SCT_CSD, "CSD" },
{ 0, NULL }
}

Referenced by gsm0808_speech_codec_type_name().

◆ MNC

void to not lose leading zeros in the MNC

◆ str_buff

__thread char str_buff[512]
static

Char buffer to return strings from functions.

Referenced by gsm0808_diagnostics_octet_location_str().

GSM0808_LCLS_CSC_BICAST_UL_AND_RECV_DL_AT_HANDOVER
@ GSM0808_LCLS_CSC_BICAST_UL_AND_RECV_DL_AT_HANDOVER
Definition: gsm_08_08.h:653
GSM0808_SCT_FR4
@ GSM0808_SCT_FR4
OFR AMR-WB.
Definition: gsm_08_08.h:503
GSM0808_SCT_FR5
@ GSM0808_SCT_FR5
FR AMR-WB.
Definition: gsm_08_08.h:504
GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL_SEND_DL_BLOCK_LOCAL_DL
@ GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL_SEND_DL_BLOCK_LOCAL_DL
Definition: gsm_08_08.h:643
GSM0808_ALG_ID_A5_5
@ GSM0808_ALG_ID_A5_5
Definition: gsm_08_08.h:523
GSM0808_LCLS_STS_NOT_POSSIBLE_LS
@ GSM0808_LCLS_STS_NOT_POSSIBLE_LS
Definition: gsm_08_08.h:660
GSM0808_LCLS_STS_NA
@ GSM0808_LCLS_STS_NA
Definition: gsm_08_08.h:664
GSM0808_LCLS_CSC_NA
@ GSM0808_LCLS_CSC_NA
Definition: gsm_08_08.h:654
GSM0808_LCLS_CSC_BICAST_UL_AT_HANDOVER
@ GSM0808_LCLS_CSC_BICAST_UL_AT_HANDOVER
Definition: gsm_08_08.h:652
GSM0808_CAUSE_CLASS_NORM0
@ GSM0808_CAUSE_CLASS_NORM0
Definition: gsm_08_08.h:424
GSM0808_PERM_FR2
@ GSM0808_PERM_FR2
GSM EFR.
Definition: gsm_08_08.h:483
GSM0808_PERM_HR6
@ GSM0808_PERM_HR6
OHR AMR.
Definition: gsm_08_08.h:491
GSM0808_ALG_ID_A5_7
@ GSM0808_ALG_ID_A5_7
Definition: gsm_08_08.h:525
GSM0808_CAUSE_CLASS_SRV_OPT_NIMPL
@ GSM0808_CAUSE_CLASS_SRV_OPT_NIMPL
Definition: gsm_08_08.h:428
GSM0808_CAUSE_CLASS_INVAL
@ GSM0808_CAUSE_CLASS_INVAL
Definition: gsm_08_08.h:429
GSM0808_LCLS_CSC_RELEASE_LCLS
@ GSM0808_LCLS_CSC_RELEASE_LCLS
Definition: gsm_08_08.h:651
GSM0808_PERM_FR5
@ GSM0808_PERM_FR5
FR AMR-WB.
Definition: gsm_08_08.h:486
GSM0808_PERM_FR4
@ GSM0808_PERM_FR4
OFR AMR-WB.
Definition: gsm_08_08.h:485
GSM0808_SCT_CSD
@ GSM0808_SCT_CSD
CSData (see also TS 26.103)
Definition: gsm_08_08.h:509
BSSAP_MSG_DTAP
@ BSSAP_MSG_DTAP
Definition: gsm_08_08.h:35
GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL
@ GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL
Definition: gsm_08_08.h:639
GSM0808_LCLS_CFG_BOTH_WAY_AND_SEND_DL_BLOCK_LOCAL_DL
@ GSM0808_LCLS_CFG_BOTH_WAY_AND_SEND_DL_BLOCK_LOCAL_DL
Definition: gsm_08_08.h:641
GSM0808_CAUSE_CLASS_RES_UNAVAIL
@ GSM0808_CAUSE_CLASS_RES_UNAVAIL
Definition: gsm_08_08.h:426
GSM0808_ALG_ID_A5_0
@ GSM0808_ALG_ID_A5_0
Definition: gsm_08_08.h:518
GSM0808_LCLS_STS_REQ_LCLS_NOT_SUPP
@ GSM0808_LCLS_STS_REQ_LCLS_NOT_SUPP
Definition: gsm_08_08.h:662
GSM0808_CAUSE_CLASS_INTW
@ GSM0808_CAUSE_CLASS_INTW
Definition: gsm_08_08.h:431
GSM0808_PERM_HR2
@ GSM0808_PERM_HR2
(deprecated)
Definition: gsm_08_08.h:488
DLCI_SAPI_SMS
@ DLCI_SAPI_SMS
Definition: gsm_08_08.h:64
GSM0808_LCLS_CSC_DO_NOT_CONNECT
@ GSM0808_LCLS_CSC_DO_NOT_CONNECT
Definition: gsm_08_08.h:650
GSM0808_CAUSE_CLASS_NORM1
@ GSM0808_CAUSE_CLASS_NORM1
Definition: gsm_08_08.h:425
GSM0808_ALG_ID_A5_2
@ GSM0808_ALG_ID_A5_2
Definition: gsm_08_08.h:520
GSM0808_LCLS_CSC_CONNECT
@ GSM0808_LCLS_CSC_CONNECT
Definition: gsm_08_08.h:649
GSM0808_ALG_ID_A5_3
@ GSM0808_ALG_ID_A5_3
Definition: gsm_08_08.h:521
GSM0808_PERM_HR4
@ GSM0808_PERM_HR4
OHR AMR-WB.
Definition: gsm_08_08.h:490
GSM0808_SCT_FR3
@ GSM0808_SCT_FR3
FR AMR.
Definition: gsm_08_08.h:502
GSM0808_PERM_FR3
@ GSM0808_PERM_FR3
FR AMR.
Definition: gsm_08_08.h:484
BSSAP_MSG_BSS_MANAGEMENT
@ BSSAP_MSG_BSS_MANAGEMENT
Definition: gsm_08_08.h:34
GSM0808_LCLS_STS_NO_LONGER_LS
@ GSM0808_LCLS_STS_NO_LONGER_LS
Definition: gsm_08_08.h:661
GSM0808_PERM_HR1
@ GSM0808_PERM_HR1
GSM HR.
Definition: gsm_08_08.h:487
GSM0808_SCT_HR6
@ GSM0808_SCT_HR6
OHR AMR.
Definition: gsm_08_08.h:508
GSM0808_SCT_FR1
@ GSM0808_SCT_FR1
GSM FR.
Definition: gsm_08_08.h:500
GSM0808_CAUSE_CLASS_SRV_OPT_NA
@ GSM0808_CAUSE_CLASS_SRV_OPT_NA
Definition: gsm_08_08.h:427
GSM0808_ALG_ID_A5_6
@ GSM0808_ALG_ID_A5_6
Definition: gsm_08_08.h:524
GSM0808_SCT_HR4
@ GSM0808_SCT_HR4
OHR AMR-WB.
Definition: gsm_08_08.h:507
GSM0808_SCT_HR1
@ GSM0808_SCT_HR1
GSM_HR.
Definition: gsm_08_08.h:505
GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL_SEND_DL
@ GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL_SEND_DL
Definition: gsm_08_08.h:642
GSM0808_PERM_HR3
@ GSM0808_PERM_HR3
HR AMR.
Definition: gsm_08_08.h:489
GSM0808_LCLS_CFG_BOTH_WAY_AND_SEND_DL
@ GSM0808_LCLS_CFG_BOTH_WAY_AND_SEND_DL
Definition: gsm_08_08.h:640
GSM0808_ALG_ID_A5_1
@ GSM0808_ALG_ID_A5_1
Definition: gsm_08_08.h:519
GSM0808_SCT_FR2
@ GSM0808_SCT_FR2
GSM EFR.
Definition: gsm_08_08.h:501
DLCI_SAPI_RR_MM_CC
@ DLCI_SAPI_RR_MM_CC
Definition: gsm_08_08.h:63
GSM0808_LCLS_STS_LOCALLY_SWITCHED
@ GSM0808_LCLS_STS_LOCALLY_SWITCHED
Definition: gsm_08_08.h:663
GSM0808_PERM_FR1
@ GSM0808_PERM_FR1
GSM FR.
Definition: gsm_08_08.h:482
GSM0808_ALG_ID_A5_4
@ GSM0808_ALG_ID_A5_4
Definition: gsm_08_08.h:522
GSM0808_SCT_HR3
@ GSM0808_SCT_HR3
HR_AMR.
Definition: gsm_08_08.h:506
GSM0808_CAUSE_CLASS_PERR
@ GSM0808_CAUSE_CLASS_PERR
Definition: gsm_08_08.h:430
GSM0808_LCLS_STS_NOT_YET_LS
@ GSM0808_LCLS_STS_NOT_YET_LS
Definition: gsm_08_08.h:659
GSM0808_LCLS_CFG_BOTH_WAY
@ GSM0808_LCLS_CFG_BOTH_WAY
Definition: gsm_08_08.h:638
GSM0808_LCLS_CFG_NA
@ GSM0808_LCLS_CFG_NA
Definition: gsm_08_08.h:644