diff options
-rw-r--r-- | include/osmocom/gprs/gprs_ns2.h | 5 | ||||
-rw-r--r-- | src/gb/gprs_ns2.c | 7 | ||||
-rw-r--r-- | src/gb/libosmogb.map | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h index 99764d05..45753292 100644 --- a/include/osmocom/gprs/gprs_ns2.h +++ b/include/osmocom/gprs/gprs_ns2.h @@ -47,11 +47,16 @@ enum gprs_ns2_prim { }; extern const struct value_string gprs_ns2_prim_strs[]; +extern const struct value_string gprs_ns2_lltype_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(gprs_ns2_prim_strs, val); } +/*! Obtain a human-readable string for NS link-layer type */ +static inline const char *gprs_ns2_lltype_str(enum gprs_ns2_ll val) +{ return get_value_string(gprs_ns2_lltype_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, diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index 470027ad..30716fc3 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -211,6 +211,13 @@ const struct value_string gprs_ns2_prim_strs[] = { { 0, NULL } }; +const struct value_string gprs_ns2_lltype_strs[] = { + { GPRS_NS2_LL_UDP, "UDP" }, + { GPRS_NS2_LL_FR_GRE, "FR_GRE" }, + { GPRS_NS2_LL_FR, "FR" }, + { 0, NULL } +}; + /*! string-format a given NS-VC into a user-supplied buffer. * \param[in] buf user-allocated output buffer * \param[in] buf_len size of user-allocated output buffer in bytes diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map index ddfd0710..2c4e897e 100644 --- a/src/gb/libosmogb.map +++ b/src/gb/libosmogb.map @@ -119,6 +119,7 @@ gprs_ns2_is_ip_bind; gprs_ns2_ll_str; gprs_ns2_ll_str_buf; gprs_ns2_ll_str_c; +gprs_ns2_lltype_strs; gprs_ns2_nse_by_nsei; gprs_ns2_nse_foreach_nsvc; gprs_ns2_nse_nsei; |