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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22380 )
Change subject: gprs_bssgp_rim: add value strings for enum bssgp_nacc_cause
......................................................................
gprs_bssgp_rim: add value strings for enum bssgp_nacc_cause
Change-Id: I3354699555569c2b0bd1b4313cffd32a0cbeffe9
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, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/22380/1
diff --git a/include/osmocom/gprs/gprs_bssgp_rim.h b/include/osmocom/gprs/gprs_bssgp_rim.h
index 7e9efcd..5e5966e 100644
--- a/include/osmocom/gprs/gprs_bssgp_rim.h
+++ b/include/osmocom/gprs/gprs_bssgp_rim.h
@@ -96,6 +96,12 @@
BSSGP_NACC_CAUSE_SIPSI_SET_ERR,
};
+extern const struct value_string bssgp_nacc_cause_strs[];
+
+/*! Obtain a human-readable string for NACC Cause code */
+static inline const char *bssgp_nacc_cause_str(enum bssgp_nacc_cause val)
+{ return get_value_string(bssgp_nacc_cause_strs, val); }
+
/* 3GPP TS 48.018, table 11.3.64.1.a, Application Error Container coding for NACC */
struct bssgp_app_err_cont_nacc {
enum bssgp_nacc_cause nacc_cause;
diff --git a/src/gb/gprs_bssgp_rim.c b/src/gb/gprs_bssgp_rim.c
index 23fb3a0..7d6c2f2 100644
--- a/src/gb/gprs_bssgp_rim.c
+++ b/src/gb/gprs_bssgp_rim.c
@@ -270,6 +270,17 @@
return (int)(buf_ptr - buf);
}
+/* 3GPP TS 48.018, table 11.3.64.1.b, NACC Cause coding */
+const struct value_string bssgp_nacc_cause_strs[] = {
+ { BSSGP_NACC_CAUSE_UNSPEC, "unspecified error" },
+ { BSSGP_NACC_CAUSE_SYNTAX_ERR, "syntax error in app. container" },
+ { BSSGP_NACC_CAUSE_RPRT_CELL_MISSMTCH, "reporting cell id. mismatch" },
+ { BSSGP_NACC_CAUSE_SIPSI_TYPE_ERR, "SI/PSI type error" },
+ { BSSGP_NACC_CAUSE_SIPSI_LEN_ERR, "SI/PSI inconsistent length" },
+ { BSSGP_NACC_CAUSE_SIPSI_SET_ERR, "inconsistent set of msg" },
+ { 0, NULL }
+};
+
/*! Decode a Application Error Container for NACC (3GPP TS 48.018, section 11.3.64.1).
* \param[out] user provided memory for decoded data struct.
* \param[in] buf user provided memory with the encoded value data of the IE.
diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map
index 763ddc6..dc9df3a 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -29,6 +29,7 @@
bssgp_msgb_copy;
bssgp_msgb_tlli_put;
bssgp_msgb_ra_put;
+bssgp_nacc_cause_strs;
bssgp_parse_cell_id;
bssgp_parse_rim_pdu;
bssgp_parse_rim_ri;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22380
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3354699555569c2b0bd1b4313cffd32a0cbeffe9
Gerrit-Change-Number: 22380
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210122/51611cfa/attachment.htm>