aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gprs/gprs_ns2.h
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-11 23:23:31 +0200
committerAlexander Couzens <lynxis@fe80.eu>2020-10-12 15:54:21 +0200
commit6cb5d5f2e03a70329ae60c405f46f993a1b520cf (patch)
tree5d11fed704697cfc5bb16ad8039a2d9c0d4ff0bb /include/osmocom/gprs/gprs_ns2.h
parentd33512b997143b2354566a0df88d33ba096ec84d (diff)
gprs_ns2: add gprs_ns2_nse_foreach_nsvc()
Allow to loop over all NSVC within a NSE via a callback Change-Id: I5a2bb95d05d06d909347e2fb084a446ead888cb3
Diffstat (limited to 'include/osmocom/gprs/gprs_ns2.h')
-rw-r--r--include/osmocom/gprs/gprs_ns2.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h
index efdc8f34..6f33f797 100644
--- a/include/osmocom/gprs/gprs_ns2.h
+++ b/include/osmocom/gprs/gprs_ns2.h
@@ -97,6 +97,11 @@ int gprs_ns2_dynamic_create_nse(struct gprs_ns2_inst *nsi, bool create_nse);
/* Entrypoint for primitives from the NS USER */
int gprs_ns2_recv_prim(struct gprs_ns2_inst *nsi, struct osmo_prim_hdr *oph);
+/*! a callback to iterate over all NSVC */
+typedef int (*gprs_ns2_foreach_nsvc_cb)(struct gprs_ns2_vc *nsvc, void *ctx);
+
+int gprs_ns2_nse_foreach_nsvc(struct gprs_ns2_nse *nse,
+ gprs_ns2_foreach_nsvc_cb cb, void *cb_data);
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);