libosmogb 1.10.0.58-6cd7a
Osmocom Gb library
|
#include <osmocom/gsm/gsm48.h>
#include <osmocom/gprs/protocol/gsm_08_18.h>
#include <osmocom/gprs/protocol/gsm_24_301.h>
Go to the source code of this file.
Data Structures | |
struct | bssgp_rim_routing_info |
BSSGP RIM Routing information, see also 3GPP TS 48.018, section 11.3.70. More... | |
struct | bssgp_ran_inf_req_app_cont_nacc |
struct | bssgp_ran_inf_app_cont_nacc |
struct | bssgp_app_err_cont_nacc |
struct | bssgp_ran_inf_req_rim_cont |
struct | bssgp_ran_inf_rim_cont |
struct | bssgp_ran_inf_ack_rim_cont |
struct | bssgp_ran_inf_err_rim_cont |
struct | bssgp_ran_inf_app_err_rim_cont |
struct | bssgp_ran_information_pdu |
Macros | |
#define | BSSGP_RIM_ROUTING_INFO_MAXLEN 14 |
#define | BSSGP_RIM_SI_LEN 21 |
#define | BSSGP_RIM_PSI_LEN 22 |
Functions | |
static const char * | bssgp_rim_routing_info_discr_str (enum bssgp_rim_routing_info_discr val) |
Obtain a human-readable string for NACC Cause code. More... | |
char * | bssgp_rim_ri_name_buf (char *buf, size_t buf_len, const struct bssgp_rim_routing_info *ri) |
Encode a RIM Routing information into a human readable string. More... | |
const char * | bssgp_rim_ri_name (const struct bssgp_rim_routing_info *ri) |
Encode a RIM Routing information into a human readable string. More... | |
int | bssgp_parse_rim_ri (struct bssgp_rim_routing_info *ri, const uint8_t *buf, unsigned int len) |
Parse a RIM Routing information IE (3GPP TS 48.018, chapter 11.3.70). More... | |
int | bssgp_parse_rim_ra (struct bssgp_rim_routing_info *ri, const uint8_t *buf, unsigned int len, uint8_t discr) |
Parse a RIM Routing address IE (3GPP TS 29.060, chapter 7.7.57 and 7.7.77). More... | |
int | bssgp_create_rim_ri (uint8_t *buf, const struct bssgp_rim_routing_info *ri) |
Encode a RIM Routing information IE (3GPP TS 48.018, chapter 11.3.70). More... | |
int | bssgp_dec_ran_inf_req_app_cont_nacc (struct bssgp_ran_inf_req_app_cont_nacc *cont, const uint8_t *buf, size_t len) |
Decode a RAN Information Request Application Container for NACC (3GPP TS 48.018, section 11.3.63.1.1). More... | |
int | bssgp_enc_ran_inf_req_app_cont_nacc (uint8_t *buf, size_t len, const struct bssgp_ran_inf_req_app_cont_nacc *cont) |
Encode a RAN Information Request Application Container for NACC (3GPP TS 48.018, section 11.3.63.1.1). More... | |
int | bssgp_dec_ran_inf_app_cont_nacc (struct bssgp_ran_inf_app_cont_nacc *cont, const uint8_t *buf, size_t len) |
Decode a RAN Information Application Container (3GPP TS 48.018, section 11.3.63.2.1). More... | |
int | bssgp_enc_ran_inf_app_cont_nacc (uint8_t *buf, size_t len, const struct bssgp_ran_inf_app_cont_nacc *cont) |
Encode a RAN Information Application Container (3GPP TS 48.018, section 11.3.63.2.1). More... | |
static const char * | bssgp_nacc_cause_str (enum bssgp_nacc_cause val) |
Obtain a human-readable string for NACC Cause code. More... | |
int | bssgp_dec_app_err_cont_nacc (struct bssgp_app_err_cont_nacc *cont, const uint8_t *buf, size_t len) |
Decode a Application Error Container for NACC (3GPP TS 48.018, section 11.3.64.1). More... | |
int | bssgp_enc_app_err_cont_nacc (uint8_t *buf, size_t len, const struct bssgp_app_err_cont_nacc *cont) |
Encode Application Error Container for NACC (3GPP TS 48.018, section 11.3.64.1). More... | |
static const char * | bssgp_ran_inf_app_id_str (enum bssgp_ran_inf_app_id val) |
Obtain a human-readable string for RIM Application Identity code. More... | |
int | bssgp_dec_ran_inf_req_rim_cont (struct bssgp_ran_inf_req_rim_cont *cont, const uint8_t *buf, size_t len) |
Decode a RAN Information Request RIM Container (3GPP TS 48.018, table 11.3.62a.1.b). More... | |
int | bssgp_enc_ran_inf_req_rim_cont (uint8_t *buf, size_t len, const struct bssgp_ran_inf_req_rim_cont *cont) |
Encode a RAN Information Request RIM Container (3GPP TS 48.018, table 11.3.62a.1.b). More... | |
int | bssgp_dec_ran_inf_rim_cont (struct bssgp_ran_inf_rim_cont *cont, const uint8_t *buf, size_t len) |
Decode a RAN Information RIM Container (3GPP TS 48.018, table 11.3.62a.2.b). More... | |
int | bssgp_enc_ran_inf_rim_cont (uint8_t *buf, size_t len, const struct bssgp_ran_inf_rim_cont *cont) |
Encode a RAN Information RIM Container (3GPP TS 48.018, table 11.3.62a.2.b). More... | |
int | bssgp_dec_ran_inf_ack_rim_cont (struct bssgp_ran_inf_ack_rim_cont *cont, const uint8_t *buf, size_t len) |
Decode a RAN Information ACK RIM Container (3GPP TS 48.018, table 11.3.62a.3.b). More... | |
int | bssgp_enc_ran_inf_ack_rim_cont (uint8_t *buf, size_t len, const struct bssgp_ran_inf_ack_rim_cont *cont) |
Encode a RAN Information ACK RIM Container (3GPP TS 48.018, table 11.3.62a.3.b). More... | |
int | bssgp_dec_ran_inf_err_rim_cont (struct bssgp_ran_inf_err_rim_cont *cont, const uint8_t *buf, size_t len) |
Decode a RAN Information Error RIM Container (3GPP TS 48.018, table 11.3.62a.4.b). More... | |
int | bssgp_enc_ran_inf_err_rim_cont (uint8_t *buf, size_t len, const struct bssgp_ran_inf_err_rim_cont *cont) |
Encode a RAN Information Error RIM Container (3GPP TS 48.018, table 11.3.62a.4.b). More... | |
int | bssgp_dec_ran_inf_app_err_rim_cont (struct bssgp_ran_inf_app_err_rim_cont *cont, const uint8_t *buf, size_t len) |
Decode a RAN Information Application Error RIM Container (3GPP TS 48.018, table 11.3.62a.5.b). More... | |
int | bssgp_enc_ran_inf_app_err_rim_cont (uint8_t *buf, size_t len, const struct bssgp_ran_inf_app_err_rim_cont *cont) |
Encode a RAN Information Application Error RIM Container (3GPP TS 48.018, table 11.3.62a.5.b). More... | |
int | bssgp_parse_rim_pdu (struct bssgp_ran_information_pdu *pdu, const struct msgb *msg) |
Parse a given message buffer into a rim-pdu struct. More... | |
struct msgb * | bssgp_encode_rim_pdu (const struct bssgp_ran_information_pdu *pdu) |
Encode a given rim-pdu struct into a message buffer. More... | |
int | bssgp_tx_rim (const struct bssgp_ran_information_pdu *pdu, uint16_t nsei) |
Send RIM RAN INFORMATION REQUEST via BSSGP (3GPP TS 48.018, section 10.6.1). More... | |
int | bssgp_tx_rim_encoded (struct msgb *msg, uint16_t nsei) |
Send encoded RAN TRANSPARENT CONTAINER via BSSGP (3GPP TS 29.060, section 7.7.43). More... | |
Variables | |
const struct value_string | bssgp_rim_routing_info_discr_strs [] |
const struct value_string | bssgp_nacc_cause_strs [] |
const struct value_string | bssgp_ran_inf_app_id_strs [] |
#define BSSGP_RIM_PSI_LEN 22 |
#define BSSGP_RIM_ROUTING_INFO_MAXLEN 14 |
#define BSSGP_RIM_SI_LEN 21 |
enum bssgp_nacc_cause |
enum bssgp_ran_inf_app_id |
int bssgp_create_rim_ri | ( | uint8_t * | buf, |
const struct bssgp_rim_routing_info * | ri | ||
) |
Encode a RIM Routing information IE (3GPP TS 48.018, chapter 11.3.70).
[out] | buf | user provided memory (at least 14 byte) for the generated value part of the IE. |
[in] | ri | user provided input data struct. |
References bssgp_create_cell_id(), BSSGP_RIM_ROUTING_INFO_EUTRAN, BSSGP_RIM_ROUTING_INFO_GERAN, BSSGP_RIM_ROUTING_INFO_MAXLEN, BSSGP_RIM_ROUTING_INFO_UTRAN, bssgp_rim_routing_info::cid, bssgp_rim_routing_info::discr, bssgp_rim_routing_info::eutran, bssgp_rim_routing_info::geran, bssgp_rim_routing_info::global_enb_id, bssgp_rim_routing_info::global_enb_id_len, gsm48_encode_ra(), len(), gprs_ra_id::mcc, osmo_eutran_tai::mcc, osmo_eutran_tai::mnc, osmo_eutran_tai::mnc_3_digits, OSMO_ASSERT, bssgp_rim_routing_info::raid, bssgp_rim_routing_info::rncid, osmo_eutran_tai::tac, bssgp_rim_routing_info::tai, and bssgp_rim_routing_info::utran.
Referenced by bssgp_encode_rim_pdu().
int bssgp_dec_app_err_cont_nacc | ( | struct bssgp_app_err_cont_nacc * | cont, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Decode a Application Error Container for NACC (3GPP TS 48.018, section 11.3.64.1).
[out] | user | provided memory for decoded data struct. |
[in] | buf | user provided memory with the encoded value data of the IE. |
References bssgp_app_err_cont_nacc::err_app_cont, bssgp_app_err_cont_nacc::err_app_cont_len, len(), and bssgp_app_err_cont_nacc::nacc_cause.
Referenced by bssgp_dec_ran_inf_app_err_rim_cont(), and bssgp_dec_ran_inf_rim_cont().
int bssgp_dec_ran_inf_ack_rim_cont | ( | struct bssgp_ran_inf_ack_rim_cont * | cont, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Decode a RAN Information ACK RIM Container (3GPP TS 48.018, table 11.3.62a.3.b).
[out] | user | provided memory for decoded data struct. |
[in] | buf | user provided memory with the encoded value data of the IE. |
References bssgp_ran_inf_ack_rim_cont::app_id, BSSGP_IE_RIM_APP_IDENTITY, BSSGP_IE_RIM_PROTOCOL_VERSION, BSSGP_IE_RIM_SEQ_NR, BSSGP_IE_SON_TRANSFER_APP_ID, len(), bssgp_ran_inf_ack_rim_cont::prot_ver, bssgp_ran_inf_ack_rim_cont::seq_num, bssgp_ran_inf_ack_rim_cont::son_trans_app_id, bssgp_ran_inf_ack_rim_cont::son_trans_app_id_len, tlv_parse(), TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, tlvp_val32be(), and tvlv_att_def.
Referenced by bssgp_parse_rim_pdu().
int bssgp_dec_ran_inf_app_cont_nacc | ( | struct bssgp_ran_inf_app_cont_nacc * | cont, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Decode a RAN Information Application Container (3GPP TS 48.018, section 11.3.63.2.1).
[out] | user | provided memory for decoded data struct. |
[in] | buf | user provided memory with the encoded value data of the IE. |
References BSSGP_RIM_PSI_LEN, BSSGP_RIM_SI_LEN, CELL_IDENT_WHOLE_GLOBAL_PS, gsm0808_decode_cell_id_u(), len(), bssgp_ran_inf_app_cont_nacc::num_si, REP_CELL_ID_LEN, bssgp_ran_inf_app_cont_nacc::reprt_cell, bssgp_ran_inf_app_cont_nacc::si, and bssgp_ran_inf_app_cont_nacc::type_psi.
Referenced by bssgp_dec_ran_inf_rim_cont().
int bssgp_dec_ran_inf_app_err_rim_cont | ( | struct bssgp_ran_inf_app_err_rim_cont * | cont, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Decode a RAN Information Application Error RIM Container (3GPP TS 48.018, table 11.3.62a.5.b).
[out] | user | provided memory for decoded data struct. |
[in] | buf | user provided memory with the encoded value data of the IE. |
References bssgp_ran_inf_app_err_rim_cont::app_err_cont_nacc, bssgp_ran_inf_app_err_rim_cont::app_id, bssgp_dec_app_err_cont_nacc(), BSSGP_IE_APP_ERROR_CONTAINER, BSSGP_RAN_INF_APP_ID_MBMS, BSSGP_RAN_INF_APP_ID_NACC, BSSGP_RAN_INF_APP_ID_SI3, BSSGP_RAN_INF_APP_ID_SON, BSSGP_RAN_INF_APP_ID_UTRA_SI, dec_rim_cont_common(), len(), tlv_parse(), TLVP_LEN, TLVP_VAL, tvlv_att_def, and bssgp_ran_inf_app_err_rim_cont::u.
Referenced by bssgp_parse_rim_pdu().
int bssgp_dec_ran_inf_err_rim_cont | ( | struct bssgp_ran_inf_err_rim_cont * | cont, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Decode a RAN Information Error RIM Container (3GPP TS 48.018, table 11.3.62a.4.b).
[out] | user | provided memory for decoded data struct. |
[in] | buf | user provided memory with the encoded value data of the IE. |
References bssgp_ran_inf_err_rim_cont::app_id, BSSGP_IE_CAUSE, BSSGP_IE_PDU_IN_ERROR, BSSGP_IE_RIM_APP_IDENTITY, BSSGP_IE_RIM_PROTOCOL_VERSION, BSSGP_IE_SON_TRANSFER_APP_ID, bssgp_ran_inf_err_rim_cont::cause, bssgp_ran_inf_err_rim_cont::err_pdu, bssgp_ran_inf_err_rim_cont::err_pdu_len, len(), bssgp_ran_inf_err_rim_cont::prot_ver, bssgp_ran_inf_err_rim_cont::son_trans_app_id, bssgp_ran_inf_err_rim_cont::son_trans_app_id_len, tlv_parse(), TLVP_LEN, TLVP_PRES_LEN, TLVP_PRESENT, TLVP_VAL, and tvlv_att_def.
Referenced by bssgp_parse_rim_pdu().
int bssgp_dec_ran_inf_req_app_cont_nacc | ( | struct bssgp_ran_inf_req_app_cont_nacc * | cont, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Decode a RAN Information Request Application Container for NACC (3GPP TS 48.018, section 11.3.63.1.1).
[out] | user | provided memory for decoded data struct. |
[in] | buf | user provided memory with the encoded value data of the IE. |
References CELL_IDENT_WHOLE_GLOBAL_PS, gsm0808_decode_cell_id_u(), len(), REP_CELL_ID_LEN, and bssgp_ran_inf_req_app_cont_nacc::reprt_cell.
Referenced by bssgp_dec_ran_inf_req_rim_cont().
int bssgp_dec_ran_inf_req_rim_cont | ( | struct bssgp_ran_inf_req_rim_cont * | cont, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Decode a RAN Information Request RIM Container (3GPP TS 48.018, table 11.3.62a.1.b).
[out] | user | provided memory for decoded data struct. |
[in] | buf | user provided memory with the encoded value data of the IE. |
References bssgp_ran_inf_req_rim_cont::app_cont_nacc, bssgp_ran_inf_req_rim_cont::app_id, bssgp_dec_ran_inf_req_app_cont_nacc(), BSSGP_IE_RIM_REQ_APP_CONTAINER, BSSGP_IE_SON_TRANSFER_APP_ID, BSSGP_RAN_INF_APP_ID_MBMS, BSSGP_RAN_INF_APP_ID_NACC, BSSGP_RAN_INF_APP_ID_SI3, BSSGP_RAN_INF_APP_ID_SON, BSSGP_RAN_INF_APP_ID_UTRA_SI, dec_rim_cont_common(), len(), bssgp_ran_inf_req_rim_cont::son_trans_app_id, bssgp_ran_inf_req_rim_cont::son_trans_app_id_len, tlv_parse(), TLVP_LEN, TLVP_PRES_LEN, TLVP_PRESENT, TLVP_VAL, tvlv_att_def, and bssgp_ran_inf_req_rim_cont::u.
Referenced by bssgp_parse_rim_pdu().
int bssgp_dec_ran_inf_rim_cont | ( | struct bssgp_ran_inf_rim_cont * | cont, |
const uint8_t * | buf, | ||
size_t | len | ||
) |
Decode a RAN Information RIM Container (3GPP TS 48.018, table 11.3.62a.2.b).
[out] | user | provided memory for decoded data struct. |
[in] | buf | user provided memory with the encoded value data of the IE. |
References bssgp_ran_inf_rim_cont::app_cont_nacc, bssgp_ran_inf_rim_cont::app_err, bssgp_ran_inf_rim_cont::app_err_cont_nacc, bssgp_ran_inf_rim_cont::app_id, bssgp_dec_app_err_cont_nacc(), bssgp_dec_ran_inf_app_cont_nacc(), BSSGP_IE_APP_ERROR_CONTAINER, BSSGP_IE_RAN_INFO_APP_CONTAINER, BSSGP_IE_SON_TRANSFER_APP_ID, BSSGP_RAN_INF_APP_ID_MBMS, BSSGP_RAN_INF_APP_ID_NACC, BSSGP_RAN_INF_APP_ID_SI3, BSSGP_RAN_INF_APP_ID_SON, BSSGP_RAN_INF_APP_ID_UTRA_SI, dec_rim_cont_common(), len(), bssgp_ran_inf_rim_cont::son_trans_app_id, bssgp_ran_inf_rim_cont::son_trans_app_id_len, tlv_parse(), TLVP_LEN, TLVP_PRES_LEN, TLVP_PRESENT, TLVP_VAL, tvlv_att_def, and bssgp_ran_inf_rim_cont::u.
Referenced by bssgp_parse_rim_pdu().
int bssgp_enc_app_err_cont_nacc | ( | uint8_t * | buf, |
size_t | len, | ||
const struct bssgp_app_err_cont_nacc * | cont | ||
) |
Encode Application Error Container for NACC (3GPP TS 48.018, section 11.3.64.1).
[out] | buf | user provided memory for the generated value part of the IE. |
[in] | cont | user provided input data struct. |
References bssgp_app_err_cont_nacc::err_app_cont, bssgp_app_err_cont_nacc::err_app_cont_len, and bssgp_app_err_cont_nacc::nacc_cause.
Referenced by bssgp_enc_ran_inf_app_err_rim_cont(), and bssgp_enc_ran_inf_rim_cont().
int bssgp_enc_ran_inf_ack_rim_cont | ( | uint8_t * | buf, |
size_t | len, | ||
const struct bssgp_ran_inf_ack_rim_cont * | cont | ||
) |
Encode a RAN Information ACK RIM Container (3GPP TS 48.018, table 11.3.62a.3.b).
[out] | buf | user provided memory for the generated value part of the IE. |
[in] | cont | user provided input data struct. |
References bssgp_ran_inf_ack_rim_cont::app_id, BSSGP_IE_RIM_APP_IDENTITY, BSSGP_IE_RIM_PROTOCOL_VERSION, BSSGP_IE_RIM_SEQ_NR, BSSGP_IE_SON_TRANSFER_APP_ID, len(), osmo_htonl, bssgp_ran_inf_ack_rim_cont::prot_ver, bssgp_ran_inf_ack_rim_cont::seq_num, bssgp_ran_inf_ack_rim_cont::son_trans_app_id, bssgp_ran_inf_ack_rim_cont::son_trans_app_id_len, TVLV_HDR_MAXLEN, and tvlv_put().
Referenced by bssgp_encode_rim_pdu().
int bssgp_enc_ran_inf_app_cont_nacc | ( | uint8_t * | buf, |
size_t | len, | ||
const struct bssgp_ran_inf_app_cont_nacc * | cont | ||
) |
Encode a RAN Information Application Container (3GPP TS 48.018, section 11.3.63.2.1).
[out] | buf | user provided memory for the generated value part of the IE. |
[in] | cont | user provided input data struct. |
References bssgp_create_cell_id(), BSSGP_RIM_PSI_LEN, BSSGP_RIM_SI_LEN, osmo_cell_global_id_ps::cell_identity, bssgp_ran_inf_app_cont_nacc::num_si, osmo_cell_global_id_ps::rai, bssgp_ran_inf_app_cont_nacc::reprt_cell, bssgp_ran_inf_app_cont_nacc::si, and bssgp_ran_inf_app_cont_nacc::type_psi.
Referenced by bssgp_enc_ran_inf_rim_cont().
int bssgp_enc_ran_inf_app_err_rim_cont | ( | uint8_t * | buf, |
size_t | len, | ||
const struct bssgp_ran_inf_app_err_rim_cont * | cont | ||
) |
Encode a RAN Information Application Error RIM Container (3GPP TS 48.018, table 11.3.62a.5.b).
[out] | buf | user provided memory for the generated value part of the IE. |
[in] | cont | user provided input data struct. |
References bssgp_ran_inf_app_err_rim_cont::app_err_cont_nacc, bssgp_ran_inf_app_err_rim_cont::app_id, bssgp_enc_app_err_cont_nacc(), BSSGP_IE_APP_ERROR_CONTAINER, BSSGP_RAN_INF_APP_ID_MBMS, BSSGP_RAN_INF_APP_ID_NACC, BSSGP_RAN_INF_APP_ID_SI3, BSSGP_RAN_INF_APP_ID_SON, BSSGP_RAN_INF_APP_ID_UTRA_SI, dub_tlvp_header(), enc_rim_cont_common(), len(), TVLV_HDR_LEN, TVLV_HDR_MAXLEN, and bssgp_ran_inf_app_err_rim_cont::u.
Referenced by bssgp_encode_rim_pdu().
int bssgp_enc_ran_inf_err_rim_cont | ( | uint8_t * | buf, |
size_t | len, | ||
const struct bssgp_ran_inf_err_rim_cont * | cont | ||
) |
Encode a RAN Information Error RIM Container (3GPP TS 48.018, table 11.3.62a.4.b).
[out] | buf | user provided memory for the generated value part of the IE. |
[in] | cont | user provided input data struct. |
References bssgp_ran_inf_err_rim_cont::app_id, BSSGP_IE_CAUSE, BSSGP_IE_PDU_IN_ERROR, BSSGP_IE_RIM_APP_IDENTITY, BSSGP_IE_RIM_PROTOCOL_VERSION, BSSGP_IE_SON_TRANSFER_APP_ID, bssgp_ran_inf_err_rim_cont::cause, bssgp_ran_inf_err_rim_cont::err_pdu, bssgp_ran_inf_err_rim_cont::err_pdu_len, len(), bssgp_ran_inf_err_rim_cont::prot_ver, bssgp_ran_inf_err_rim_cont::son_trans_app_id, bssgp_ran_inf_err_rim_cont::son_trans_app_id_len, TVLV_HDR_MAXLEN, and tvlv_put().
Referenced by bssgp_encode_rim_pdu().
int bssgp_enc_ran_inf_req_app_cont_nacc | ( | uint8_t * | buf, |
size_t | len, | ||
const struct bssgp_ran_inf_req_app_cont_nacc * | cont | ||
) |
Encode a RAN Information Request Application Container for NACC (3GPP TS 48.018, section 11.3.63.1.1).
[out] | buf | user provided memory for the generated value part of the IE. |
[in] | cont | user provided input data struct. |
References bssgp_create_cell_id(), osmo_cell_global_id_ps::cell_identity, len(), osmo_cell_global_id_ps::rai, REP_CELL_ID_LEN, and bssgp_ran_inf_req_app_cont_nacc::reprt_cell.
Referenced by bssgp_enc_ran_inf_req_rim_cont().
int bssgp_enc_ran_inf_req_rim_cont | ( | uint8_t * | buf, |
size_t | len, | ||
const struct bssgp_ran_inf_req_rim_cont * | cont | ||
) |
Encode a RAN Information Request RIM Container (3GPP TS 48.018, table 11.3.62a.1.b).
[out] | buf | user provided memory for the generated value part of the IE. |
[in] | cont | user provided input data struct. |
References bssgp_ran_inf_req_rim_cont::app_cont_nacc, bssgp_ran_inf_req_rim_cont::app_id, bssgp_enc_ran_inf_req_app_cont_nacc(), BSSGP_IE_RIM_REQ_APP_CONTAINER, BSSGP_IE_SON_TRANSFER_APP_ID, BSSGP_RAN_INF_APP_ID_MBMS, BSSGP_RAN_INF_APP_ID_NACC, BSSGP_RAN_INF_APP_ID_SI3, BSSGP_RAN_INF_APP_ID_SON, BSSGP_RAN_INF_APP_ID_UTRA_SI, dub_tlvp_header(), enc_rim_cont_common(), len(), bssgp_ran_inf_req_rim_cont::son_trans_app_id, bssgp_ran_inf_req_rim_cont::son_trans_app_id_len, TVLV_HDR_LEN, TVLV_HDR_MAXLEN, tvlv_put(), and bssgp_ran_inf_req_rim_cont::u.
Referenced by bssgp_encode_rim_pdu().
int bssgp_enc_ran_inf_rim_cont | ( | uint8_t * | buf, |
size_t | len, | ||
const struct bssgp_ran_inf_rim_cont * | cont | ||
) |
Encode a RAN Information RIM Container (3GPP TS 48.018, table 11.3.62a.2.b).
[out] | buf | user provided memory for the generated value part of the IE. |
[in] | cont | user provided input data struct. |
References bssgp_ran_inf_rim_cont::app_cont_nacc, bssgp_ran_inf_rim_cont::app_err, bssgp_ran_inf_rim_cont::app_err_cont_nacc, bssgp_ran_inf_rim_cont::app_id, bssgp_enc_app_err_cont_nacc(), bssgp_enc_ran_inf_app_cont_nacc(), BSSGP_IE_APP_ERROR_CONTAINER, BSSGP_IE_RAN_INFO_APP_CONTAINER, BSSGP_IE_SON_TRANSFER_APP_ID, BSSGP_RAN_INF_APP_ID_MBMS, BSSGP_RAN_INF_APP_ID_NACC, BSSGP_RAN_INF_APP_ID_SI3, BSSGP_RAN_INF_APP_ID_SON, BSSGP_RAN_INF_APP_ID_UTRA_SI, dub_tlvp_header(), enc_rim_cont_common(), len(), bssgp_ran_inf_rim_cont::son_trans_app_id, bssgp_ran_inf_rim_cont::son_trans_app_id_len, TVLV_HDR_LEN, TVLV_HDR_MAXLEN, tvlv_put(), and bssgp_ran_inf_rim_cont::u.
Referenced by bssgp_encode_rim_pdu().
struct msgb * bssgp_encode_rim_pdu | ( | const struct bssgp_ran_information_pdu * | pdu | ) |
Encode a given rim-pdu struct into a message buffer.
[out] | pdu | user provided memory that contains the RAN INFORMATION PDU to encode. |
References bssgp_ran_information_pdu::ack_rim_cont, bssgp_ran_information_pdu::app_err_rim_cont, bssgp_create_rim_ri(), bssgp_enc_ran_inf_ack_rim_cont(), bssgp_enc_ran_inf_app_err_rim_cont(), bssgp_enc_ran_inf_err_rim_cont(), bssgp_enc_ran_inf_req_rim_cont(), bssgp_enc_ran_inf_rim_cont(), BSSGP_IE_RI_ACK_RIM_CONTAINER, BSSGP_IE_RI_APP_ERROR_RIM_CONT, BSSGP_IE_RI_ERROR_RIM_COINTAINER, BSSGP_IE_RI_REQ_RIM_CONTAINER, BSSGP_IE_RI_RIM_CONTAINER, BSSGP_IE_RIM_ROUTING_INFO, bssgp_msgb_alloc(), BSSGP_PDUT_RAN_INFO, BSSGP_PDUT_RAN_INFO_ACK, BSSGP_PDUT_RAN_INFO_APP_ERROR, BSSGP_PDUT_RAN_INFO_ERROR, BSSGP_PDUT_RAN_INFO_REQ, BSSGP_RIM_ROUTING_INFO_MAXLEN, bssgp_ran_information_pdu::decoded, bssgp_ran_information_pdu::decoded_present, bssgp_ran_information_pdu::err_rim_cont, msg, msgb_free(), msgb_put(), msgb_tvlv_put(), OSMO_ASSERT, bssgp_normal_hdr::pdu_type, bssgp_ran_information_pdu::req_rim_cont, bssgp_ran_information_pdu::rim_cont, bssgp_ran_information_pdu::rim_cont_iei, bssgp_ran_information_pdu::rim_cont_len, bssgp_ran_information_pdu::routing_info_dest, and bssgp_ran_information_pdu::routing_info_src.
Referenced by bssgp_tx_rim().
|
inlinestatic |
Obtain a human-readable string for NACC Cause code.
References bssgp_nacc_cause_strs, and get_value_string().
int bssgp_parse_rim_pdu | ( | struct bssgp_ran_information_pdu * | pdu, |
const struct msgb * | msg | ||
) |
Parse a given message buffer into a rim-pdu struct.
[out] | pdu | user provided memory for the resulting RAN INFORMATION PDU. |
[in] | msg | BSSGP message buffer that contains the encoded RAN INFORMATION PDU. |
References bssgp_ran_information_pdu::ack_rim_cont, bssgp_ran_information_pdu::app_err_rim_cont, ARRAY_SIZE, bssgp_dec_ran_inf_ack_rim_cont(), bssgp_dec_ran_inf_app_err_rim_cont(), bssgp_dec_ran_inf_err_rim_cont(), bssgp_dec_ran_inf_req_rim_cont(), bssgp_dec_ran_inf_rim_cont(), BSSGP_IE_RI_ACK_RIM_CONTAINER, BSSGP_IE_RI_APP_ERROR_RIM_CONT, BSSGP_IE_RI_ERROR_RIM_COINTAINER, BSSGP_IE_RI_REQ_RIM_CONTAINER, BSSGP_IE_RI_RIM_CONTAINER, BSSGP_IE_RIM_ROUTING_INFO, bssgp_parse_rim_ri(), bssgp_normal_hdr::data, bssgp_ran_information_pdu::decoded, bssgp_ran_information_pdu::decoded_present, DLBSSGP, bssgp_ran_information_pdu::err_rim_cont, LOGL_DEBUG, LOGL_ERROR, LOGP, msg, msgb_bssgp_len, msgb_bssgph, msgb_nsei, nsei, osmo_pdef_bssgp, osmo_tlv_prot_parse(), bssgp_normal_hdr::pdu_type, bssgp_ran_information_pdu::req_rim_cont, bssgp_ran_information_pdu::rim_cont, bssgp_ran_information_pdu::rim_cont_iei, bssgp_ran_information_pdu::rim_cont_len, bssgp_ran_information_pdu::routing_info_dest, bssgp_ran_information_pdu::routing_info_src, TLVP_LEN, TLVP_PRESENT, and TLVP_VAL.
Referenced by bssgp_rx_rim().
int bssgp_parse_rim_ra | ( | struct bssgp_rim_routing_info * | ri, |
const uint8_t * | buf, | ||
unsigned int | len, | ||
uint8_t | discr | ||
) |
Parse a RIM Routing address IE (3GPP TS 29.060, chapter 7.7.57 and 7.7.77).
[out] | ri | user provided memory to store the parsed results. |
[in] | buf | input buffer of the value part of the RIM Routing address IE. \discr[in] discr value part (one byte) of the RIM Routing Address Discriminator IE. |
References bssgp_parse_cell_id(), BSSGP_RIM_ROUTING_INFO_EUTRAN, BSSGP_RIM_ROUTING_INFO_GERAN, BSSGP_RIM_ROUTING_INFO_UTRAN, bssgp_rim_routing_info::cid, bssgp_rim_routing_info::discr, bssgp_rim_routing_info::eutran, bssgp_rim_routing_info::geran, bssgp_rim_routing_info::global_enb_id, bssgp_rim_routing_info::global_enb_id_len, gsm48_parse_ra(), len(), gprs_ra_id::mcc, osmo_eutran_tai::mcc, gprs_ra_id::mnc, osmo_eutran_tai::mnc, gprs_ra_id::mnc_3_digits, osmo_eutran_tai::mnc_3_digits, bssgp_rim_routing_info::raid, bssgp_rim_routing_info::rncid, osmo_eutran_tai::tac, bssgp_rim_routing_info::tai, and bssgp_rim_routing_info::utran.
Referenced by bssgp_parse_rim_ri().
int bssgp_parse_rim_ri | ( | struct bssgp_rim_routing_info * | ri, |
const uint8_t * | buf, | ||
unsigned int | len | ||
) |
Parse a RIM Routing information IE (3GPP TS 48.018, chapter 11.3.70).
[out] | ri | user provided memory to store the parsed results. |
[in] | buf | input buffer of the value part of the IE. |
References bssgp_parse_rim_ra(), and len().
Referenced by bssgp_parse_rim_pdu().
|
inlinestatic |
Obtain a human-readable string for RIM Application Identity code.
References bssgp_ran_inf_app_id_strs, and get_value_string().
const char * bssgp_rim_ri_name | ( | const struct bssgp_rim_routing_info * | ri | ) |
Encode a RIM Routing information into a human readable string.
[in] | ri | user provided input data struct. |
References bssgp_rim_ri_name_buf().
char * bssgp_rim_ri_name_buf | ( | char * | buf, |
size_t | buf_len, | ||
const struct bssgp_rim_routing_info * | ri | ||
) |
Encode a RIM Routing information into a human readable string.
[buf] | user provided string buffer to store the resulting string. | |
[buf_len] | maximum length of string buffer. | |
[in] | ri | user provided input data struct. |
References bssgp_rim_routing_info_discr_str(), BSSGP_RIM_ROUTING_INFO_EUTRAN, BSSGP_RIM_ROUTING_INFO_GERAN, BSSGP_RIM_ROUTING_INFO_UTRAN, osmo_cell_global_id_ps::cell_identity, bssgp_rim_routing_info::cid, bssgp_rim_routing_info::discr, bssgp_rim_routing_info::eutran, bssgp_rim_routing_info::geran, bssgp_rim_routing_info::global_enb_id, bssgp_rim_routing_info::global_enb_id_len, gprs_ra_id::lac, osmo_location_area_id::lac, osmo_routing_area_id::lac, gprs_ra_id::mcc, osmo_plmn_id::mcc, osmo_eutran_tai::mcc, gprs_ra_id::mnc, osmo_plmn_id::mnc, osmo_eutran_tai::mnc, gprs_ra_id::mnc_3_digits, osmo_plmn_id::mnc_3_digits, osmo_eutran_tai::mnc_3_digits, osmo_cgi_ps_name_buf(), osmo_hexdump_buf(), osmo_plmn_name_buf(), osmo_location_area_id::plmn, gprs_ra_id::rac, osmo_routing_area_id::rac, osmo_cell_global_id_ps::rai, bssgp_rim_routing_info::raid, bssgp_rim_routing_info::rncid, osmo_eutran_tai::tac, bssgp_rim_routing_info::tai, and bssgp_rim_routing_info::utran.
Referenced by bssgp_rim_ri_name(), bssgp_rx_rim(), and bssgp_tx_rim().
|
inlinestatic |
Obtain a human-readable string for NACC Cause code.
References bssgp_rim_routing_info_discr_strs, and get_value_string().
Referenced by bssgp_rim_ri_name_buf().
int bssgp_tx_rim | ( | const struct bssgp_ran_information_pdu * | pdu, |
uint16_t | nsei | ||
) |
Send RIM RAN INFORMATION REQUEST via BSSGP (3GPP TS 48.018, section 10.6.1).
[in] | pdu | user provided memory for the RAN INFORMATION PDU to be sent. |
[in] | nsei | BSSGP network service entity identifier (NSEI). |
References bssgp_encode_rim_pdu(), bssgp_ns_send, bssgp_ns_send_data, bssgp_pdu_str(), bssgp_rim_ri_name_buf(), DEBUGP, DLBSSGP, LOGL_ERROR, LOGP, msg, msgb_bssgph, msgb_bvci, msgb_nsei, nsei, bssgp_normal_hdr::pdu_type, bssgp_ran_information_pdu::routing_info_dest, and bssgp_ran_information_pdu::routing_info_src.
int bssgp_tx_rim_encoded | ( | struct msgb * | msg, |
uint16_t | nsei | ||
) |
Send encoded RAN TRANSPARENT CONTAINER via BSSGP (3GPP TS 29.060, section 7.7.43).
[in] | msg | user provided memory for the encoded RAN TRANSPARENT CONTAINER to be sent. (this function will take ownership of msg). |
[in] | nsei | BSSGP network service entity identifier (NSEI). |
References bssgp_ns_send, bssgp_ns_send_data, bssgp_pdu_str(), DEBUGP, DLBSSGP, msg, msgb_bssgph, msgb_bvci, msgb_nsei, nsei, and bssgp_normal_hdr::pdu_type.
|
extern |
Referenced by bssgp_nacc_cause_str().
|
extern |
Referenced by bssgp_ran_inf_app_id_str().
|
extern |
Referenced by bssgp_rim_routing_info_discr_str().