aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-11 19:51:46 +0200
committerlaforge <laforge@osmocom.org>2020-10-12 13:08:42 +0000
commit05e7f7dd9974095df3f8cc4688fab100ab30e4df (patch)
tree5094ad7599ca9b1d9714c9a9b412f65c708b3511
parent6090b1db4b88367df209e8bcbb441cdd2e6a1f68 (diff)
gprs_ns2: add gprs_ns2_nse_nsei() to get the nsei of a nse
-rw-r--r--include/osmocom/gprs/gprs_ns2.h1
-rw-r--r--src/gb/gprs_ns2.c9
-rw-r--r--src/gb/libosmogb.map1
3 files changed, 11 insertions, 0 deletions
diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h
index cbd6647d..d798ac49 100644
--- a/include/osmocom/gprs/gprs_ns2.h
+++ b/include/osmocom/gprs/gprs_ns2.h
@@ -99,6 +99,7 @@ int gprs_ns2_recv_prim(struct gprs_ns2_inst *nsi, struct osmo_prim_hdr *oph);
struct gprs_ns2_nse *gprs_ns2_nse_by_nsei(struct gprs_ns2_inst *nsi, uint16_t nsei);
struct gprs_ns2_nse *gprs_ns2_create_nse(struct gprs_ns2_inst *nsi, uint16_t nsei);
+uint16_t gprs_ns2_nse_nsei(struct gprs_ns2_nse *nse);
void gprs_ns2_free_nse(struct gprs_ns2_nse *nse);
/* create vc */
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 334989c4..58304cdf 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -568,6 +568,15 @@ struct gprs_ns2_nse *gprs_ns2_create_nse(struct gprs_ns2_inst *nsi, uint16_t nse
return nse;
}
+/*! Return the NSEI
+ * \param[in] nse NS Entity
+ * \return the nsei.
+ */
+uint16_t gprs_ns2_nse_nsei(struct gprs_ns2_nse *nse)
+{
+ return nse->nsei;
+}
+
/*! Destroy given NS Entity.
* \param[in] nse NS Entity to destroy */
void gprs_ns2_free_nse(struct gprs_ns2_nse *nse)
diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map
index 980b317f..3d1d5d68 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -98,6 +98,7 @@ gprs_ns2_ll_str;
gprs_ns2_ll_str_buf;
gprs_ns2_ll_str_c;
gprs_ns2_nse_by_nsei;
+gprs_ns2_nse_nsei;
gprs_ns2_nsvc_by_nsvci;
gprs_ns2_nsvc_by_sockaddr;
gprs_ns2_recv_prim;