libosmogsm 1.10.0.57-8972
Osmocom GSM library
|
Files | |
file | bsslap.h |
Message encoding and decoding for 3GPP TS 48.071 BSS LCS Assistance Protocol (BSSLAP). | |
file | gsm_48_071.h |
file | bsslap.c |
Message encoding and decoding for 3GPP TS 48.071 BSSLAP protocol. | |
Data Structures | |
struct | osmo_bsslap_err |
struct | bsslap_ta_response |
struct | bsslap_ta_layer3 |
struct | bsslap_reset |
struct | bsslap_pdu |
Macros | |
#define | DEC_ERR(RC, MSG_TYPE, IEI, CAUSE, fmt, args...) |
Functions | |
static const char * | osmo_bsslap_msgt_name (enum bsslap_msgt val) |
static const char * | osmo_bsslap_iei_name (enum bsslap_iei val) |
int | osmo_bsslap_enc (struct msgb *msg, const struct bsslap_pdu *pdu) |
Encode BSSLAP PDU and append to msgb (3GPP TS 48.071). More... | |
int | osmo_bsslap_dec (struct bsslap_pdu *pdu, struct osmo_bsslap_err **err, void *err_ctx, const uint8_t *data, size_t len) |
Decode BSSLAP PDU (3GPP TS 48.071). More... | |
static void | osmo_bsslap_ie_enc_cell_id (struct msgb *msg, uint16_t cell_id) |
static int | osmo_bsslap_ie_dec_cell_id (uint16_t *cell_id, enum bsslap_msgt msgt, enum bsslap_iei iei, struct osmo_bsslap_err **err, void *err_ctx, const uint8_t *data, size_t len) |
static void | osmo_bsslap_ie_enc_ta (struct msgb *msg, uint8_t ta) |
static int | osmo_bsslap_ie_dec_ta (uint8_t *ta, enum bsslap_msgt msgt, enum bsslap_iei iei, struct osmo_bsslap_err **err, void *err_ctx, const uint8_t *data, size_t len) |
static void | osmo_bsslap_ie_enc_cause (struct msgb *msg, enum bsslap_cause cause) |
static int | osmo_bsslap_ie_dec_cause (enum bsslap_cause *cause, enum bsslap_msgt msgt, enum bsslap_iei iei, struct osmo_bsslap_err **err, void *err_ctx, const uint8_t *data, size_t len) |
static void | osmo_bsslap_ie_enc_chan_desc (struct msgb *msg, const struct gsm48_chan_desc *chan_desc) |
static int | osmo_bsslap_ie_dec_chan_desc (struct gsm48_chan_desc *chan_desc, enum bsslap_msgt msgt, enum bsslap_iei iei, struct osmo_bsslap_err **err, void *err_ctx, const uint8_t *data, size_t len) |
Variables | |
const struct value_string | osmo_bsslap_msgt_names [] |
const struct value_string | osmo_bsslap_iei_names [] |
static const struct tlv_definition | osmo_bsslap_tlvdef |
const struct value_string | osmo_bsslap_msgt_names [] |
const struct value_string | osmo_bsslap_iei_names [] |
#define DEC_ERR | ( | RC, | |
MSG_TYPE, | |||
IEI, | |||
CAUSE, | |||
fmt, | |||
args... | |||
) |
enum bsslap_cause |
enum bsslap_iei |
enum bsslap_msgt |
int osmo_bsslap_dec | ( | struct bsslap_pdu * | pdu, |
struct osmo_bsslap_err ** | err, | ||
void * | err_ctx, | ||
const uint8_t * | data, | ||
size_t | len | ||
) |
Decode BSSLAP PDU (3GPP TS 48.071).
[out] | pdu | Write decoded values here. |
[out] | err | Returned pointer to error info, dynamically allocated; NULL to not return any. |
[in] | err_ctx | Talloc context to allocate err from, if required. |
[in] | data | Pointer to BSSLAP PDU raw data. |
[in] | len | Data length to decode. |
References bsslap_pdu::abort, BSSLAP_IEI_CAUSE, BSSLAP_IEI_CELL_ID, BSSLAP_IEI_CHAN_DESC, BSSLAP_IEI_TA, BSSLAP_MSGT_ABORT, BSSLAP_MSGT_REJECT, BSSLAP_MSGT_RESET, BSSLAP_MSGT_TA_LAYER3, BSSLAP_MSGT_TA_REQUEST, BSSLAP_MSGT_TA_RESPONSE, bsslap_reset::cause, bsslap_ta_response::cell_id, bsslap_reset::cell_id, bsslap_reset::chan_desc, data, DEC_ERR, DEC_IE_MANDATORY, LCS_CAUSE_UNSPECIFIED, len, bsslap_pdu::msg_type, osmo_bsslap_ie_dec_cause(), osmo_bsslap_ie_dec_cell_id(), osmo_bsslap_ie_dec_chan_desc(), osmo_bsslap_ie_dec_ta(), osmo_bsslap_tlvdef, bsslap_pdu::reject, bsslap_pdu::reset, bsslap_ta_response::ta, bsslap_ta_layer3::ta, bsslap_reset::ta, bsslap_pdu::ta_layer3, bsslap_pdu::ta_response, and tlv_parse2().
Referenced by osmo_bssmap_le_ie_dec_apdu().
int osmo_bsslap_enc | ( | struct msgb * | msg, |
const struct bsslap_pdu * | pdu | ||
) |
Encode BSSLAP PDU and append to msgb (3GPP TS 48.071).
[out] | msg | msgb to append to. |
[in] | pdu | PDU data to encode. |
References bsslap_pdu::abort, BSSLAP_MSGT_ABORT, BSSLAP_MSGT_REJECT, BSSLAP_MSGT_RESET, BSSLAP_MSGT_TA_LAYER3, BSSLAP_MSGT_TA_REQUEST, BSSLAP_MSGT_TA_RESPONSE, bsslap_reset::cause, bsslap_ta_response::cell_id, bsslap_reset::cell_id, bsslap_reset::chan_desc, ENOTSUP, msg, bsslap_pdu::msg_type, msgb_put_u8(), osmo_bsslap_ie_enc_cause(), osmo_bsslap_ie_enc_cell_id(), osmo_bsslap_ie_enc_chan_desc(), osmo_bsslap_ie_enc_ta(), bsslap_pdu::reject, bsslap_pdu::reset, bsslap_ta_response::ta, bsslap_ta_layer3::ta, bsslap_reset::ta, bsslap_pdu::ta_layer3, and bsslap_pdu::ta_response.
Referenced by osmo_bssmap_le_ie_enc_apdu().
|
static |
References cause, data, DEC_ERR, iei, LCS_CAUSE_UNSPECIFIED, and len.
Referenced by osmo_bsslap_dec().
|
static |
References data, DEC_ERR, iei, LCS_CAUSE_UNSPECIFIED, and len.
Referenced by osmo_bsslap_dec().
|
static |
References chan_desc, data, DEC_ERR, iei, LCS_CAUSE_UNSPECIFIED, and len.
Referenced by osmo_bsslap_dec().
|
static |
References data, DEC_ERR, iei, LCS_CAUSE_UNSPECIFIED, len, and ta.
Referenced by osmo_bsslap_dec().
|
static |
References BSSLAP_IEI_CAUSE, cause, msg, and msgb_put_u8().
Referenced by osmo_bsslap_enc().
|
static |
References BSSLAP_IEI_CELL_ID, msg, msgb_put_u16(), and msgb_put_u8().
Referenced by osmo_bsslap_enc().
|
static |
References BSSLAP_IEI_CHAN_DESC, chan_desc, msg, msgb_put(), and msgb_put_u8().
Referenced by osmo_bsslap_enc().
|
static |
References BSSLAP_IEI_TA, msg, msgb_put_u8(), and ta.
Referenced by osmo_bsslap_enc().
|
inlinestatic |
References get_value_string(), and osmo_bsslap_iei_names.
|
inlinestatic |
References get_value_string(), and osmo_bsslap_msgt_names.
Referenced by osmo_bssap_le_pdu_to_str_buf().
|
extern |
Referenced by osmo_bsslap_iei_name().
const struct value_string osmo_bsslap_iei_names[] |
Referenced by osmo_bsslap_iei_name().
|
extern |
Referenced by osmo_bsslap_msgt_name().
const struct value_string osmo_bsslap_msgt_names[] |
Referenced by osmo_bsslap_msgt_name().
|
static |
Referenced by osmo_bsslap_dec().