Change in libosmocore[master]: gprs_bssgp_rim: add value strings for enum bssgp_rim_routing_info_discr

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/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Jan 22 19:59:32 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22386 )

Change subject: gprs_bssgp_rim: add value strings for enum bssgp_rim_routing_info_discr
......................................................................

gprs_bssgp_rim: add value strings for enum bssgp_rim_routing_info_discr

Change-Id: Idd06d2e3df0d60409a89a474018a9d97f7772090
Related: SYS#5103
---
M include/osmocom/gprs/gprs_bssgp_rim.h
M src/gb/gprs_bssgp_rim.c
M src/gb/libosmogb.map
3 files changed, 14 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/include/osmocom/gprs/gprs_bssgp_rim.h b/include/osmocom/gprs/gprs_bssgp_rim.h
index 48bf047..0810c8e 100644
--- a/include/osmocom/gprs/gprs_bssgp_rim.h
+++ b/include/osmocom/gprs/gprs_bssgp_rim.h
@@ -33,6 +33,12 @@
 	BSSGP_RIM_ROUTING_INFO_EUTRAN,
 };
 
+extern const struct value_string bssgp_rim_routing_info_discr_strs[];
+
+/*! Obtain a human-readable string for NACC Cause code */
+static inline const char *bssgp_rim_routing_info_discr_str(enum bssgp_rim_routing_info_discr val)
+{ return get_value_string(bssgp_rim_routing_info_discr_strs, val); }
+
 /*! BSSGP RIM Routing information, see also 3GPP TS 48.018, section 11.3.70 */
 struct bssgp_rim_routing_info {
 	enum bssgp_rim_routing_info_discr discr;
diff --git a/src/gb/gprs_bssgp_rim.c b/src/gb/gprs_bssgp_rim.c
index 5ef8375..844268a 100644
--- a/src/gb/gprs_bssgp_rim.c
+++ b/src/gb/gprs_bssgp_rim.c
@@ -41,6 +41,13 @@
  * (3GPP TS 48.018, sub-clause 11.3.9) but without IE and length octets. */
 #define REP_CELL_ID_LEN 8
 
+const struct value_string bssgp_rim_routing_info_discr_strs[] = {
+	{ BSSGP_RIM_ROUTING_INFO_GERAN,		"GERAN cell" },
+	{ BSSGP_RIM_ROUTING_INFO_UTRAN,		"UTRAN RNC" },
+	{ BSSGP_RIM_ROUTING_INFO_EUTRAN,	"E-UTRAN eNodeB/HeNB" },
+	{ 0, NULL }
+};
+
 /*! Parse a RIM Routing information IE (3GPP TS 48.018, chapter 11.3.70).
  *  \param[out] ri user provided memory to store the parsed results.
  *  \param[in] buf input buffer of the value part of the IE.
diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map
index 23d52a2..b4d7fdb 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -34,6 +34,7 @@
 bssgp_parse_rim_pdu;
 bssgp_parse_rim_ri;
 bssgp_ran_inf_app_id_strs;
+bssgp_rim_routing_info_discr_strs;
 bssgp_set_bssgp_callback;
 bssgp_tx_bvc_block;
 bssgp_tx_bvc_reset;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22386
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Idd06d2e3df0d60409a89a474018a9d97f7772090
Gerrit-Change-Number: 22386
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210122/8d97bd46/attachment.htm>


More information about the gerrit-log mailing list