Browse Source

cbsp: Add enum and value string for Cause

Change-Id: I35592bb4fff2e7b442d0e0cd537b66687862baf2
changes/58/28258/2
Pau Espin 4 weeks ago
parent
commit
0cdd0abd53
  1. 1
      TODO-RELEASE
  2. 26
      include/osmocom/gsm/cbsp.h
  3. 21
      src/gsm/cbsp.c

1
TODO-RELEASE

@ -12,3 +12,4 @@ libosmogsm add struct member Add codec_list_bss_supported to gsm0808_handover_re
libosmogb ABI BREAKAGE Add reset_ack_notification function pointer to struct bssgp_bvc_fsm_ops
libosmogsm add API Add rach_tx_integer_raw2val() in gsm_utils.h
libosmogsm add API iuup.h
libosmogsm add API cbsp.h enum osmo_cbsp_cause, osmo_cbsp_cause_name(s)

26
include/osmocom/gsm/cbsp.h

@ -71,7 +71,7 @@ struct osmo_cbsp_fail_ent {
struct llist_head list; /* entry in a fail_list below */
enum CELL_IDENT id_discr;
union gsm0808_cell_id_u cell_id;
uint8_t cause;
uint8_t cause; /* enum osmo_cbsp_cause */
};
@ -241,6 +241,30 @@ struct osmo_cbsp_error_ind {
enum cbsp_channel_ind *channel_ind;
};
/* 8.2.13 Cause */
enum osmo_cbsp_cause {
OSMO_CBSP_CAUSE_PARAM_NOT_RECOGNISED = 0,
OSMO_CBSP_CAUSE_PARAM_VALUE_INVALID,
OSMO_CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED,
OSMO_CBSP_CAUSE_CELL_ID_NOT_VALID,
OSMO_CBSP_CAUSE_UNRECOGNISED_MESSAGE,
OSMO_CBSP_CAUSE_MISSING_MANDATORY_ELEMENT,
OSMO_CBSP_CAUSE_BSC_CAPACITY_EXCEEDED,
OSMO_CBSP_CAUSE_CELL_MEMORY_EXCEEDED,
OSMO_CBSP_CAUSE_BSC_MEMORY_EXCEEDED,
OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_SUPPORTED,
OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL,
OSMO_CBSP_CAUSE_INCOMPATIBLE_DRX_PARAM,
OSMO_CBSP_CAUSE_EXT_CHAN_NOT_SUPPORTED,
OSMO_CBSP_CAUSE_MSG_REF_ALREADY_USED,
OSMO_CBSP_CAUSE_UNSPECIFIED_ERROR,
OSMO_CBSP_CAUSE_LAI_OR_LAC_NOT_VALID,
};
extern const struct value_string osmo_cbsp_cause_names[];
static inline const char *osmo_cbsp_cause_name(enum osmo_cbsp_cause cause)
{
return get_value_string(osmo_cbsp_cause_names, cause);
}
/* decoded CBSP message */
struct osmo_cbsp_decoded {

21
src/gsm/cbsp.c

@ -1477,4 +1477,25 @@ discard_msg:
return rc;
}
/*! value_string[] for enum osmo_cbsp_cause. */
const struct value_string osmo_cbsp_cause_names[] = {
{ OSMO_CBSP_CAUSE_PARAM_NOT_RECOGNISED, "Parameter-not-recognised" },
{ OSMO_CBSP_CAUSE_PARAM_VALUE_INVALID, "Parameter-value-invalid" },
{ OSMO_CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED, "Message-reference-not-identified" },
{ OSMO_CBSP_CAUSE_CELL_ID_NOT_VALID, "Cell-identity-not-valid" },
{ OSMO_CBSP_CAUSE_UNRECOGNISED_MESSAGE, "Unrecognised-message" },
{ OSMO_CBSP_CAUSE_MISSING_MANDATORY_ELEMENT, "Missing-mandatory-element" },
{ OSMO_CBSP_CAUSE_BSC_CAPACITY_EXCEEDED, "BSC-capacity-exceeded" },
{ OSMO_CBSP_CAUSE_CELL_MEMORY_EXCEEDED, "Cell-memory-exceeded" },
{ OSMO_CBSP_CAUSE_BSC_MEMORY_EXCEEDED, "BSC-memory-exceeded" },
{ OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_SUPPORTED, "Cell-broadcast-not-supported" },
{ OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL, "Cell-broadcast-not-operational" },
{ OSMO_CBSP_CAUSE_INCOMPATIBLE_DRX_PARAM, "Incompatible-DRX-parameter:"},
{ OSMO_CBSP_CAUSE_EXT_CHAN_NOT_SUPPORTED, "Extended-channel-not-supported"},
{ OSMO_CBSP_CAUSE_MSG_REF_ALREADY_USED, "Message-reference-already-used"},
{ OSMO_CBSP_CAUSE_UNSPECIFIED_ERROR, "Unspecified-error"},
{ OSMO_CBSP_CAUSE_LAI_OR_LAC_NOT_VALID, "LAI-or-LAC-not-valid"},
{ 0, NULL }
};
#endif /* HAVE_SYS_SOCKET_H */

Loading…
Cancel
Save