aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gprs/gprs_bssgp.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-09 14:43:33 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-09 14:43:33 +0100
commit7214a9148eeea567e6934965ee805e65c23ce59f (patch)
tree4d62c884d8bbcbf11736ccfa92541cb87b7a108e /include/osmocom/gprs/gprs_bssgp.h
parentc867e1472348c7a551cc83718d2fe74e6baa1c6f (diff)
UNTESTED WIP: remove global bssgp_nsi variablelaforge/gprs-ns-instances
As we can now have several NS instances inside the program, let's remove the global bsspg_nsi to which BSSGP bound itself. Rather, all functions are now parametrized based on the NS Instance that's either * explicitly passed to the function (in case no msgb and no bctx), or * stated in the BVC context / bctx (if any), or * explicitly given as argument to the function (if no msgb and no bctx) Change-Id: Ibc7df60caf4adef690001536bd7a1293d866a1c2
Diffstat (limited to 'include/osmocom/gprs/gprs_bssgp.h')
-rw-r--r--include/osmocom/gprs/gprs_bssgp.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h
index b70487ce..f349e8a1 100644
--- a/include/osmocom/gprs/gprs_bssgp.h
+++ b/include/osmocom/gprs/gprs_bssgp.h
@@ -16,10 +16,10 @@ struct msgb *bssgp_msgb_copy(const struct msgb *msg, const char *name);
const char *bssgp_cause_str(enum gprs_bssgp_cause cause);
const char *bssgp_pdu_str(enum bssgp_pdu_type pdu);
/* Transmit a simple response such as BLOCK/UNBLOCK/RESET ACK/NACK */
-int bssgp_tx_simple_bvci(uint8_t pdu_type, uint16_t nsei,
+int bssgp_tx_simple_bvci(struct gprs_ns_inst *nsi, uint8_t pdu_type, uint16_t nsei,
uint16_t bvci, uint16_t ns_bvci);
/* Chapter 10.4.14: Status */
-int bssgp_tx_status(uint8_t cause, uint16_t *bvci, struct msgb *orig_msg);
+int bssgp_tx_status(struct gprs_ns_inst *nsi, uint8_t cause, uint16_t *bvci, struct msgb *orig_msg);
enum bssgp_prim {
PRIM_BSSGP_DL_UD,
@@ -45,6 +45,7 @@ struct osmo_bssgp_prim {
uint16_t nsei;
uint16_t bvci;
uint32_t tlli;
+ struct gprs_ns_inst *nsi;
struct tlv_parsed *tp;
struct gprs_ra_id *ra_id;
@@ -86,6 +87,7 @@ struct bssgp_bvc_ctx {
struct gprs_ra_id ra_id; /*!< parsed RA ID of the remote BTS */
uint16_t cell_id; /*!< Cell ID of the remote BTS */
+ struct gprs_ns_inst *nsi;
/* NSEI and BVCI of underlying Gb link. Together they
* uniquely identify a link to a BTS (5.4.4) */
uint16_t bvci;
@@ -185,8 +187,8 @@ struct bssgp_paging_info {
};
/* Send a single GMM-PAGING.req to a given NSEI/NS-BVCI */
-int bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci,
- struct bssgp_paging_info *pinfo);
+int bssgp_tx_paging(struct gprs_ns_inst *nsi, uint16_t nsei,
+ uint16_t ns_bvci, struct bssgp_paging_info *pinfo);
void bssgp_fc_init(struct bssgp_flow_control *fc,
uint32_t bucket_size_max, uint32_t bucket_leak_rate,