diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2020-09-17 17:54:39 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2020-10-09 00:26:02 +0200 |
commit | 4ae338d5b6d737fd37826c02e27e2553cf23e2a3 (patch) | |
tree | 4ad03eb36890e9fcf1fce111628b6a4b027a6214 /include/osmocom/bsc/lcs_loc_req.h | |
parent | 1ebc0422d66c23be9294d2dc243dcba62f31ecd4 (diff) |
LCS: implement the bulk of Location Services
Depends: I4d7302a4853518916b6b425e710c10568eb2ffe5 (libosmocore)
Change-Id: I28314ba97df86a118497e9b2770e2e6e2484e872
Diffstat (limited to 'include/osmocom/bsc/lcs_loc_req.h')
-rw-r--r-- | include/osmocom/bsc/lcs_loc_req.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/include/osmocom/bsc/lcs_loc_req.h b/include/osmocom/bsc/lcs_loc_req.h new file mode 100644 index 000000000..ba677e867 --- /dev/null +++ b/include/osmocom/bsc/lcs_loc_req.h @@ -0,0 +1,48 @@ +/* Location Services (LCS): BSSMAP and BSSMAP-LE Perform Location Request handling in OsmoBSC, API */ +#pragma once + +#include <osmocom/gsm/bssmap_le.h> + +#define LOG_LCS_LOC_REQ(LOC_REQ, level, fmt, args...) do { \ + if (LOC_REQ) \ + LOGPFSML((LOC_REQ)->fi, level, fmt, ## args); \ + else \ + LOGP(DLCS, level, "LCS Perf Loc Req: " fmt, ## args); \ + } while(0) + +struct lcs_ta_req; + +enum lcs_loc_req_fsm_event { + LCS_LOC_REQ_EV_RX_LB_PERFORM_LOCATION_RESPONSE, + LCS_LOC_REQ_EV_RX_A_PERFORM_LOCATION_ABORT, + LCS_LOC_REQ_EV_TA_REQ_START, + LCS_LOC_REQ_EV_TA_REQ_END, + LCS_LOC_REQ_EV_HANDOVER_PERFORMED, + LCS_LOC_REQ_EV_CONN_CLEAR, +}; + +struct lcs_loc_req { + struct osmo_fsm_inst *fi; + struct gsm_subscriber_connection *conn; + + struct { + struct bssmap_le_location_type location_type; + + bool cell_id_present; + struct gsm0808_cell_id cell_id; + + struct osmo_mobile_identity imsi; + struct osmo_mobile_identity imei; + } req; + + bool resp_present; + struct bssmap_le_perform_loc_resp resp; + + struct lcs_cause_ie lcs_cause; + + struct lcs_ta_req *ta_req; +}; + +void lcs_loc_req_start(struct gsm_subscriber_connection *conn, struct msgb *msg); +int lcs_loc_req_rx_bssmap_le(struct gsm_subscriber_connection *conn, struct msgb *msg); +void lcs_loc_req_reset(struct gsm_subscriber_connection *conn); |