Harald Welte | c997ceb | 2018-05-30 01:39:43 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | #include <osmocom/core/fsm.h> |
| 3 | |
| 4 | enum lcls_fsm_state { |
| 5 | ST_NO_LCLS, |
| 6 | ST_NOT_YET_LS, |
| 7 | ST_NOT_POSSIBLE_LS, |
| 8 | ST_NO_LONGER_LS, |
| 9 | ST_REQ_LCLS_NOT_SUPP, |
| 10 | ST_LOCALLY_SWITCHED, |
| 11 | /* locally switched; received remote break; wait for "local" break */ |
| 12 | ST_LOCALLY_SWITCHED_WAIT_BREAK, |
| 13 | /* locally switched; received break; wait for "other" break */ |
| 14 | ST_LOCALLY_SWITCHED_WAIT_OTHER_BREAK, |
| 15 | }; |
| 16 | |
| 17 | enum lcls_event { |
| 18 | /* update LCLS config/control based on some BSSMAP signaling */ |
| 19 | LCLS_EV_UPDATE_CFG_CSC, |
| 20 | /* apply LCLS config/control */ |
| 21 | LCLS_EV_APPLY_CFG_CSC, |
| 22 | /* we have been identified as the correlation peer of another conn */ |
| 23 | LCLS_EV_CORRELATED, |
| 24 | /* "other" LCLS connection has enabled local switching */ |
| 25 | LCLS_EV_OTHER_ENABLED, |
| 26 | /* "other" LCLS connection is breaking local switch */ |
| 27 | LCLS_EV_OTHER_BREAK, |
| 28 | /* "other" LCLS connection is dying */ |
| 29 | LCLS_EV_OTHER_DEAD, |
| 30 | }; |
| 31 | |
| 32 | enum gsm0808_lcls_status lcls_get_status(struct gsm_subscriber_connection *conn); |
| 33 | |
| 34 | void lcls_update_config(struct gsm_subscriber_connection *conn, |
| 35 | const uint8_t *config, const uint8_t *control); |
| 36 | |
| 37 | void lcls_apply_config(struct gsm_subscriber_connection *conn); |
| 38 | |
| 39 | extern struct osmo_fsm lcls_fsm; |
| 40 | |