aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gprs
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-12-04 18:50:11 +0100
committerlaforge <laforge@osmocom.org>2020-12-08 12:27:38 +0000
commit8f82528bf7d4681bc4cd753330fa6a5af568b34b (patch)
tree3870469f121cdad51a5b0194b7733a6b19cba929 /include/osmocom/gprs
parent30a929430686149f7f9cb6d29a3fae834e33ed85 (diff)
bssgp: Add osmo_tlv_prot_def for BSSGP
Diffstat (limited to 'include/osmocom/gprs')
-rw-r--r--include/osmocom/gprs/gprs_bssgp.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h
index e962b444..dc2a8d0a 100644
--- a/include/osmocom/gprs/gprs_bssgp.h
+++ b/include/osmocom/gprs/gprs_bssgp.h
@@ -12,8 +12,21 @@
#include <osmocom/gprs/protocol/gsm_08_18.h>
/* gprs_bssgp_util.c */
-typedef int (*bssgp_bvc_send)(void *ctx, struct msgb *msg);
+#define BSSGP_PDUF_UL 0x0001 /* PDU may occur in uplink */
+#define BSSGP_PDUF_DL 0x0002 /* PDU may occur in downlink */
+#define BSSGP_PDUF_SIG 0x0004 /* PDU may occur on Signaling BVC */
+#define BSSGP_PDUF_PTP 0x0008 /* PDU may occur on PTP BVC */
+#define BSSGP_PDUF_PTM 0x0010 /* PDU may occur on PTM BVC */
+
+extern const struct osmo_tlv_prot_def osmo_pdef_bssgp;
+
+/*! return the PDU type flags (UL/DL/SIG/PTP/PTM) of specified PDU type */
+static inline uint32_t bssgp_pdu_type_flags(uint8_t pdu_type) {
+ return osmo_tlv_prot_msgt_flags(&osmo_pdef_bssgp, pdu_type);
+}
+
+typedef int (*bssgp_bvc_send)(void *ctx, struct msgb *msg);
extern struct gprs_ns_inst *bssgp_nsi;
void bssgp_set_bssgp_callback(bssgp_bvc_send ns_send, void *data);
struct msgb *bssgp_msgb_alloc(void);