libosmogsm
0.12.0
Osmocom GSM library
|
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_complete |
struct | gsm0808_handover_failure |
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... | |
Macros | |
#define | GSM0808_CELL_ID_LIST2_MAXLEN 127 |
(225-1)/2 is the maximum number of elements in a cell identifier list. More... | |
#define | BSSMAP_MSG_SIZE 512 |
#define | BSSMAP_MSG_HEADROOM 128 |
Functions | |
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. More... | |
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. More... | |
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. More... | |
struct msgb * | gsm0808_create_reset (void) |
Create BSSMAP RESET message. More... | |
struct msgb * | gsm0808_create_reset_ack (void) |
Create BSSMAP RESET ACK message. More... | |
struct msgb * | gsm0808_create_clear_command (uint8_t reason) |
Create BSSMAP Clear Command message. More... | |
struct msgb * | gsm0808_create_clear_complete (void) |
Create BSSMAP Clear Complete message. More... | |
struct msgb * | gsm0808_create_cipher (const struct gsm0808_encrypt_info *ei, const uint8_t *cipher_response_mode) |
Create BSSMAP Cipher Mode Command message. More... | |
struct msgb * | gsm0808_create_cipher_complete (struct msgb *layer3, uint8_t alg_id) |
Create BSSMAP Cipher Mode Complete message. More... | |
struct msgb * | gsm0808_create_cipher_reject (uint8_t cause) |
Create BSSMAP Cipher Mode Reject message. More... | |
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. More... | |
struct msgb * | gsm0808_create_sapi_reject (uint8_t link_id) |
Create BSSMAP SAPI N Reject message. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
struct msgb * | gsm0808_create_assignment_failure (uint8_t cause, uint8_t *rr_cause) |
Create BSSMAP Assignment Failure message. More... | |
struct msgb * | gsm0808_create_clear_rqst (uint8_t cause) |
Create BSSMAP Clear Request message. More... | |
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. More... | |
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. More... | |
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). More... | |
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). More... | |
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). More... | |
struct msgb * | gsm0808_create_handover_required (const struct gsm0808_handover_required *params) |
Create BSSMAP HANDOVER REQUIRED message. More... | |
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) |
Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.008 3.2.1.10. More... | |
struct msgb * | gsm0808_create_handover_detect () |
Create BSSMAP HANDOVER DETECT message, 3GPP TS 48.008 3.2.1.40. More... | |
struct msgb * | gsm0808_create_handover_complete (const struct gsm0808_handover_complete *params) |
Create BSSMAP HANDOVER COMPLETE message, 3GPP TS 48.008 3.2.1.12. More... | |
struct msgb * | gsm0808_create_handover_failure (const struct gsm0808_handover_failure *params) |
Create BSSMAP HANDOVER FAILURE message, 3GPP TS 48.008 3.2.1.16. More... | |
struct msgb * | gsm0808_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_definition * | gsm0808_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 (uint8_t cause) |
Return string name of BSSMAP Cause name. More... | |
static const char * | gsm0808_lcls_config_name (uint8_t val) |
static const char * | gsm0808_lcls_control_name (uint8_t val) |
static const char * | gsm0808_lcls_status_name (uint8_t val) |
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... | |
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... | |
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... | |
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) |
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... | |
static uint8_t | gsm0808_current_channel_type_1 (enum gsm_chan_t type) |
Return 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum gsm_chan_t. More... | |
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) |
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 const struct tlv_definition | bss_att_tlvdef |
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 [] |
const struct value_string | gsm0808_lcls_config_names [] |
const struct value_string | gsm0808_lcls_control_names [] |
const struct value_string | gsm0808_lcls_status_names [] |
#define BSSMAP_MSG_HEADROOM 128 |
Referenced by gsm0808_create_ass(), gsm0808_create_ass_compl(), gsm0808_create_ass_fail(), gsm0808_create_cipher(), gsm0808_create_cipher_complete(), gsm0808_create_cipher_reject(), gsm0808_create_classmark_update(), gsm0808_create_clear_command(), gsm0808_create_clear_complete(), gsm0808_create_clear_rqst(), gsm0808_create_dtap(), gsm0808_create_handover_complete(), gsm0808_create_handover_detect(), gsm0808_create_handover_failure(), gsm0808_create_handover_request_ack(), gsm0808_create_handover_required(), gsm0808_create_layer3_2(), gsm0808_create_lcls_conn_ctrl(), gsm0808_create_lcls_conn_ctrl_ack(), gsm0808_create_lcls_notification(), gsm0808_create_paging2(), gsm0808_create_reset(), gsm0808_create_reset_ack(), and gsm0808_create_sapi_reject().
#define BSSMAP_MSG_SIZE 512 |
Referenced by gsm0808_create_ass(), gsm0808_create_ass_compl(), gsm0808_create_ass_fail(), gsm0808_create_cipher(), gsm0808_create_cipher_complete(), gsm0808_create_cipher_reject(), gsm0808_create_classmark_update(), gsm0808_create_clear_command(), gsm0808_create_clear_complete(), gsm0808_create_clear_rqst(), gsm0808_create_dtap(), gsm0808_create_handover_complete(), gsm0808_create_handover_detect(), gsm0808_create_handover_failure(), gsm0808_create_handover_request_ack(), gsm0808_create_handover_required(), gsm0808_create_layer3_2(), gsm0808_create_lcls_conn_ctrl(), gsm0808_create_lcls_conn_ctrl_ack(), gsm0808_create_lcls_notification(), gsm0808_create_paging2(), gsm0808_create_reset(), gsm0808_create_reset_ack(), and gsm0808_create_sapi_reject().
#define GSM0808_CELL_ID_LIST2_MAXLEN 127 |
(225-1)/2 is the maximum number of elements in a cell identifier list.
Referenced by gsm0808_create_paging(), gsm0808_enc_cell_id_list2(), 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().
const struct tlv_definition * gsm0808_att_tlvdef | ( | void | ) |
References bss_att_tlvdef.
const char * gsm0808_bssap_name | ( | uint8_t | msg_type | ) |
Return string name of BSSAP Message Type.
References gsm0808_bssap_names.
const char * gsm0808_bssmap_name | ( | uint8_t | msg_type | ) |
Return string name of BSSMAP Message Type.
References gsm0808_msgt_names.
const char * gsm0808_cause_name | ( | uint8_t | cause | ) |
Return string name of BSSMAP Cause name.
References gsm0808_cause_names.
|
inlinestatic |
References gsm0808_cell_id_u::ci, gsm0808_cell_id_discr_names, gsm0808_cell_id_list_add(), gsm0808_cell_id_list_name(), gsm0808_cell_id_list_name_buf(), gsm0808_cell_id_name(), gsm0808_cell_id_name2(), gsm0808_cell_id_to_list(), gsm0808_cell_id_u_name(), gsm0808_chan_type_to_speech_codec(), gsm0808_dec_aoip_trasp_addr(), gsm0808_dec_cell_id(), gsm0808_dec_cell_id_list(), gsm0808_dec_cell_id_list2(), gsm0808_dec_channel_type(), gsm0808_dec_encrypt_info(), gsm0808_dec_speech_codec(), gsm0808_dec_speech_codec_list(), gsm0808_enc_aoip_trasp_addr(), gsm0808_enc_cell_id(), gsm0808_enc_cell_id_list(), gsm0808_enc_cell_id_list2(), gsm0808_enc_channel_type(), gsm0808_enc_encrypt_info(), gsm0808_enc_speech_codec(), gsm0808_enc_speech_codec_list(), gsm0808_speech_codec_from_chan_type(), len, and sc.
Referenced by gsm0808_cell_id_list_name_buf(), gsm0808_cell_id_name_buf(), and gsm0808_cell_id_u_name().
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.
dst[out] | Append entries to this list. |
src[in] | Append these entries to dst. |
References CELL_IDENT_BSS, 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().
Referenced by gsm0808_cell_id_discr_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().
Referenced by gsm0808_cell_id_discr_name().
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.
[out] | buf | Destination buffer to write string representation to. |
[in] | buflen | Amount of memory available in buf. |
[in] | cil | Cell Identifer List. |
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_discr_name(), and gsm0808_cell_id_list_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".
[in] | cid | Cell Identifer. |
References gsm0808_cell_id_name_buf().
Referenced by gsm0808_cell_id_discr_name().
const char* gsm0808_cell_id_name2 | ( | const struct gsm0808_cell_id * | cid | ) |
Like gsm0808_cell_id_name() but uses a different static buffer.
[in] | cid | Cell Identifer. |
References gsm0808_cell_id_name_buf().
Referenced by gsm0808_cell_id_discr_name().
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.
dst[out] | Overwrite this list. |
src[in] | Set dst to contain exactly this item. |
References CELL_IDENT_BSS, CELL_IDENT_NO_CELL, gsm0808_cell_id::id, gsm0808_cell_id_list2::id_discr, gsm0808_cell_id::id_discr, and gsm0808_cell_id_list2::id_list_len.
Referenced by gsm0808_cell_id_discr_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().
[out] | buf | Destination buffer to write string representation to. |
[in] | buflen | Amount of memory available in buf. |
[in] | id_discr | Cell Identifier type. |
[in] | u | Cell Identifer value. |
References CELL_IDENT_CI, CELL_IDENT_LAC, CELL_IDENT_LAC_AND_CI, CELL_IDENT_LAI_AND_LAC, CELL_IDENT_WHOLE_GLOBAL, osmo_lac_and_ci_id::ci, gsm0808_cell_id_u::ci, gsm0808_cell_id_u::global, gsm0808_cell_id_discr_name(), osmo_lac_and_ci_id::lac, gsm0808_cell_id_u::lac, gsm0808_cell_id_u::lac_and_ci, gsm0808_cell_id_u::lai_and_lac, osmo_cgi_name(), and osmo_lai_name().
Referenced by gsm0808_cell_id_discr_name().
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.
[in] | perm_spch | to be converted (see also gsm0808_permitted_speech) |
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_cell_id_discr_name(), and gsm0808_speech_codec_from_chan_type().
const char* gsm0808_channel_type_name | ( | const struct gsm0808_channel_type * | ct | ) |
|
inlinestatic |
Return 3GPP TS 48.008 3.2.2.33 Chosen Channel.
References gsm0808_channel_type_name(), GSM48_CMODE_DATA_12k0, GSM48_CMODE_DATA_14k5, GSM48_CMODE_DATA_3k6, GSM48_CMODE_DATA_6k0, GSM48_CMODE_SIGN, GSM48_CMODE_SPEECH_AMR, GSM48_CMODE_SPEECH_EFR, GSM48_CMODE_SPEECH_V1, GSM_LCHAN_NONE, GSM_LCHAN_SDCCH, GSM_LCHAN_TCH_F, and GSM_LCHAN_TCH_H.
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.
[in] | ct | Channel Type |
[in] | cic | Circuit Identity Code (Classic A only) |
[in] | ss | Socket Address of MSC-side RTP socket (AoIP only) |
[in] | scl | Speech Codec List (AoIP only) |
[in] | ci | Call Identifier (Optional, LCLS) |
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_speech_codec_list(), GSM0808_IE_CALL_ID, GSM0808_IE_CIRCUIT_IDENTITY_CODE, msgb_tv_fixed_put(), msgb_tv_push(), and msgb_v_put().
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.
[in] | rr_cause | GSM 04.08 RR Cause value |
[in] | chosen_channel | Chosen Channel |
[in] | encr_alg_id | Encryption Algorithm ID |
[in] | speech_mode | Speech Mode |
[in] | ss | Socket Address of BSS-side RTP socket |
[in] | sc | Speech Codec (current) |
[in] | scl | Speech Codec List (permitted) |
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_RR_CAUSE, GSM0808_IE_SPEECH_VERSION, msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
Referenced by gsm0808_create_assignment_completed().
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.
[in] | cause | BSSMAP Cause value |
[in] | rr_cause | GSM 04.08 RR Cause value |
[in] | scl | Optional Speech Cdec List (AoIP) |
References BSS_MAP_MSG_ASSIGMENT_FAILURE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_enc_speech_codec_list(), GSM0808_IE_CAUSE, GSM0808_IE_RR_CAUSE, msgb_tlv_put(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
Referenced by gsm0808_create_assignment_failure().
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.
[in] | rr_cause | GSM 04.08 RR Cause value |
[in] | chosen_channel | Chosen Channel |
[in] | encr_alg_id | Encryption Algorithm ID |
[in] | speech_mode | Speech Mode |
References gsm0808_create_ass_compl().
struct msgb * gsm0808_create_assignment_failure | ( | uint8_t | cause, |
uint8_t * | rr_cause | ||
) |
Create BSSMAP Assignment Failure message.
[in] | cause | BSSMAP Cause value |
[in] | rr_cause | GSM 04.08 RR Cause value |
References gsm0808_create_ass_fail().
struct msgb * gsm0808_create_cipher | ( | const struct gsm0808_encrypt_info * | ei, |
const uint8_t * | cipher_response_mode | ||
) |
Create BSSMAP Cipher Mode Command message.
[in] | ei | Mandatory Encryption Information |
[in] | cipher_response_mode | optional 1-byte Cipher Response Mode |
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, msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
struct msgb * gsm0808_create_cipher_complete | ( | struct msgb * | layer3, |
uint8_t | alg_id | ||
) |
Create BSSMAP Cipher Mode Complete message.
[in] | layer3 | L3 Message to be included |
[in] | alg_id | Chosen Encrpytion Algorithm |
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_tlv_put(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
struct msgb * gsm0808_create_cipher_reject | ( | uint8_t | cause | ) |
Create BSSMAP Cipher Mode Reject message.
[in] | reason | TS 08.08 cause value |
References BSS_MAP_MSG_CIPHER_MODE_REJECT, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_CAUSE, msgb_tlv_put(), msgb_tv_push(), and msgb_v_put().
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.
[in] | cm2 | Classmark 2 |
[in] | cm2_len | length (in octets) of cm2 |
[in] | cm3 | Classmark 3 |
[in] | cm3_len | length (in octets) of cm3 |
References BSS_MAP_MSG_CLASSMARK_UPDATE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_CLASSMARK_INFORMATION_T2, GSM0808_IE_CLASSMARK_INFORMATION_T3, msgb_tlv_put(), msgb_tv_push(), and msgb_v_put().
struct msgb * gsm0808_create_clear_command | ( | uint8_t | reason | ) |
Create BSSMAP Clear Command message.
[in] | reason | TS 08.08 cause value |
References BSS_MAP_MSG_CLEAR_CMD, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_CAUSE, msgb_tlv_put(), msgb_tv_put(), and msgb_v_put().
struct msgb * gsm0808_create_clear_complete | ( | void | ) |
Create BSSMAP Clear Complete message.
References BSS_MAP_MSG_CLEAR_COMPLETE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, and msgb_tlv_put().
struct msgb * gsm0808_create_clear_rqst | ( | uint8_t | cause | ) |
Create BSSMAP Clear Request message.
[in] | cause | BSSMAP Cause value |
References BSS_MAP_MSG_CLEAR_RQST, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_CAUSE, msgb_tlv_put(), msgb_tv_push(), and msgb_v_put().
struct msgb * gsm0808_create_dtap | ( | struct msgb * | msg_l3, |
uint8_t | link_id | ||
) |
Create BSSMAP DTAP message.
[in] | msg_l3 | Messge Buffer containing Layer3 message |
[in] | link_id | Link Identifier |
References BSSAP_MSG_DTAP, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, data, header, dtap_header::length, dtap_header::link_id, and dtap_header::type.
struct msgb * gsm0808_create_handover_complete | ( | const struct gsm0808_handover_complete * | params | ) |
Create BSSMAP HANDOVER COMPLETE message, 3GPP TS 48.008 3.2.1.12.
Sent from the MT BSC back to the MSC when the MS has fully settled into the new lchan.
References BSS_MAP_MSG_HANDOVER_COMPLETE, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_handover_complete::chosen_encr_alg, gsm0808_handover_complete::chosen_encr_alg_present, gsm0808_handover_complete::codec_list_bss_supported, gsm0808_enc_speech_codec(), gsm0808_enc_speech_codec_list(), GSM0808_IE_CHOSEN_ENCR_ALG, GSM0808_IE_LCLS_BSS_STATUS, GSM0808_IE_RR_CAUSE, gsm0808_handover_complete::lcls_bss_status, gsm0808_handover_complete::lcls_bss_status_present, gsm0808_speech_codec_list::len, msgb_tlv_put(), msgb_tv_put(), msgb_v_put(), gsm0808_handover_complete::rr_cause, gsm0808_handover_complete::rr_cause_present, gsm0808_handover_complete::speech_codec_chosen, and gsm0808_handover_complete::speech_codec_chosen_present.
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, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, and msgb_v_put().
struct msgb * gsm0808_create_handover_failure | ( | const struct gsm0808_handover_failure * | params | ) |
Create BSSMAP HANDOVER FAILURE message, 3GPP TS 48.008 3.2.1.16.
Sent from the MT BSC back to the MSC when the handover has failed.
References BSS_MAP_MSG_HANDOVER_FAILURE, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_handover_failure::cause, gsm0808_handover_failure::codec_list_bss_supported, gsm0808_enc_speech_codec_list(), GSM0808_IE_CAUSE, GSM0808_IE_RR_CAUSE, gsm0808_speech_codec_list::len, msgb_tlv_put(), msgb_v_put(), gsm0808_handover_failure::rr_cause, and gsm0808_handover_failure::rr_cause_present.
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 | ||
) |
Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.008 3.2.1.10.
Sent from the MT BSC back to the MSC when it has allocated an lchan to handover to. l3_info is the RR Handover Command that the MO BSC sends to the MS to move over.
References BSS_MAP_MSG_HANDOVER_RQST_ACKNOWLEDGE, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_CHOSEN_CHANNEL, GSM0808_IE_CHOSEN_ENCR_ALG, GSM0808_IE_LAYER_3_INFORMATION, GSM0808_IE_SPEECH_VERSION, msgb_tlv_put(), msgb_tv_put(), and msgb_v_put().
struct msgb * gsm0808_create_handover_required | ( | const struct gsm0808_handover_required * | params | ) |
Create BSSMAP HANDOVER REQUIRED message.
[in] | params | All information to be encoded. |
References BSS_MAP_MSG_HANDOVER_REQUIRED, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, gsm0808_handover_required::cause, gsm0808_handover_required::cil, gsm0808_handover_required::current_channel_type_1, gsm0808_handover_required::current_channel_type_1_present, gsm0808_enc_cell_id_list2(), GSM0808_IE_CAUSE, GSM0808_IE_CURRENT_CHANNEL_TYPE_1, GSM0808_IE_SPEECH_VERSION, msgb_tlv_put(), msgb_tv_fixed_put(), msgb_tv_push(), msgb_v_put(), gsm0808_handover_required::old_bss_to_new_bss_info, gsm0808_handover_required::old_bss_to_new_bss_info_present, put_old_bss_to_new_bss_information(), gsm0808_handover_required::speech_version_used, and gsm0808_handover_required::speech_version_used_present.
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.
[in] | msg_l3 | msgb containing Layer 3 Message |
[in] | nc | Mobile Network Code |
[in] | cc | Mobile Country Code |
[in] | lac | Location Area Code |
[in] | _ci | Cell Identity |
References gsm0808_create_layer3_2(), lac, osmo_cell_global_id::lai, osmo_plmn_id::mcc, and osmo_location_area_id::plmn.
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.
[in] | msg_l3 | msgb containing Layer 3 Message – not modified by this call. |
[in] | cell | MCC, MNC, LAC, CI to identify the cell. |
[in] | scl | Speech Codec List, optional. |
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(), osmo_cell_global_id::lai, msgb_tlv_put(), msgb_tv_push(), and msgb_v_put().
Referenced by gsm0808_create_layer3(), and 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.
[in] | msg_l3 | msgb containing Layer 3 Message |
[in] | nc | Mobile Network Code |
[in] | cc | Mobile Country Code |
[in] | lac | Location Area Code |
[in] | _ci | Cell Identity |
[in] | scl | Speech Codec List |
References gsm0808_create_layer3_2(), lac, osmo_cell_global_id::lai, osmo_plmn_id::mcc, and osmo_location_area_id::plmn.
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).
[in] | config | LCLS Configuration |
[in] | control | LCLS Connection Status Control |
References BSS_MAP_MSG_LCLS_CONNECT_CTRL, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_LCLS_CONFIG, msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
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).
[in] | status | LCLS BSS Status |
References BSS_MAP_MSG_LCLS_CONNECT_CTRL_ACK, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_IE_LCLS_BSS_STATUS, msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
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).
[in] | status | LCLS BSS Status |
[in] | break_req | Include the LCLS BREAK REQ IE (true) or not (false) |
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, msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
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.
[in] | imsi | Mandatory paged IMSI in string representation |
[in] | tmsi | Optional paged TMSI |
[in] | cil | Cell Identity List (where to page) |
[in] | chan_needed | Channel Type needed |
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, and gsm0808_cell_id_u::lac.
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.
[in] | imsi | Mandatory paged IMSI in string representation |
[in] | tmsi | Optional paged TMSI |
[in] | cil | Cell Identity List (where to page) |
[in] | chan_needed | Channel Type needed |
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, msgb_tlv_put(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
Referenced by gsm0808_create_paging().
struct msgb * gsm0808_create_reset | ( | void | ) |
Create BSSMAP RESET message.
References BSS_MAP_MSG_RESET, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, cause, GSM0808_CAUSE_EQUIPMENT_FAILURE, GSM0808_IE_CAUSE, msgb_tlv_put(), msgb_tv_push(), and msgb_v_put().
struct msgb * gsm0808_create_reset_ack | ( | void | ) |
Create BSSMAP RESET ACK message.
References BSS_MAP_MSG_RESET_ACKNOWLEDGE, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, msgb_tv_push(), and msgb_v_put().
struct msgb * gsm0808_create_sapi_reject | ( | uint8_t | link_id | ) |
Create BSSMAP SAPI N Reject message.
[in] | link_id | Link Identifier |
References BSS_MAP_MSG_SAPI_N_REJECT, BSSAP_MSG_BSS_MANAGEMENT, BSSMAP_MSG_HEADROOM, BSSMAP_MSG_SIZE, GSM0808_CAUSE_BSS_NOT_EQUIPPED, msgb_tv_push(), and msgb_v_put().
|
inlinestatic |
Return 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum gsm_chan_t.
References GSM_LCHAN_SDCCH, GSM_LCHAN_TCH_F, and GSM_LCHAN_TCH_H.
int gsm0808_dec_aoip_trasp_addr | ( | struct sockaddr_storage * | ss, |
const uint8_t * | elem, | ||
uint8_t | len | ||
) |
Referenced by gsm0808_cell_id_discr_name().
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).
[out] | ci | Caller-provided memory to store Cell ID. |
[in] | elem | IE value to be decoded. |
[in] | len | Length of elem in bytes. |
References CELL_IDENT_BSS, CELL_IDENT_NO_CELL, gsm0808_dec_cell_id_list2(), 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.
Referenced by gsm0808_cell_id_discr_name().
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
[out] | cil | Caller-provided memory to store Cell ID list |
[in] | elem | IE value to be decoded |
[in] | len | Length of elem in bytes |
References CELL_IDENT_BSS, CELL_IDENT_LAC, gsm0808_cell_id_list::id_discr, gsm0808_cell_id_list::id_list_lac, and gsm0808_cell_id_list::id_list_len.
Referenced by gsm0808_cell_id_discr_name().
int gsm0808_dec_cell_id_list2 | ( | struct gsm0808_cell_id_list2 * | cil, |
const uint8_t * | elem, | ||
uint8_t | len | ||
) |
Decode Cell Identifier List IE.
[out] | cil | Caller-provided memory to store Cell ID list |
[in] | elem | IE value to be decoded |
[in] | len | Length of elem in bytes |
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, 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_cell_id_discr_name(), and gsm0808_dec_cell_id().
int gsm0808_dec_channel_type | ( | struct gsm0808_channel_type * | ct, |
const uint8_t * | elem, | ||
uint8_t | len | ||
) |
Decode TS 08.08 Channel Type IE.
[out] | ct | Caller-provided memory to store channel type |
[in] | elem | IE Value to be decoded |
[in] | len | Length of elem in bytes |
See also 3GPP TS 48.008 3.2.2.11 Channel Type
References gsm0808_channel_type::ch_indctr, gsm0808_channel_type::ch_rate_type, gsm0808_channel_type::perm_spch, and gsm0808_channel_type::perm_spch_len.
Referenced by gsm0808_cell_id_discr_name().
int gsm0808_dec_encrypt_info | ( | struct gsm0808_encrypt_info * | ei, |
const uint8_t * | elem, | ||
uint8_t | len | ||
) |
Decode TS 08.08 Encryption Information IE.
[out] | ei | Caller-provided memory to store encryption information |
[in] | elem | IE value to be decoded |
[in] | len | Length of elem in bytes |
References ENCRY_INFO_PERM_ALGO_MAXLEN, gsm0808_encrypt_info::key, gsm0808_encrypt_info::key_len, gsm0808_encrypt_info::perm_algo, and gsm0808_encrypt_info::perm_algo_len.
Referenced by gsm0808_cell_id_discr_name().
int gsm0808_dec_speech_codec | ( | struct gsm0808_speech_codec * | sc, |
const uint8_t * | elem, | ||
uint8_t | len | ||
) |
Decode TS 08.08 Speech Codec IE.
[out] | sc | Caller-allocated memory for Speech Codec |
[in] | elem | IE value to be decoded |
[in] | len | Length of elem in bytes |
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, gsm0808_speech_codec::pi, gsm0808_speech_codec::pt, gsm0808_speech_codec::tf, and gsm0808_speech_codec::type.
Referenced by gsm0808_cell_id_discr_name(), and 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.
[out] | scl | Caller-provided memory to store codec list |
[in] | elem | IE value to be decoded |
[in] | len | Length of elem in bytes |
See also 3GPP TS 48.008 3.2.2.103 Speech Codec List
References gsm0808_speech_codec_list::codec, gsm0808_dec_speech_codec(), and gsm0808_speech_codec_list::len.
Referenced by gsm0808_cell_id_discr_name().
uint8_t gsm0808_enc_aoip_trasp_addr | ( | struct msgb * | msg, |
const struct sockaddr_storage * | ss | ||
) |
Referenced by gsm0808_cell_id_discr_name(), gsm0808_create_ass(), and gsm0808_create_ass_compl().
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).
[out] | msg | Message Buffer to which IE is to be appended |
[in] | ci | Cell ID to be encoded |
References gsm0808_enc_cell_id_list2(), GSM0808_IE_CELL_IDENTIFIER, gsm0808_cell_id::id, gsm0808_cell_id_list2::id_discr, and gsm0808_cell_id::id_discr.
Referenced by gsm0808_cell_id_discr_name().
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
[out] | msg | Message Buffer to which IE is to be appended |
[in] | cil | Cell ID List to be encoded |
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, and gsm0808_cell_id_list::id_list_len.
Referenced by gsm0808_cell_id_discr_name().
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.
[out] | msg | Message Buffer to which IE is to be appended |
[in] | cil | Cell ID List to be encoded |
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, osmo_cell_global_id::cell_identity, osmo_lac_and_ci_id::ci, gsm0808_cell_id_u::ci, gsm0808_cell_id_u::global, GSM0808_CELL_ID_LIST2_MAXLEN, GSM0808_IE_CELL_IDENTIFIER_LIST, gsm48_generate_lai2(), gsm0808_cell_id_list2::id_discr, gsm0808_cell_id_list2::id_list, gsm0808_cell_id_list2::id_list_len, osmo_lac_and_ci_id::lac, gsm0808_cell_id_u::lac, gsm0808_cell_id_u::lac_and_ci, osmo_cell_global_id::lai, and gsm0808_cell_id_u::lai_and_lac.
Referenced by gsm0808_cell_id_discr_name(), gsm0808_create_handover_required(), gsm0808_create_paging2(), gsm0808_enc_cell_id(), and same_cell_id_list_entries().
uint8_t gsm0808_enc_channel_type | ( | struct msgb * | msg, |
const struct gsm0808_channel_type * | ct | ||
) |
Encode TS 08.08 Channel Type IE.
[out] | msg | Message Buffer to which IE is to be appended |
[in] | ct | Channel Type to be encoded |
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, gsm0808_channel_type::perm_spch, and gsm0808_channel_type::perm_spch_len.
Referenced by gsm0808_cell_id_discr_name(), and gsm0808_create_ass().
uint8_t gsm0808_enc_encrypt_info | ( | struct msgb * | msg, |
const struct gsm0808_encrypt_info * | ei | ||
) |
Encode TS 08.08 Encryption Information IE.
[out] | msg | Message Buffer to which IE is to be appended |
[in] | ei | Encryption Information to be encoded |
References ENCRY_INFO_PERM_ALGO_MAXLEN, GSM0808_IE_ENCRYPTION_INFORMATION, gsm0808_encrypt_info::key, gsm0808_encrypt_info::key_len, gsm0808_encrypt_info::perm_algo, and gsm0808_encrypt_info::perm_algo_len.
Referenced by gsm0808_cell_id_discr_name(), and gsm0808_create_cipher().
uint8_t gsm0808_enc_speech_codec | ( | struct msgb * | msg, |
const struct gsm0808_speech_codec * | sc | ||
) |
Encode TS 08.08 Speech Codec IE.
[out] | msg | Message Buffer to which IE will be appended |
[in] | sc | Speech Codec to be encoded into IE |
See also 3GPP TS 48.008 3.2.2.103 Speech Codec List
References enc_speech_codec(), and GSM0808_IE_SPEECH_CODEC.
Referenced by gsm0808_cell_id_discr_name(), gsm0808_create_ass_compl(), and gsm0808_create_handover_complete().
uint8_t gsm0808_enc_speech_codec_list | ( | struct msgb * | msg, |
const struct gsm0808_speech_codec_list * | scl | ||
) |
Encode TS 08.08 Speech Codec list.
[out] | msg | Message Buffer to which IE is to be appended |
[in] | scl | Speech Codec List to be encoded into IE |
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, and gsm0808_speech_codec_list::len.
Referenced by gsm0808_cell_id_discr_name(), gsm0808_create_ass(), gsm0808_create_ass_compl(), gsm0808_create_ass_fail(), gsm0808_create_handover_complete(), gsm0808_create_handover_failure(), and gsm0808_create_layer3_2().
|
inlinestatic |
References gsm0808_lcls_config_names.
|
inlinestatic |
References gsm0808_lcls_control_names.
|
inlinestatic |
References gsm0808_lcls_status_names.
|
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 GSM0808_PERM_FR1, GSM0808_PERM_FR2, GSM0808_PERM_FR3, GSM0808_PERM_HR1, GSM0808_PERM_HR2, GSM0808_PERM_HR3, GSM48_CMODE_SPEECH_AMR, GSM48_CMODE_SPEECH_EFR, GSM48_CMODE_SPEECH_V1, GSM_LCHAN_TCH_F, and GSM_LCHAN_TCH_H.
void gsm0808_prepend_dtap_header | ( | struct msgb * | msg, |
uint8_t | link_id | ||
) |
Prepend a DTAP header to given Message Buffer.
[in] | msgb | Message Buffer |
[in] | link_id | Link Identifier |
References BSSAP_MSG_DTAP, and link_id.
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).
[out] | sc | Caller provided memory to store the resulting speech codec |
[in] | perm_spch | value that is used to derive the speech codec info (see also: enum gsm0808_speech_codec_type in gsm0808_utils.h) |
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.
Referenced by gsm0808_cell_id_discr_name().
|
static |
References gsm0808_old_bss_to_new_bss_info::current_channel_type_2, gsm0808_old_bss_to_new_bss_info::current_channel_type_2_present, gsm0808_old_bss_to_new_bss_info::extra_information, gsm0808_old_bss_to_new_bss_info::extra_information_present, gsm0808_old_bss_to_new_bss_info::field, GSM0808_FE_IE_CURRENT_CHANNEL_TYPE_2, GSM0808_FE_IE_EXTRA_INFORMATION, GSM0808_IE_OLD_BSS_TO_NEW_BSS_INFORMATION, gsm0808_old_bss_to_new_bss_info::lcs, gsm0808_old_bss_to_new_bss_info::mode, msgb_tlv_put(), gsm0808_old_bss_to_new_bss_info::prec, and gsm0808_old_bss_to_new_bss_info::ue_prob.
Referenced by gsm0808_create_handover_required().
|
static |
Referenced by gsm0808_att_tlvdef().
|
static |
Referenced by gsm0808_bssap_name().
|
static |
Referenced by gsm0808_cause_name().
const struct value_string gsm0808_cell_id_discr_names[] |
value_string[] for enum CELL_IDENT.
Referenced by gsm0808_cell_id_discr_name().
const struct value_string gsm0808_chosen_enc_alg_names[] |
const struct value_string gsm0808_lcls_config_names[] |
Referenced by gsm0808_lcls_config_name().
const struct value_string gsm0808_lcls_config_names[] |
Referenced by gsm0808_lcls_config_name().
const struct value_string gsm0808_lcls_control_names[] |
Referenced by gsm0808_lcls_control_name().
const struct value_string gsm0808_lcls_control_names[] |
Referenced by gsm0808_lcls_control_name().
const struct value_string gsm0808_lcls_status_names[] |
Referenced by gsm0808_lcls_status_name().
const struct value_string gsm0808_lcls_status_names[] |
Referenced by gsm0808_lcls_status_name().
|
static |
Referenced by gsm0808_bssmap_name().
const struct value_string gsm0808_permitted_speech_names[] |
Referenced by gsm0808_permitted_speech_name().
const struct value_string gsm0808_speech_codec_type_names[] |
Referenced by gsm0808_speech_codec_type_name().
void to not lose leading zeros in the MNC |