Add human-readable names for signal_ns

Change-Id: Id664355eb8305fb287e4dae0800fb20dc2f9b8cd
Related: SYS#3610
This commit is contained in:
Max 2017-05-22 14:48:27 +02:00 committed by Harald Welte
parent c8cf820595
commit 54ca30c8d3
3 changed files with 13 additions and 0 deletions

View File

@ -203,6 +203,8 @@ enum signal_ns {
S_NS_MISMATCH, /* got an unexpected IE (sets msg, pdu_type, ie_type) */
};
extern const struct value_string gprs_ns_signal_ns_names[];
struct ns_signal_data {
struct gprs_nsvc *nsvc;
struct gprs_nsvc *old_nsvc;

View File

@ -150,6 +150,16 @@ static const struct osmo_stat_item_group_desc nsvc_statg_desc = {
.class_id = OSMO_STATS_CLASS_PEER,
};
const struct value_string gprs_ns_signal_ns_names[] = {
{ S_NS_RESET, "NS-RESET" },
{ S_NS_BLOCK, "NS-BLOCK" },
{ S_NS_UNBLOCK, "NS-UNBLOCK" },
{ S_NS_ALIVE_EXP, "NS-ALIVE expired" },
{ S_NS_REPLACED, "NSVC replaced" },
{ S_NS_MISMATCH, "Unexpected IE" },
{ 0, NULL }
};
#define CHECK_TX_RC(rc, nsvc) \
if (rc < 0) \
LOGP(DNS, LOGL_ERROR, "TX failed (%d) to peer %s\n", \

View File

@ -38,6 +38,7 @@ bssgp_tx_paging;
bssgp_vty_init;
bssgp_nsi;
gprs_ns_signal_ns_names;
gprs_ns_pdu_strings;
gprs_ns_cause_str;
gprs_ns_destroy;