libosmogsm
0.9.6.270-38c0
Osmocom GSM library
|
Helper functions regarding the TS 08.08 / 48.008 A interface. More...
Macros | |
#define | BSSMAP_MSG_SIZE 512 |
#define | BSSMAP_MSG_HEADROOM 128 |
Functions | |
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. More... | |
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. 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_complete (void) |
Create BSSMAP Clear Complete message. More... | |
struct msgb * | gsm0808_create_clear_command (uint8_t reason) |
Create BSSMAP Clear Command 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_paging (const char *imsi, const uint32_t *tmsi, const struct gsm0808_cell_id_list *cil, const uint8_t *chan_needed) |
Create BSSMAP PAGING message. More... | |
void | gsm0808_prepend_dtap_header (struct msgb *msg, uint8_t link_id) |
Prepend a DTAP header to given Message Buffer. More... | |
struct msgb * | gsm0808_create_dtap (struct msgb *msg_l3, uint8_t link_id) |
Create BSSMAP DTAP message. 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. | |
const char * | gsm0808_bssap_name (uint8_t msg_type) |
Return string name of BSSAP Message Type. | |
Variables | |
static const struct tlv_definition | bss_att_tlvdef |
static const struct value_string | gsm0808_msgt_names [] |
static const struct value_string | gsm0808_bssap_names [] |
Helper functions regarding the TS 08.08 / 48.008 A interface.
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 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 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 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 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 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 msgb_tv_push(), and msgb_tv_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 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 msgb_tlv_put(), msgb_tv_put(), and msgb_v_put().
struct msgb* gsm0808_create_clear_complete | ( | void | ) |
Create BSSMAP Clear Complete message.
References msgb_tlv_put().
struct msgb* gsm0808_create_clear_rqst | ( | uint8_t | cause | ) |
Create BSSMAP Clear Request message.
[in] | cause | BSSMAP Cause value |
References 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 |
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.
[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_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.
[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 gsm48_generate_lai(), msgb_tlv_put(), msgb_tv_push(), and msgb_v_put().
Referenced by gsm0808_create_layer3().
struct msgb* gsm0808_create_paging | ( | const char * | imsi, |
const uint32_t * | tmsi, | ||
const struct gsm0808_cell_id_list * | 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 gsm48_generate_mid_from_imsi(), msgb_tlv_put(), msgb_tv_push(), msgb_tv_put(), and msgb_v_put().
struct msgb* gsm0808_create_reset | ( | void | ) |
Create BSSMAP RESET message.
References msgb_tlv_put(), msgb_tv_push(), and msgb_v_put().
struct msgb* gsm0808_create_reset_ack | ( | void | ) |
Create BSSMAP RESET ACK message.
References 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 msgb_tv_push(), and msgb_v_put().
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 |
|
static |