blob: dc775074248ace1d761758785443bd1e4429a2e1 [file] [log] [blame]
Harald Welteb53e2bf2020-08-21 16:33:42 +02001#pragma once
2
3#include <osmocom/core/linuxlist.h>
4#include <osmocom/core/logging.h>
5#include <osmocom/core/rate_ctr.h>
6#include <osmocom/core/stat_item.h>
7#include <osmocom/core/tdef.h>
8
9#include <osmocom/ctrl/control_if.h>
10
Neels Hofmeyr72992152020-09-19 02:36:08 +020011struct osmo_sccp_instance;
12struct sccp_lb_inst;
Harald Welteb53e2bf2020-08-21 16:33:42 +020013
14struct smlc_state {
Neels Hofmeyr72992152020-09-19 02:36:08 +020015 struct osmo_sccp_instance *sccp_inst;
16 struct sccp_lb_inst *lb;
17
Harald Welteb53e2bf2020-08-21 16:33:42 +020018 struct ctrl_handle *ctrl;
19
20 struct rate_ctr_group *ctrs;
21 struct osmo_stat_item_group *statg;
Neels Hofmeyr72992152020-09-19 02:36:08 +020022
23 struct llist_head subscribers;
24 struct llist_head cell_locations;
Harald Welteb53e2bf2020-08-21 16:33:42 +020025};
26
27extern struct smlc_state *g_smlc;
Neels Hofmeyr72992152020-09-19 02:36:08 +020028struct smlc_state *smlc_state_alloc(void *ctx);
Harald Welteb53e2bf2020-08-21 16:33:42 +020029
Neels Hofmeyr72992152020-09-19 02:36:08 +020030extern struct osmo_tdef g_smlc_tdefs[];
Harald Welteb53e2bf2020-08-21 16:33:42 +020031
32int smlc_ctrl_node_lookup(void *data, vector vline, int *node_type,
33 void **node_data, int *i);
34
35enum smlc_ctrl_node {
36 CTRL_NODE_SMLC = _LAST_CTRL_NODE,
37 _LAST_CTRL_NODE_SMLC
38};
Neels Hofmeyr72992152020-09-19 02:36:08 +020039
40enum {
41 SMLC_CTR_BSSMAP_LE_RX_UDT_RESET,
42 SMLC_CTR_BSSMAP_LE_RX_UDT_RESET_ACK,
43 SMLC_CTR_BSSMAP_LE_RX_UDT_ERR_INVALID_MSG,
44 SMLC_CTR_BSSMAP_LE_RX_DT1_ERR_INVALID_MSG,
45 SMLC_CTR_BSSMAP_LE_RX_DT1_PERFORM_LOCATION_REQUEST,
46 SMLC_CTR_BSSMAP_LE_RX_DT1_BSSLAP_TA_RESPONSE,
47 SMLC_CTR_BSSMAP_LE_RX_DT1_BSSLAP_REJECT,
48 SMLC_CTR_BSSMAP_LE_RX_DT1_BSSLAP_RESET,
49 SMLC_CTR_BSSMAP_LE_RX_DT1_BSSLAP_ABORT,
50
51 SMLC_CTR_BSSMAP_LE_TX_ERR_INVALID_MSG,
52 SMLC_CTR_BSSMAP_LE_TX_ERR_CONN_NOT_READY,
53 SMLC_CTR_BSSMAP_LE_TX_ERR_SEND,
54 SMLC_CTR_BSSMAP_LE_TX_SUCCESS,
55
56 SMLC_CTR_BSSMAP_LE_TX_UDT_RESET,
57 SMLC_CTR_BSSMAP_LE_TX_UDT_RESET_ACK,
58 SMLC_CTR_BSSMAP_LE_TX_DT1_PERFORM_LOCATION_RESPONSE,
59 SMLC_CTR_BSSMAP_LE_TX_DT1_BSSLAP_TA_REQUEST,
60};