aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gprs
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-27 01:09:01 +0100
committerAlexander Couzens <lynxis@fe80.eu>2020-10-27 15:24:47 +0100
commit2498f1db9df89a5496944a6b84d51f11ae185504 (patch)
tree487b3bae833cefa95b1d20a2c1e954a947891d78 /include/osmocom/gprs
parent0346b643b52920490e3b632e1219efcd1075d0b1 (diff)
ns2: add value strings for ns2_affecting_cause_prim_str & ns2_prim_str
Diffstat (limited to 'include/osmocom/gprs')
-rw-r--r--include/osmocom/gprs/gprs_ns2.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h
index fddc896a..975ddcb6 100644
--- a/include/osmocom/gprs/gprs_ns2.h
+++ b/include/osmocom/gprs/gprs_ns2.h
@@ -36,6 +36,12 @@ enum gprs_ns2_prim {
PRIM_NS_STATUS,
};
+extern const struct value_string ns2_prim_strs[];
+
+/*! Obtain a human-readable string for NS primitives */
+static inline const char *gprs_ns2_prim_str(enum gprs_ns2_prim val)
+{ return get_value_string(ns2_prim_strs, val); }
+
/*! Osmocom NS primitives according to 48.016 5.2.2.4 Service primitves */
enum gprs_ns2_congestion_cause {
NS_CONG_CAUSE_BACKWARD_BEGIN,
@@ -55,6 +61,12 @@ enum gprs_ns2_affecting_cause {
NS_AFF_CAUSE_SNS_FAILURE,
};
+extern const struct value_string gprs_ns2_aff_cause_prim_strs[];
+
+/*! Obtain a human-readable string for NS affective cause in primitives */
+static inline const char *gprs_ns2_aff_cause_prim_str(enum gprs_ns2_affecting_cause val)
+{ return get_value_string(gprs_ns2_aff_cause_prim_strs, val); }
+
/*! Osmocom NS primitives according to 48.016 5.2.2.7 Service primitves */
enum gprs_ns2_change_ip_endpoint {
NS_ENDPOINT_NO_CHANGE,