gprs_ns2: Introduce gprs_ns2_lltype_str() for link layer name

Change-Id: I4b257c09d9d3c97d6da04240c7a74a95c7c93675
diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h
index 99764d0..4575329 100644
--- a/include/osmocom/gprs/gprs_ns2.h
+++ b/include/osmocom/gprs/gprs_ns2.h
@@ -47,11 +47,16 @@
 };
 
 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 470027a..30716fc 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -211,6 +211,13 @@
 	{ 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 ddfd071..2c4e897 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -119,6 +119,7 @@
 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;