This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/231 add rsl_or_ipac_msg_name() for both standard and ip.access msg types Context: in osmo-bts, I want to look up an RSL message name in rsl_msgt_names and fall back to rsl_ipac_msgt_names if not found, because the IPAC PDCH ACT and DEACT messages are sent in a standard ABIS_RSL_MDISC_DED_CHAN. Change-Id: Ic9ba721a1469cf51aed97ab0f44a7fe055c94b1f --- M include/osmocom/gsm/rsl.h M src/gsm/libosmogsm.map M src/gsm/rsl.c 3 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/231/1 diff --git a/include/osmocom/gsm/rsl.h b/include/osmocom/gsm/rsl.h index 418e3f0..b140d48 100644 --- a/include/osmocom/gsm/rsl.h +++ b/include/osmocom/gsm/rsl.h @@ -39,6 +39,7 @@ const char *rsl_rlm_cause_name(uint8_t err); const char *rsl_msg_name(uint8_t err); const char *rsl_ipac_msg_name(uint8_t msg_type); +const char *rsl_or_ipac_msg_name(uint8_t msg_type); /* Section 3.3.2.3 TS 05.02. I think this looks like a table */ int rsl_ccch_conf_to_bs_cc_chans(int ccch_conf); diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 301f5aa..ea2101c 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -266,6 +266,7 @@ 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 de2e9d7..c3c32a9 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -382,6 +382,17 @@ 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" }, -- To view, visit https://gerrit.osmocom.org/231 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic9ba721a1469cf51aed97ab0f44a7fe055c94b1f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>