aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc/osmo_bsc_lcls.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-05-30 01:39:43 +0200
committerHarald Welte <laforge@gnumonks.org>2018-06-02 20:56:17 +0200
commitc997ceb750a67baef1a05590febe1c678b287d8f (patch)
treee50b2bf3fe565546316577aa18096bffb9bb3497 /include/osmocom/bsc/osmo_bsc_lcls.h
parent00965dca2bd78cc57ddb3989b365226908ff1c31 (diff)
Add initial 3GPP LCLS support to OsmoBSC
This code contains the following code: * receive/parse/interpret LCLS specific BSSMAP IEs and PDUs * osmo_fsm handling the various states and their transitions * call leg correlation (finding the other subscr_conn with same GCR) * communication between the two call-leg LCLS FSMs * detection of supported / unsupported LCLS configurations * display of GCR / LCLS information in "show conns" * switch the media streams locally using MDCX to the MGW Closes: OS#1602 Change-Id: I614fade62834def5cafc94c4d2578cd747a3f9f7
Diffstat (limited to 'include/osmocom/bsc/osmo_bsc_lcls.h')
-rw-r--r--include/osmocom/bsc/osmo_bsc_lcls.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/osmocom/bsc/osmo_bsc_lcls.h b/include/osmocom/bsc/osmo_bsc_lcls.h
new file mode 100644
index 000000000..2e6023404
--- /dev/null
+++ b/include/osmocom/bsc/osmo_bsc_lcls.h
@@ -0,0 +1,40 @@
+#pragma once
+#include <osmocom/core/fsm.h>
+
+enum lcls_fsm_state {
+ ST_NO_LCLS,
+ ST_NOT_YET_LS,
+ ST_NOT_POSSIBLE_LS,
+ ST_NO_LONGER_LS,
+ ST_REQ_LCLS_NOT_SUPP,
+ ST_LOCALLY_SWITCHED,
+ /* locally switched; received remote break; wait for "local" break */
+ ST_LOCALLY_SWITCHED_WAIT_BREAK,
+ /* locally switched; received break; wait for "other" break */
+ ST_LOCALLY_SWITCHED_WAIT_OTHER_BREAK,
+};
+
+enum lcls_event {
+ /* update LCLS config/control based on some BSSMAP signaling */
+ LCLS_EV_UPDATE_CFG_CSC,
+ /* apply LCLS config/control */
+ LCLS_EV_APPLY_CFG_CSC,
+ /* we have been identified as the correlation peer of another conn */
+ LCLS_EV_CORRELATED,
+ /* "other" LCLS connection has enabled local switching */
+ LCLS_EV_OTHER_ENABLED,
+ /* "other" LCLS connection is breaking local switch */
+ LCLS_EV_OTHER_BREAK,
+ /* "other" LCLS connection is dying */
+ LCLS_EV_OTHER_DEAD,
+};
+
+enum gsm0808_lcls_status lcls_get_status(struct gsm_subscriber_connection *conn);
+
+void lcls_update_config(struct gsm_subscriber_connection *conn,
+ const uint8_t *config, const uint8_t *control);
+
+void lcls_apply_config(struct gsm_subscriber_connection *conn);
+
+extern struct osmo_fsm lcls_fsm;
+