libosmogb 1.9.0.196-9975
Osmocom Gb library
gprs_bssgp_rim.h File Reference

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
 

Enumerations

enum  bssgp_rim_routing_info_discr {
  BSSGP_RIM_ROUTING_INFO_GERAN ,
  BSSGP_RIM_ROUTING_INFO_UTRAN ,
  BSSGP_RIM_ROUTING_INFO_EUTRAN
}
 
enum  bssgp_nacc_cause {
  BSSGP_NACC_CAUSE_UNSPEC ,
  BSSGP_NACC_CAUSE_SYNTAX_ERR ,
  BSSGP_NACC_CAUSE_RPRT_CELL_MISSMTCH ,
  BSSGP_NACC_CAUSE_SIPSI_TYPE_ERR ,
  BSSGP_NACC_CAUSE_SIPSI_LEN_ERR ,
  BSSGP_NACC_CAUSE_SIPSI_SET_ERR
}
 
enum  bssgp_ran_inf_app_id {
  BSSGP_RAN_INF_APP_ID_NACC = 1 ,
  BSSGP_RAN_INF_APP_ID_SI3 = 2 ,
  BSSGP_RAN_INF_APP_ID_MBMS = 3 ,
  BSSGP_RAN_INF_APP_ID_SON = 4 ,
  BSSGP_RAN_INF_APP_ID_UTRA_SI = 5
}
 

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

Macro Definition Documentation

◆ BSSGP_RIM_PSI_LEN

#define BSSGP_RIM_PSI_LEN   22

◆ BSSGP_RIM_ROUTING_INFO_MAXLEN

#define BSSGP_RIM_ROUTING_INFO_MAXLEN   14

◆ BSSGP_RIM_SI_LEN

#define BSSGP_RIM_SI_LEN   21

Enumeration Type Documentation

◆ bssgp_nacc_cause

Enumerator
BSSGP_NACC_CAUSE_UNSPEC 
BSSGP_NACC_CAUSE_SYNTAX_ERR 
BSSGP_NACC_CAUSE_RPRT_CELL_MISSMTCH 
BSSGP_NACC_CAUSE_SIPSI_TYPE_ERR 
BSSGP_NACC_CAUSE_SIPSI_LEN_ERR 
BSSGP_NACC_CAUSE_SIPSI_SET_ERR 

◆ bssgp_ran_inf_app_id

Enumerator
BSSGP_RAN_INF_APP_ID_NACC 
BSSGP_RAN_INF_APP_ID_SI3 
BSSGP_RAN_INF_APP_ID_MBMS 
BSSGP_RAN_INF_APP_ID_SON 
BSSGP_RAN_INF_APP_ID_UTRA_SI 

◆ bssgp_rim_routing_info_discr

Enumerator
BSSGP_RIM_ROUTING_INFO_GERAN 
BSSGP_RIM_ROUTING_INFO_UTRAN 
BSSGP_RIM_ROUTING_INFO_EUTRAN 

Function Documentation

◆ bssgp_create_rim_ri()

◆ bssgp_dec_app_err_cont_nacc()

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

Parameters
[out]userprovided memory for decoded data struct.
[in]bufuser provided memory with the encoded value data of the IE.
Returns
0 on success, -EINVAL on error.

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().

◆ bssgp_dec_ran_inf_ack_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).

Parameters
[out]userprovided memory for decoded data struct.
[in]bufuser provided memory with the encoded value data of the IE.
Returns
0 on success, -EINVAL on error.

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().

◆ bssgp_dec_ran_inf_app_cont_nacc()

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

Parameters
[out]userprovided memory for decoded data struct.
[in]bufuser provided memory with the encoded value data of the IE.
Returns
0 on success, -EINVAL on error.

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().

◆ bssgp_dec_ran_inf_app_err_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).

Parameters
[out]userprovided memory for decoded data struct.
[in]bufuser provided memory with the encoded value data of the IE.
Returns
0 on success, -EINVAL on error.

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().

◆ bssgp_dec_ran_inf_err_rim_cont()

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

Parameters
[out]userprovided memory for decoded data struct.
[in]bufuser provided memory with the encoded value data of the IE.
Returns
0 on success, -EINVAL on error.

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().

◆ bssgp_dec_ran_inf_req_app_cont_nacc()

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

Parameters
[out]userprovided memory for decoded data struct.
[in]bufuser provided memory with the encoded value data of the IE.
Returns
0 on success, -EINVAL on error.

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().

◆ 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 
)

◆ bssgp_dec_ran_inf_rim_cont()

◆ bssgp_enc_app_err_cont_nacc()

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

Parameters
[out]bufuser provided memory for the generated value part of the IE.
[in]contuser provided input data struct.
Returns
length of encoded octets, -EINVAL on error.

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().

◆ bssgp_enc_ran_inf_ack_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).

Parameters
[out]bufuser provided memory for the generated value part of the IE.
[in]contuser provided input data struct.
Returns
length of encoded octets, -EINVAL on error.

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().

◆ bssgp_enc_ran_inf_app_cont_nacc()

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

Parameters
[out]bufuser provided memory for the generated value part of the IE.
[in]contuser provided input data struct.
Returns
length of encoded octets, -EINVAL on error.

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().

◆ bssgp_enc_ran_inf_app_err_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).

Parameters
[out]bufuser provided memory for the generated value part of the IE.
[in]contuser provided input data struct.
Returns
length of encoded octets, -EINVAL on error.

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().

◆ bssgp_enc_ran_inf_err_rim_cont()

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

Parameters
[out]bufuser provided memory for the generated value part of the IE.
[in]contuser provided input data struct.
Returns
length of encoded octets, -EINVAL on error.

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().

◆ bssgp_enc_ran_inf_req_app_cont_nacc()

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

Parameters
[out]bufuser provided memory for the generated value part of the IE.
[in]contuser provided input data struct.
Returns
length of encoded octets, -EINVAL on error.

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().

◆ 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 
)

◆ bssgp_enc_ran_inf_rim_cont()

◆ bssgp_encode_rim_pdu()

◆ bssgp_nacc_cause_str()

static const char * bssgp_nacc_cause_str ( enum bssgp_nacc_cause  val)
inlinestatic

Obtain a human-readable string for NACC Cause code.

References bssgp_nacc_cause_strs, and get_value_string().

◆ bssgp_parse_rim_pdu()

◆ bssgp_parse_rim_ra()

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

Parameters
[out]riuser provided memory to store the parsed results.
[in]bufinput 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.
Returns
length of parsed octets, -EINVAL on error.

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().

◆ 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).

Parameters
[out]riuser provided memory to store the parsed results.
[in]bufinput buffer of the value part of the IE.
Returns
length of parsed octets, -EINVAL on error.

References bssgp_parse_rim_ra(), and len().

Referenced by bssgp_parse_rim_pdu().

◆ bssgp_ran_inf_app_id_str()

static const char * bssgp_ran_inf_app_id_str ( enum bssgp_ran_inf_app_id  val)
inlinestatic

Obtain a human-readable string for RIM Application Identity code.

References bssgp_ran_inf_app_id_strs, and get_value_string().

◆ bssgp_rim_ri_name()

const char * bssgp_rim_ri_name ( const struct bssgp_rim_routing_info ri)

Encode a RIM Routing information into a human readable string.

Parameters
[in]riuser provided input data struct.
Returns
pointer to the resulting string.

References bssgp_rim_ri_name_buf().

◆ bssgp_rim_ri_name_buf()

◆ bssgp_rim_routing_info_discr_str()

static const char * bssgp_rim_routing_info_discr_str ( enum bssgp_rim_routing_info_discr  val)
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().

◆ bssgp_tx_rim()

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

Parameters
[in]pduuser provided memory for the RAN INFORMATION PDU to be sent.
[in]nseiBSSGP network service entity identifier (NSEI).
Returns
0 on sccess, -EINVAL on error.

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.

◆ bssgp_tx_rim_encoded()

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

Parameters
[in]msguser provided memory for the encoded RAN TRANSPARENT CONTAINER to be sent. (this function will take ownership of msg).
[in]nseiBSSGP network service entity identifier (NSEI).
Returns
0 on sccess, -EINVAL on error.

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.

Variable Documentation

◆ bssgp_nacc_cause_strs

const struct value_string bssgp_nacc_cause_strs[]
extern

Referenced by bssgp_nacc_cause_str().

◆ bssgp_ran_inf_app_id_strs

const struct value_string bssgp_ran_inf_app_id_strs[]
extern

◆ bssgp_rim_routing_info_discr_strs

const struct value_string bssgp_rim_routing_info_discr_strs[]
extern