aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-06-17 12:16:31 +0800
committerHarald Welte <laforge@gnumonks.org>2012-06-17 12:17:22 +0800
commitb1fd9022ebbf8539cbf52d22a7f0723225eefe02 (patch)
tree1f3c572ba247d74202a75ad86661100a6b6bfcd3 /openbsc/include
parentfaa70ff2c6c3f592b5601aaa73a3a9a851a6d3c1 (diff)
libgb: don't call directly into GMM / LLC layer
Instead of direct function calls to individual functions, we now generate primitives (osmo_prim) and send them to one application-provided function "bssgp_prim_cb()"
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/osmocom/gprs/gprs_bssgp.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/openbsc/include/osmocom/gprs/gprs_bssgp.h b/openbsc/include/osmocom/gprs/gprs_bssgp.h
index 4fcdfb565..e060fc033 100644
--- a/openbsc/include/osmocom/gprs/gprs_bssgp.h
+++ b/openbsc/include/osmocom/gprs/gprs_bssgp.h
@@ -144,6 +144,7 @@ enum gprs_bssgp_cause {
/* Our implementation */
#include <osmocom/gsm/gsm48.h>
+#include <osmocom/gsm/prim.h>
/* gprs_bssgp_util.c */
extern struct gprs_ns_inst *bssgp_nsi;
@@ -155,6 +156,40 @@ int bssgp_tx_simple_bvci(uint8_t pdu_type, uint16_t nsei,
/* Chapter 10.4.14: Status */
int bssgp_tx_status(uint8_t cause, uint16_t *bvci, struct msgb *orig_msg);
+enum bssgp_prim {
+ PRIM_BSSGP_DL_UD,
+ PRIM_BSSGP_UL_UD,
+ PRIM_BSSGP_PTM_UD,
+
+ PRIM_BSSGP_GMM_SUSPEND,
+ PRIM_BSSGP_GMM_RESUME,
+ PRIM_BSSGP_GMM_PAGING,
+
+ PRIM_NM_FLUSH_LL,
+ PRIM_NM_LLC_DISCARDED,
+ PRIM_NM_BVC_RESET,
+ PRIM_NM_BVC_BLOCK,
+ PRIM_NM_BVC_UNBLOCK,
+};
+
+struct osmo_bssgp_prim {
+ struct osmo_prim_hdr oph;
+
+ /* common fields */
+ uint16_t nsei;
+ uint16_t bvci;
+ uint32_t tlli;
+ struct tlv_parsed *tp;
+ struct gprs_ra_id *ra_id;
+
+ /* specific fields */
+ union {
+ struct {
+ uint8_t *suspend_ref;
+ } resume;
+ } u;
+};
+
/* gprs_bssgp.c */
#define BVC_S_BLOCKED 0x0001
@@ -264,4 +299,6 @@ int gprs_bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci,
int gprs_bssgp_vty_init(void);
void gprs_bssgp_set_log_ss(int ss);
+int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx);
+
#endif /* _GPRS_BSSGP_H */