blob: b9b7a4e5874ce1f0baac695f709776174ff0d089 [file] [log] [blame]
Neels Hofmeyr4ae338d2020-09-17 17:54:39 +02001/* Location Services (LCS): BSSLAP TA Request handling in OsmoBSC, API */
2#pragma once
3
4#include <osmocom/bsc/debug.h>
5#include <osmocom/bsc/gsm_data.h>
6#include <osmocom/core/fsm.h>
7#include <osmocom/gsm/bssmap_le.h>
8
9#define LOG_LCS_TA_REQ(TA_REQ, level, fmt, args...) do { \
10 if (TA_REQ) \
11 LOGPFSML((TA_REQ)->fi, level, fmt, ## args); \
12 else \
13 LOGP(DLCS, level, "LCS TA Req: " fmt, ## args); \
14 } while(0)
15
16enum lcs_ta_req_fsm_event {
17 LCS_TA_REQ_EV_GOT_TA,
18 LCS_TA_REQ_EV_ABORT,
19};
20
21struct lcs_ta_req {
22 struct osmo_fsm_inst *fi;
23 struct lcs_loc_req *loc_req;
24 enum lcs_cause failure_cause;
25 uint8_t failure_diagnostic_val;
26};
27int lcs_ta_req_start(struct lcs_loc_req *lcs_loc_req);
28
29void lcs_bsslap_rx(struct gsm_subscriber_connection *conn, struct msgb *msg);