libosmogsm 1.10.0.64-ff3d
Osmocom GSM library
|
#include "config.h"
#include <errno.h>
#include <sys/types.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/msgb.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/cbsp.h>
#include <osmocom/gsm/gsm0808_utils.h>
Functions | |
struct msgb * | osmo_cbsp_msgb_alloc (void *ctx, const char *name) |
static void | msgb_put_cbsp_cell_list (struct msgb *msg, const struct osmo_cbsp_cell_list *cl) |
static void | msgb_put_cbsp_fail_list (struct msgb *msg, const struct llist_head *fl) |
static void | msgb_put_cbsp_loading_list (struct msgb *msg, const struct osmo_cbsp_loading_list *ll) |
static void | msgb_put_cbsp_num_compl_list (struct msgb *msg, const struct osmo_cbsp_num_compl_list *cl) |
static int | encode_wperiod (uint32_t secs) |
static int | cbsp_enc_write_repl (struct msgb *msg, const struct osmo_cbsp_write_replace *in) |
static int | cbsp_enc_write_repl_compl (struct msgb *msg, const struct osmo_cbsp_write_replace_complete *in) |
static int | cbsp_enc_write_repl_fail (struct msgb *msg, const struct osmo_cbsp_write_replace_failure *in) |
static int | cbsp_enc_kill (struct msgb *msg, const struct osmo_cbsp_kill *in) |
static int | cbsp_enc_kill_compl (struct msgb *msg, const struct osmo_cbsp_kill_complete *in) |
static int | cbsp_enc_kill_fail (struct msgb *msg, const struct osmo_cbsp_kill_failure *in) |
static int | cbsp_enc_load_query (struct msgb *msg, const struct osmo_cbsp_load_query *in) |
static int | cbsp_enc_load_query_compl (struct msgb *msg, const struct osmo_cbsp_load_query_complete *in) |
static int | cbsp_enc_load_query_fail (struct msgb *msg, const struct osmo_cbsp_load_query_failure *in) |
static int | cbsp_enc_msg_status_query (struct msgb *msg, const struct osmo_cbsp_msg_status_query *in) |
static int | cbsp_enc_msg_status_query_compl (struct msgb *msg, const struct osmo_cbsp_msg_status_query_complete *in) |
static int | cbsp_enc_msg_status_query_fail (struct msgb *msg, const struct osmo_cbsp_msg_status_query_failure *in) |
static int | cbsp_enc_reset (struct msgb *msg, const struct osmo_cbsp_reset *in) |
static int | cbsp_enc_reset_compl (struct msgb *msg, const struct osmo_cbsp_reset_complete *in) |
static int | cbsp_enc_reset_fail (struct msgb *msg, const struct osmo_cbsp_reset_failure *in) |
static int | cbsp_enc_keep_alive (struct msgb *msg, const struct osmo_cbsp_keep_alive *in) |
static int | cbsp_enc_keep_alive_compl (struct msgb *msg, const struct osmo_cbsp_keep_alive_complete *in) |
static int | cbsp_enc_restart (struct msgb *msg, const struct osmo_cbsp_restart *in) |
static int | cbsp_enc_failure (struct msgb *msg, const struct osmo_cbsp_failure *in) |
static int | cbsp_enc_error_ind (struct msgb *msg, const struct osmo_cbsp_error_ind *in) |
struct msgb * | osmo_cbsp_encode (void *ctx, const struct osmo_cbsp_decoded *in) |
Encode a CBSP message from the decoded/parsed structure representation to binary PDU. More... | |
static int | cbsp_decode_cell_list (struct osmo_cbsp_cell_list *cl, void *ctx, const uint8_t *buf, unsigned int len) |
static int | cbsp_decode_fail_list (struct llist_head *fl, void *ctx, const uint8_t *buf, unsigned int len) |
static int | cbsp_decode_loading_list (struct osmo_cbsp_loading_list *ll, void *ctx, const uint8_t *buf, unsigned int len) |
static int | cbsp_decode_num_compl_list (struct osmo_cbsp_num_compl_list *cl, void *ctx, const uint8_t *buf, unsigned int len) |
static uint32_t | decode_wperiod (uint8_t in) |
static int | cbsp_dec_write_repl (struct osmo_cbsp_write_replace *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_write_repl_compl (struct osmo_cbsp_write_replace_complete *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_write_repl_fail (struct osmo_cbsp_write_replace_failure *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_kill (struct osmo_cbsp_kill *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_kill_compl (struct osmo_cbsp_kill_complete *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_kill_fail (struct osmo_cbsp_kill_failure *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_load_query (struct osmo_cbsp_load_query *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_load_query_compl (struct osmo_cbsp_load_query_complete *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_load_query_fail (struct osmo_cbsp_load_query_failure *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_msg_status_query (struct osmo_cbsp_msg_status_query *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_msg_status_query_compl (struct osmo_cbsp_msg_status_query_complete *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_msg_status_query_fail (struct osmo_cbsp_msg_status_query_failure *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_reset (struct osmo_cbsp_reset *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_reset_compl (struct osmo_cbsp_reset_complete *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_reset_fail (struct osmo_cbsp_reset_failure *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_keep_alive (struct osmo_cbsp_keep_alive *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_keep_alive_compl (struct osmo_cbsp_keep_alive_complete *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_restart (struct osmo_cbsp_restart *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_failure (struct osmo_cbsp_failure *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
static int | cbsp_dec_error_ind (struct osmo_cbsp_error_ind *out, const struct tlv_parsed *tp, struct msgb *in, void *ctx) |
struct osmo_cbsp_decoded * | osmo_cbsp_decode (void *ctx, struct msgb *in) |
Decode a CBSP message from wire formwat to pased structure. More... | |
void | osmo_cbsp_init_struct (struct osmo_cbsp_decoded *cbsp, enum cbsp_msg_type msg_type) |
struct osmo_cbsp_decoded * | osmo_cbsp_decoded_alloc (void *ctx, enum cbsp_msg_type msg_type) |
Dynamically allocate and initialize decoded CBSP structure. More... | |
Variables | |
__thread const char * | osmo_cbsp_errstr |
|
static |
References osmo_cbsp_error_ind::cause, CBSP_IEI_CAUSE, CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_NEW_SERIAL_NR, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_error_ind::channel_ind, osmo_cbsp_error_ind::msg_id, osmo_cbsp_error_ind::new_serial_nr, osmo_cbsp_error_ind::old_serial_nr, osmo_cbsp_errstr, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
|
static |
References CBSP_IEI_KEEP_ALIVE_REP_PERIOD, decode_wperiod(), osmo_cbsp_errstr, osmo_cbsp_keep_alive::repetition_period, TLVP_PRES_LEN, and TLVP_VAL.
Referenced by osmo_cbsp_decode().
|
static |
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), CBSP_IEI_CELL_LIST, CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_kill::cell_list, osmo_cbsp_kill::channel_ind, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_kill::msg_id, osmo_cbsp_kill::old_serial_nr, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), cbsp_decode_num_compl_list(), CBSP_IEI_CELL_LIST, CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_NUM_BCAST_COMPL_LIST, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_kill_complete::cell_list, osmo_cbsp_kill_complete::channel_ind, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, osmo_cbsp_kill_complete::msg_id, osmo_cbsp_kill_complete::num_compl_list, osmo_cbsp_kill_complete::old_serial_nr, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), cbsp_decode_fail_list(), cbsp_decode_num_compl_list(), CBSP_IEI_CELL_LIST, CBSP_IEI_CHANNEL_IND, CBSP_IEI_FAILURE_LIST, CBSP_IEI_MSG_ID, CBSP_IEI_NUM_BCAST_COMPL_LIST, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_kill_failure::cell_list, osmo_cbsp_kill_failure::channel_ind, osmo_cbsp_kill_failure::fail_list, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, osmo_cbsp_kill_failure::msg_id, osmo_cbsp_kill_failure::num_compl_list, osmo_cbsp_kill_failure::old_serial_nr, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
|
static |
References cbsp_decode_loading_list(), CBSP_IEI_CHANNEL_IND, CBSP_IEI_RR_LOADING_LIST, osmo_cbsp_load_query_complete::channel_ind, INIT_LLIST_HEAD, osmo_cbsp_loading_list::list, osmo_cbsp_load_query_complete::loading_list, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, and TLVP_VAL.
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_fail_list(), cbsp_decode_loading_list(), CBSP_IEI_CHANNEL_IND, CBSP_IEI_FAILURE_LIST, CBSP_IEI_RR_LOADING_LIST, osmo_cbsp_load_query_failure::channel_ind, osmo_cbsp_load_query_failure::fail_list, INIT_LLIST_HEAD, osmo_cbsp_loading_list::list, osmo_cbsp_load_query_failure::loading_list, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, and TLVP_VAL.
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), CBSP_IEI_CELL_LIST, CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_msg_status_query::cell_list, osmo_cbsp_msg_status_query::channel_ind, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_msg_status_query::msg_id, osmo_cbsp_msg_status_query::old_serial_nr, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_num_compl_list(), CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_NUM_BCAST_COMPL_LIST, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_msg_status_query_complete::channel_ind, INIT_LLIST_HEAD, osmo_cbsp_num_compl_list::list, osmo_cbsp_msg_status_query_complete::msg_id, osmo_cbsp_msg_status_query_complete::num_compl_list, osmo_cbsp_msg_status_query_complete::old_serial_nr, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_fail_list(), cbsp_decode_num_compl_list(), CBSP_IEI_CHANNEL_IND, CBSP_IEI_FAILURE_LIST, CBSP_IEI_MSG_ID, CBSP_IEI_NUM_BCAST_COMPL_LIST, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_msg_status_query_failure::channel_ind, osmo_cbsp_msg_status_query_failure::fail_list, INIT_LLIST_HEAD, osmo_cbsp_num_compl_list::list, osmo_cbsp_msg_status_query_failure::msg_id, osmo_cbsp_msg_status_query_failure::num_compl_list, osmo_cbsp_msg_status_query_failure::old_serial_nr, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), CBSP_IEI_CELL_LIST, osmo_cbsp_reset::cell_list, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, and TLVP_VAL.
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), CBSP_IEI_CELL_LIST, osmo_cbsp_reset_complete::cell_list, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, and TLVP_VAL.
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), cbsp_decode_fail_list(), CBSP_IEI_CELL_LIST, CBSP_IEI_FAILURE_LIST, osmo_cbsp_reset_failure::cell_list, osmo_cbsp_reset_failure::fail_list, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, and TLVP_VAL.
Referenced by osmo_cbsp_decode().
|
static |
References osmo_cbsp_restart::bcast_msg_type, cbsp_decode_cell_list(), CBSP_IEI_BCAST_MSG_TYPE, CBSP_IEI_CELL_LIST, CBSP_IEI_RECOVERY_IND, osmo_cbsp_restart::cell_list, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_errstr, osmo_cbsp_restart::recovery_ind, TLVP_LEN, TLVP_PRES_LEN, and TLVP_VAL.
Referenced by osmo_cbsp_decode().
|
static |
References osmo_cbsp_write_replace::category, osmo_cbsp_write_replace::cbs, cbsp_decode_cell_list(), CBSP_IEI_CATEGORY, CBSP_IEI_CELL_LIST, CBSP_IEI_CHANNEL_IND, CBSP_IEI_DCS, CBSP_IEI_EMERG_IND, CBSP_IEI_MSG_CONTENT, CBSP_IEI_MSG_ID, CBSP_IEI_NEW_SERIAL_NR, CBSP_IEI_NUM_BCAST_REQ, CBSP_IEI_NUM_OF_PAGES, CBSP_IEI_OLD_SERIAL_NR, CBSP_IEI_REP_PERIOD, CBSP_IEI_WARN_SEC_INFO, CBSP_IEI_WARN_TYPE, CBSP_IEI_WARNING_PERIOD, osmo_cbsp_write_replace::cell_list, osmo_cbsp_write_replace::channel_ind, osmo_cbsp_write_replace::dcs, decode_wperiod(), osmo_cbsp_write_replace::emergency, osmo_cbsp_write_replace::indicator, INIT_LLIST_HEAD, osmo_cbsp_write_replace::is_cbs, osmo_cbsp_cell_list::list, llist_add_tail(), osmo_cbsp_write_replace::msg_content, osmo_cbsp_write_replace::msg_id, osmo_cbsp_write_replace::new_serial_nr, osmo_cbsp_write_replace::num_bcast_req, osmo_cbsp_write_replace::old_serial_nr, OSMO_ASSERT, osmo_cbsp_errstr, page, osmo_cbsp_write_replace::rep_period, TLVP_LEN, TLVP_PRES_LEN, TLVP_PRESENT, TLVP_VAL, tlvp_val16be(), osmo_cbsp_write_replace::u, osmo_cbsp_write_replace::warning_period, osmo_cbsp_write_replace::warning_sec_info, and osmo_cbsp_write_replace::warning_type.
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), cbsp_decode_num_compl_list(), CBSP_IEI_CELL_LIST, CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_NEW_SERIAL_NR, CBSP_IEI_NUM_BCAST_COMPL_LIST, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_write_replace_complete::cell_list, osmo_cbsp_write_replace_complete::channel_ind, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, osmo_cbsp_write_replace_complete::msg_id, osmo_cbsp_write_replace_complete::new_serial_nr, osmo_cbsp_write_replace_complete::num_compl_list, osmo_cbsp_write_replace_complete::old_serial_nr, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
References cbsp_decode_cell_list(), cbsp_decode_fail_list(), cbsp_decode_num_compl_list(), CBSP_IEI_CELL_LIST, CBSP_IEI_CHANNEL_IND, CBSP_IEI_FAILURE_LIST, CBSP_IEI_MSG_ID, CBSP_IEI_NEW_SERIAL_NR, CBSP_IEI_NUM_BCAST_COMPL_LIST, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_write_replace_failure::cell_list, osmo_cbsp_write_replace_failure::channel_ind, osmo_cbsp_write_replace_failure::fail_list, INIT_LLIST_HEAD, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, osmo_cbsp_write_replace_failure::msg_id, osmo_cbsp_write_replace_failure::new_serial_nr, osmo_cbsp_write_replace_failure::num_compl_list, osmo_cbsp_write_replace_failure::old_serial_nr, osmo_cbsp_errstr, TLVP_LEN, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
Referenced by osmo_cbsp_decode().
|
static |
References osmo_cbsp_cell_ent::cell_id, gsm0808_cell_id_size(), gsm0808_decode_cell_id_u(), osmo_cbsp_cell_list::id_discr, len, osmo_cbsp_cell_ent::list, osmo_cbsp_cell_list::list, llist_add_tail(), OSMO_ASSERT, and osmo_cbsp_errstr.
Referenced by cbsp_dec_kill(), cbsp_dec_kill_compl(), cbsp_dec_kill_fail(), cbsp_dec_load_query(), cbsp_dec_msg_status_query(), cbsp_dec_reset(), cbsp_dec_reset_compl(), cbsp_dec_reset_fail(), cbsp_dec_restart(), cbsp_dec_write_repl(), cbsp_dec_write_repl_compl(), and cbsp_dec_write_repl_fail().
|
static |
References osmo_cbsp_fail_ent::cause, osmo_cbsp_fail_ent::cell_id, gsm0808_cell_id_size(), gsm0808_decode_cell_id_u(), osmo_cbsp_fail_ent::id_discr, len, osmo_cbsp_fail_ent::list, llist_add_tail(), OSMO_ASSERT, and osmo_cbsp_errstr.
Referenced by cbsp_dec_failure(), cbsp_dec_kill_fail(), cbsp_dec_load_query_fail(), cbsp_dec_msg_status_query_fail(), cbsp_dec_reset_fail(), and cbsp_dec_write_repl_fail().
|
static |
References osmo_cbsp_loading_ent::cell_id, gsm0808_cell_id_size(), gsm0808_decode_cell_id_u(), osmo_cbsp_loading_list::id_discr, len, osmo_cbsp_loading_ent::list, osmo_cbsp_loading_list::list, llist_add_tail(), osmo_cbsp_loading_ent::load, OSMO_ASSERT, and osmo_cbsp_errstr.
Referenced by cbsp_dec_load_query_compl(), and cbsp_dec_load_query_fail().
|
static |
References osmo_cbsp_num_compl_ent::cell_id, gsm0808_cell_id_size(), gsm0808_decode_cell_id_u(), osmo_cbsp_num_compl_list::id_discr, len, osmo_cbsp_num_compl_ent::list, osmo_cbsp_num_compl_list::list, llist_add_tail(), osmo_cbsp_num_compl_ent::num_bcast_info, osmo_cbsp_num_compl_ent::num_compl, OSMO_ASSERT, and osmo_cbsp_errstr.
Referenced by cbsp_dec_kill_compl(), cbsp_dec_kill_fail(), cbsp_dec_msg_status_query_compl(), cbsp_dec_msg_status_query_fail(), cbsp_dec_write_repl_compl(), and cbsp_dec_write_repl_fail().
|
static |
References osmo_cbsp_error_ind::cause, CBSP_IEI_CAUSE, CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_NEW_SERIAL_NR, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_error_ind::channel_ind, msg, osmo_cbsp_error_ind::msg_id, msgb_tv16_put(), msgb_tv_put(), osmo_cbsp_error_ind::new_serial_nr, and osmo_cbsp_error_ind::old_serial_nr.
Referenced by osmo_cbsp_encode().
|
static |
References osmo_cbsp_failure::bcast_msg_type, CBSP_IEI_BCAST_MSG_TYPE, osmo_cbsp_failure::fail_list, msg, msgb_put_cbsp_fail_list(), and msgb_tv_put().
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_KEEP_ALIVE_REP_PERIOD, encode_wperiod(), msg, msgb_tv_put(), and osmo_cbsp_keep_alive::repetition_period.
Referenced by osmo_cbsp_encode().
|
static |
Referenced by osmo_cbsp_encode().
|
static |
|
static |
References CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_kill_complete::cell_list, osmo_cbsp_kill_complete::channel_ind, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, llist_empty(), msg, osmo_cbsp_kill_complete::msg_id, msgb_put_cbsp_cell_list(), msgb_put_cbsp_num_compl_list(), msgb_tv16_put(), msgb_tv_put(), osmo_cbsp_kill_complete::num_compl_list, and osmo_cbsp_kill_complete::old_serial_nr.
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_kill_failure::cell_list, osmo_cbsp_kill_failure::channel_ind, osmo_cbsp_kill_failure::fail_list, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, llist_empty(), msg, osmo_cbsp_kill_failure::msg_id, msgb_put_cbsp_cell_list(), msgb_put_cbsp_fail_list(), msgb_put_cbsp_num_compl_list(), msgb_tv16_put(), msgb_tv_put(), osmo_cbsp_kill_failure::num_compl_list, and osmo_cbsp_kill_failure::old_serial_nr.
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, osmo_cbsp_load_query::cell_list, osmo_cbsp_load_query::channel_ind, msg, msgb_put_cbsp_cell_list(), and msgb_tv_put().
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, osmo_cbsp_load_query_complete::channel_ind, osmo_cbsp_load_query_complete::loading_list, msg, msgb_put_cbsp_loading_list(), and msgb_tv_put().
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, osmo_cbsp_load_query_failure::channel_ind, osmo_cbsp_load_query_failure::fail_list, osmo_cbsp_loading_list::list, llist_empty(), osmo_cbsp_load_query_failure::loading_list, msg, msgb_put_cbsp_fail_list(), msgb_put_cbsp_loading_list(), and msgb_tv_put().
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_msg_status_query::cell_list, osmo_cbsp_msg_status_query::channel_ind, msg, osmo_cbsp_msg_status_query::msg_id, msgb_put_cbsp_cell_list(), msgb_tv16_put(), msgb_tv_put(), and osmo_cbsp_msg_status_query::old_serial_nr.
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_msg_status_query_complete::channel_ind, msg, osmo_cbsp_msg_status_query_complete::msg_id, msgb_put_cbsp_num_compl_list(), msgb_tv16_put(), msgb_tv_put(), osmo_cbsp_msg_status_query_complete::num_compl_list, and osmo_cbsp_msg_status_query_complete::old_serial_nr.
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_msg_status_query_failure::channel_ind, osmo_cbsp_msg_status_query_failure::fail_list, osmo_cbsp_num_compl_list::list, llist_empty(), msg, osmo_cbsp_msg_status_query_failure::msg_id, msgb_put_cbsp_fail_list(), msgb_put_cbsp_num_compl_list(), msgb_tv16_put(), msgb_tv_put(), osmo_cbsp_msg_status_query_failure::num_compl_list, and osmo_cbsp_msg_status_query_failure::old_serial_nr.
Referenced by osmo_cbsp_encode().
|
static |
References osmo_cbsp_reset::cell_list, msg, and msgb_put_cbsp_cell_list().
Referenced by osmo_cbsp_encode().
|
static |
References osmo_cbsp_reset_complete::cell_list, msg, and msgb_put_cbsp_cell_list().
Referenced by osmo_cbsp_encode().
|
static |
|
static |
|
static |
References osmo_cbsp_write_replace::category, osmo_cbsp_write_replace::cbs, CBSP_IEI_CATEGORY, CBSP_IEI_CHANNEL_IND, CBSP_IEI_DCS, CBSP_IEI_EMERG_IND, CBSP_IEI_MSG_CONTENT, CBSP_IEI_MSG_ID, CBSP_IEI_NEW_SERIAL_NR, CBSP_IEI_NUM_BCAST_REQ, CBSP_IEI_NUM_OF_PAGES, CBSP_IEI_OLD_SERIAL_NR, CBSP_IEI_REP_PERIOD, CBSP_IEI_WARN_SEC_INFO, CBSP_IEI_WARN_TYPE, CBSP_IEI_WARNING_PERIOD, osmo_cbsp_write_replace::cell_list, osmo_cbsp_write_replace::channel_ind, osmo_cbsp_content::data, osmo_cbsp_write_replace::dcs, osmo_cbsp_write_replace::emergency, encode_wperiod(), osmo_cbsp_write_replace::indicator, osmo_cbsp_write_replace::is_cbs, osmo_cbsp_content::list, llist_count(), llist_for_each_entry, msg, osmo_cbsp_write_replace::msg_content, osmo_cbsp_write_replace::msg_id, msgb_put(), msgb_put_cbsp_cell_list(), msgb_put_u8(), msgb_tv16_put(), msgb_tv_put(), osmo_cbsp_write_replace::new_serial_nr, osmo_cbsp_write_replace::num_bcast_req, osmo_cbsp_write_replace::old_serial_nr, osmo_cbsp_errstr, osmo_cbsp_write_replace::rep_period, osmo_cbsp_write_replace::u, osmo_cbsp_content::user_len, osmo_cbsp_write_replace::warning_period, osmo_cbsp_write_replace::warning_sec_info, and osmo_cbsp_write_replace::warning_type.
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_NEW_SERIAL_NR, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_write_replace_complete::cell_list, osmo_cbsp_write_replace_complete::channel_ind, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, llist_empty(), msg, osmo_cbsp_write_replace_complete::msg_id, msgb_put_cbsp_cell_list(), msgb_put_cbsp_num_compl_list(), msgb_tv16_put(), msgb_tv_put(), osmo_cbsp_write_replace_complete::new_serial_nr, osmo_cbsp_write_replace_complete::num_compl_list, and osmo_cbsp_write_replace_complete::old_serial_nr.
Referenced by osmo_cbsp_encode().
|
static |
References CBSP_IEI_CHANNEL_IND, CBSP_IEI_MSG_ID, CBSP_IEI_NEW_SERIAL_NR, CBSP_IEI_OLD_SERIAL_NR, osmo_cbsp_write_replace_failure::cell_list, osmo_cbsp_write_replace_failure::channel_ind, osmo_cbsp_write_replace_failure::fail_list, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, llist_empty(), msg, osmo_cbsp_write_replace_failure::msg_id, msgb_put_cbsp_cell_list(), msgb_put_cbsp_fail_list(), msgb_put_cbsp_num_compl_list(), msgb_tv16_put(), msgb_tv_put(), osmo_cbsp_write_replace_failure::new_serial_nr, osmo_cbsp_write_replace_failure::num_compl_list, and osmo_cbsp_write_replace_failure::old_serial_nr.
Referenced by osmo_cbsp_encode().
|
static |
Referenced by cbsp_dec_keep_alive(), and cbsp_dec_write_repl().
|
static |
References osmo_cbsp_errstr.
Referenced by cbsp_enc_keep_alive(), and cbsp_enc_write_repl().
|
static |
References CBSP_IEI_CELL_LIST, osmo_cbsp_cell_ent::cell_id, gsm0808_msgb_put_cell_id_u(), osmo_cbsp_cell_list::id_discr, osmo_cbsp_cell_ent::list, osmo_cbsp_cell_list::list, llist_for_each_entry, msg, msgb_put(), and msgb_put_u8().
Referenced by cbsp_enc_kill(), cbsp_enc_kill_compl(), cbsp_enc_kill_fail(), cbsp_enc_load_query(), cbsp_enc_msg_status_query(), cbsp_enc_reset(), cbsp_enc_reset_compl(), cbsp_enc_reset_fail(), cbsp_enc_restart(), cbsp_enc_write_repl(), cbsp_enc_write_repl_compl(), and cbsp_enc_write_repl_fail().
|
static |
References osmo_cbsp_fail_ent::cause, CBSP_IEI_FAILURE_LIST, osmo_cbsp_fail_ent::cell_id, gsm0808_msgb_put_cell_id_u(), osmo_cbsp_fail_ent::id_discr, osmo_cbsp_fail_ent::list, llist_for_each_entry, msg, msgb_put(), and msgb_put_u8().
Referenced by cbsp_enc_failure(), cbsp_enc_kill_fail(), cbsp_enc_load_query_fail(), cbsp_enc_msg_status_query_fail(), cbsp_enc_reset_fail(), and cbsp_enc_write_repl_fail().
|
static |
References CBSP_IEI_RR_LOADING_LIST, osmo_cbsp_loading_ent::cell_id, gsm0808_msgb_put_cell_id_u(), osmo_cbsp_loading_list::id_discr, osmo_cbsp_loading_ent::list, osmo_cbsp_loading_list::list, llist_for_each_entry, osmo_cbsp_loading_ent::load, msg, msgb_put(), and msgb_put_u8().
Referenced by cbsp_enc_load_query_compl(), and cbsp_enc_load_query_fail().
|
static |
References CBSP_IEI_NUM_BCAST_COMPL_LIST, osmo_cbsp_num_compl_ent::cell_id, gsm0808_msgb_put_cell_id_u(), osmo_cbsp_num_compl_list::id_discr, osmo_cbsp_num_compl_ent::list, osmo_cbsp_num_compl_list::list, llist_for_each_entry, msg, msgb_put(), msgb_put_u16(), msgb_put_u8(), osmo_cbsp_num_compl_ent::num_bcast_info, and osmo_cbsp_num_compl_ent::num_compl.
Referenced by cbsp_enc_kill_compl(), cbsp_enc_kill_fail(), cbsp_enc_msg_status_query_compl(), cbsp_enc_msg_status_query_fail(), cbsp_enc_write_repl_compl(), and cbsp_enc_write_repl_fail().
struct osmo_cbsp_decoded * osmo_cbsp_decode | ( | void * | ctx, |
struct msgb * | in | ||
) |
Decode a CBSP message from wire formwat to pased structure.
[in] | ctx | talloc context from which to allocate decoded output. |
[in] | in | message buffer contiaining binary CBSP message. |
References ARRAY_SIZE, cbsp_att_tlvdef, cbsp_dec_error_ind(), cbsp_dec_failure(), cbsp_dec_keep_alive(), cbsp_dec_keep_alive_compl(), cbsp_dec_kill(), cbsp_dec_kill_compl(), cbsp_dec_kill_fail(), cbsp_dec_load_query(), cbsp_dec_load_query_compl(), cbsp_dec_load_query_fail(), cbsp_dec_msg_status_query(), cbsp_dec_msg_status_query_compl(), cbsp_dec_msg_status_query_fail(), cbsp_dec_reset(), cbsp_dec_reset_compl(), cbsp_dec_reset_fail(), cbsp_dec_restart(), cbsp_dec_write_repl(), cbsp_dec_write_repl_compl(), cbsp_dec_write_repl_fail(), CBSP_MSGT_ERROR_IND, CBSP_MSGT_FAILURE, CBSP_MSGT_KEEP_ALIVE, CBSP_MSGT_KEEP_ALIVE_COMPL, CBSP_MSGT_KILL, CBSP_MSGT_KILL_COMPL, CBSP_MSGT_KILL_FAIL, CBSP_MSGT_LOAD_QUERY, CBSP_MSGT_LOAD_QUERY_COMPL, CBSP_MSGT_LOAD_QUERY_FAIL, CBSP_MSGT_MSG_STATUS_QUERY, CBSP_MSGT_MSG_STATUS_QUERY_COMPL, CBSP_MSGT_MSG_STATUS_QUERY_FAIL, CBSP_MSGT_RESET, CBSP_MSGT_RESET_COMPL, CBSP_MSGT_RESET_FAIL, CBSP_MSGT_RESTART, CBSP_MSGT_SET_DRX, CBSP_MSGT_SET_DRX_COMPL, CBSP_MSGT_SET_DRX_FAIL, CBSP_MSGT_WRITE_REPLACE, CBSP_MSGT_WRITE_REPLACE_COMPL, CBSP_MSGT_WRITE_REPLACE_FAIL, msgb::data, osmo_cbsp_decoded::error_ind, osmo_cbsp_decoded::failure, h, osmo_cbsp_decoded::keep_alive, osmo_cbsp_decoded::keep_alive_compl, osmo_cbsp_decoded::kill, osmo_cbsp_decoded::kill_compl, osmo_cbsp_decoded::kill_fail, msgb::l1h, msgb::l2h, len, osmo_cbsp_decoded::load_query, osmo_cbsp_decoded::load_query_compl, osmo_cbsp_decoded::load_query_fail, osmo_cbsp_decoded::msg_status_query, osmo_cbsp_decoded::msg_status_query_compl, osmo_cbsp_decoded::msg_status_query_fail, osmo_cbsp_decoded::msg_type, msgb_l1, msgb_l1len(), msgb_l2, msgb_l2len(), msgb_trim(), OSMO_ASSERT, osmo_cbsp_errstr, osmo_cbsp_decoded::reset, osmo_cbsp_decoded::reset_compl, osmo_cbsp_decoded::reset_fail, osmo_cbsp_decoded::restart, tlv_parse2(), osmo_cbsp_decoded::u, osmo_cbsp_decoded::write_replace, osmo_cbsp_decoded::write_replace_compl, and osmo_cbsp_decoded::write_replace_fail.
struct osmo_cbsp_decoded * osmo_cbsp_decoded_alloc | ( | void * | ctx, |
enum cbsp_msg_type | msg_type | ||
) |
Dynamically allocate and initialize decoded CBSP structure.
[in] | ctx | talloc context from which to allocate |
[in] | msg_type | CBSP message type for which to initialize result |
References msg_type, and osmo_cbsp_init_struct().
struct msgb * osmo_cbsp_encode | ( | void * | ctx, |
const struct osmo_cbsp_decoded * | in | ||
) |
Encode a CBSP message from the decoded/parsed structure representation to binary PDU.
[in] | ctx | talloc context from which to allocate returned msgb. |
[in] | in | decoded CBSP message which is to be encoded. Ownership not transferred. |
References cbsp_enc_error_ind(), cbsp_enc_failure(), cbsp_enc_keep_alive(), cbsp_enc_keep_alive_compl(), cbsp_enc_kill(), cbsp_enc_kill_compl(), cbsp_enc_kill_fail(), cbsp_enc_load_query(), cbsp_enc_load_query_compl(), cbsp_enc_load_query_fail(), cbsp_enc_msg_status_query(), cbsp_enc_msg_status_query_compl(), cbsp_enc_msg_status_query_fail(), cbsp_enc_reset(), cbsp_enc_reset_compl(), cbsp_enc_reset_fail(), cbsp_enc_restart(), cbsp_enc_write_repl(), cbsp_enc_write_repl_compl(), cbsp_enc_write_repl_fail(), CBSP_MSGT_ERROR_IND, CBSP_MSGT_FAILURE, CBSP_MSGT_KEEP_ALIVE, CBSP_MSGT_KEEP_ALIVE_COMPL, CBSP_MSGT_KILL, CBSP_MSGT_KILL_COMPL, CBSP_MSGT_KILL_FAIL, CBSP_MSGT_LOAD_QUERY, CBSP_MSGT_LOAD_QUERY_COMPL, CBSP_MSGT_LOAD_QUERY_FAIL, CBSP_MSGT_MSG_STATUS_QUERY, CBSP_MSGT_MSG_STATUS_QUERY_COMPL, CBSP_MSGT_MSG_STATUS_QUERY_FAIL, CBSP_MSGT_RESET, CBSP_MSGT_RESET_COMPL, CBSP_MSGT_RESET_FAIL, CBSP_MSGT_RESTART, CBSP_MSGT_SET_DRX, CBSP_MSGT_SET_DRX_COMPL, CBSP_MSGT_SET_DRX_FAIL, CBSP_MSGT_WRITE_REPLACE, CBSP_MSGT_WRITE_REPLACE_COMPL, CBSP_MSGT_WRITE_REPLACE_FAIL, osmo_cbsp_decoded::error_ind, osmo_cbsp_decoded::failure, osmo_cbsp_decoded::keep_alive, osmo_cbsp_decoded::keep_alive_compl, osmo_cbsp_decoded::kill, osmo_cbsp_decoded::kill_compl, osmo_cbsp_decoded::kill_fail, len, osmo_cbsp_decoded::load_query, osmo_cbsp_decoded::load_query_compl, osmo_cbsp_decoded::load_query_fail, msg, osmo_cbsp_decoded::msg_status_query, osmo_cbsp_decoded::msg_status_query_compl, osmo_cbsp_decoded::msg_status_query_fail, osmo_cbsp_decoded::msg_type, msgb_free(), msgb_length(), msgb_push_u8(), osmo_cbsp_errstr, osmo_cbsp_msgb_alloc(), osmo_cbsp_decoded::reset, osmo_cbsp_decoded::reset_compl, osmo_cbsp_decoded::reset_fail, osmo_cbsp_decoded::restart, osmo_cbsp_decoded::u, osmo_cbsp_decoded::write_replace, osmo_cbsp_decoded::write_replace_compl, and osmo_cbsp_decoded::write_replace_fail.
void osmo_cbsp_init_struct | ( | struct osmo_cbsp_decoded * | cbsp, |
enum cbsp_msg_type | msg_type | ||
) |
References CBSP_MSGT_FAILURE, CBSP_MSGT_KILL, CBSP_MSGT_KILL_COMPL, CBSP_MSGT_KILL_FAIL, CBSP_MSGT_LOAD_QUERY, CBSP_MSGT_LOAD_QUERY_COMPL, CBSP_MSGT_LOAD_QUERY_FAIL, CBSP_MSGT_MSG_STATUS_QUERY, CBSP_MSGT_MSG_STATUS_QUERY_COMPL, CBSP_MSGT_MSG_STATUS_QUERY_FAIL, CBSP_MSGT_RESET, CBSP_MSGT_RESET_COMPL, CBSP_MSGT_RESET_FAIL, CBSP_MSGT_RESTART, CBSP_MSGT_WRITE_REPLACE, CBSP_MSGT_WRITE_REPLACE_COMPL, CBSP_MSGT_WRITE_REPLACE_FAIL, osmo_cbsp_write_replace::cell_list, osmo_cbsp_write_replace_complete::cell_list, osmo_cbsp_write_replace_failure::cell_list, osmo_cbsp_kill::cell_list, osmo_cbsp_kill_complete::cell_list, osmo_cbsp_kill_failure::cell_list, osmo_cbsp_load_query::cell_list, osmo_cbsp_msg_status_query::cell_list, osmo_cbsp_reset::cell_list, osmo_cbsp_reset_complete::cell_list, osmo_cbsp_reset_failure::cell_list, osmo_cbsp_restart::cell_list, osmo_cbsp_write_replace_failure::fail_list, osmo_cbsp_kill_failure::fail_list, osmo_cbsp_load_query_failure::fail_list, osmo_cbsp_msg_status_query_failure::fail_list, osmo_cbsp_reset_failure::fail_list, osmo_cbsp_failure::fail_list, osmo_cbsp_decoded::failure, INIT_LLIST_HEAD, osmo_cbsp_decoded::kill, osmo_cbsp_decoded::kill_compl, osmo_cbsp_decoded::kill_fail, osmo_cbsp_cell_list::list, osmo_cbsp_num_compl_list::list, osmo_cbsp_loading_list::list, osmo_cbsp_decoded::load_query, osmo_cbsp_decoded::load_query_compl, osmo_cbsp_decoded::load_query_fail, osmo_cbsp_load_query_complete::loading_list, osmo_cbsp_decoded::msg_status_query, osmo_cbsp_decoded::msg_status_query_compl, osmo_cbsp_decoded::msg_status_query_fail, osmo_cbsp_decoded::msg_type, msg_type, osmo_cbsp_write_replace_complete::num_compl_list, osmo_cbsp_write_replace_failure::num_compl_list, osmo_cbsp_kill_complete::num_compl_list, osmo_cbsp_kill_failure::num_compl_list, osmo_cbsp_msg_status_query_complete::num_compl_list, osmo_cbsp_msg_status_query_failure::num_compl_list, osmo_cbsp_decoded::reset, osmo_cbsp_decoded::reset_compl, osmo_cbsp_decoded::reset_fail, osmo_cbsp_decoded::restart, osmo_cbsp_decoded::u, osmo_cbsp_decoded::write_replace, osmo_cbsp_decoded::write_replace_compl, and osmo_cbsp_decoded::write_replace_fail.
Referenced by osmo_cbsp_decoded_alloc().
struct msgb * osmo_cbsp_msgb_alloc | ( | void * | ctx, |
const char * | name | ||
) |
References msgb_alloc_headroom_c(), and name.
Referenced by osmo_cbsp_encode().
__thread const char* osmo_cbsp_errstr |
Referenced by cbsp_dec_error_ind(), cbsp_dec_failure(), cbsp_dec_keep_alive(), cbsp_dec_kill(), cbsp_dec_kill_compl(), cbsp_dec_kill_fail(), cbsp_dec_load_query(), cbsp_dec_load_query_compl(), cbsp_dec_load_query_fail(), cbsp_dec_msg_status_query(), cbsp_dec_msg_status_query_compl(), cbsp_dec_msg_status_query_fail(), cbsp_dec_reset(), cbsp_dec_reset_compl(), cbsp_dec_reset_fail(), cbsp_dec_restart(), cbsp_dec_write_repl(), cbsp_dec_write_repl_compl(), cbsp_dec_write_repl_fail(), cbsp_decode_cell_list(), cbsp_decode_fail_list(), cbsp_decode_loading_list(), cbsp_decode_num_compl_list(), cbsp_enc_write_repl(), encode_wperiod(), osmo_cbsp_decode(), and osmo_cbsp_encode().