Harald Welte | b53e2bf | 2020-08-21 16:33:42 +0200 | [diff] [blame] | 1 | #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 Hofmeyr | 7299215 | 2020-09-19 02:36:08 +0200 | [diff] [blame] | 11 | struct osmo_sccp_instance; |
| 12 | struct sccp_lb_inst; |
Harald Welte | b53e2bf | 2020-08-21 16:33:42 +0200 | [diff] [blame] | 13 | |
| 14 | struct smlc_state { |
Neels Hofmeyr | 7299215 | 2020-09-19 02:36:08 +0200 | [diff] [blame] | 15 | struct osmo_sccp_instance *sccp_inst; |
| 16 | struct sccp_lb_inst *lb; |
| 17 | |
Harald Welte | b53e2bf | 2020-08-21 16:33:42 +0200 | [diff] [blame] | 18 | struct ctrl_handle *ctrl; |
| 19 | |
| 20 | struct rate_ctr_group *ctrs; |
| 21 | struct osmo_stat_item_group *statg; |
Neels Hofmeyr | 7299215 | 2020-09-19 02:36:08 +0200 | [diff] [blame] | 22 | |
| 23 | struct llist_head subscribers; |
| 24 | struct llist_head cell_locations; |
Harald Welte | b53e2bf | 2020-08-21 16:33:42 +0200 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | extern struct smlc_state *g_smlc; |
Neels Hofmeyr | 7299215 | 2020-09-19 02:36:08 +0200 | [diff] [blame] | 28 | struct smlc_state *smlc_state_alloc(void *ctx); |
Harald Welte | b53e2bf | 2020-08-21 16:33:42 +0200 | [diff] [blame] | 29 | |
Neels Hofmeyr | 7299215 | 2020-09-19 02:36:08 +0200 | [diff] [blame] | 30 | extern struct osmo_tdef g_smlc_tdefs[]; |
Harald Welte | b53e2bf | 2020-08-21 16:33:42 +0200 | [diff] [blame] | 31 | |
| 32 | int smlc_ctrl_node_lookup(void *data, vector vline, int *node_type, |
| 33 | void **node_data, int *i); |
| 34 | |
| 35 | enum smlc_ctrl_node { |
| 36 | CTRL_NODE_SMLC = _LAST_CTRL_NODE, |
| 37 | _LAST_CTRL_NODE_SMLC |
| 38 | }; |
Neels Hofmeyr | 7299215 | 2020-09-19 02:36:08 +0200 | [diff] [blame] | 39 | |
| 40 | enum { |
| 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 | }; |