diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gsm/libosmogsm.map | 1 | ||||
-rw-r--r-- | src/gsm/rsl.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 301f5aa1..ea2101c9 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -266,6 +266,7 @@ rsl_init_cchan_hdr; rsl_init_rll_hdr; rsl_ipac_msg_name; rsl_msg_name; +rsl_or_ipac_msg_name; rsl_rll_push_hdr; rsl_rll_push_l3; rsl_rll_simple; diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index de2e9d76..c3c32a92 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -382,6 +382,17 @@ const char *rsl_ipac_msg_name(uint8_t msg_type) return get_value_string(rsl_ipac_msgt_names, msg_type); } +/*! \brief Get human-readable name of standard or ip.access RSL msg type. + * If msg_type is a standard RSL message type, return its human-readable name. + * Otherwise return rsl_ipac_msg_name(msg_type). */ +const char *rsl_or_ipac_msg_name(uint8_t msg_type) +{ + const char *str = get_value_string_or_null(rsl_msgt_names, msg_type); + if (str) + return str; + return rsl_ipac_msg_name(msg_type); +} + static const struct value_string rsl_rlm_cause_strs[] = { { RLL_CAUSE_T200_EXPIRED, "Timer T200 expired (N200+1) times" }, { RLL_CAUSE_REEST_REQ, "Re-establishment request" }, |