blob: 942152877ddeec60dcf1854b980d7cc45fd8f3bb [file] [log] [blame]
Harald Welte3561bd42018-01-28 03:04:16 +01001#pragma once
2#include <osmocom/core/fsm.h>
3
4enum gscon_fsm_event {
5 /* local SCCP stack tells us incoming conn from MSC */
6 GSCON_EV_A_CONN_IND,
7 /* RSL side requests CONNECT to MSC */
8 GSCON_EV_A_CONN_REQ,
9 /* MSC confirms the SCCP connection */
10 GSCON_EV_A_CONN_CFM,
11 /* MSC requests assignment */
12 GSCON_EV_A_ASSIGNMENT_CMD,
13 /* MSC has sent BSSMAP CLEAR CMD */
14 GSCON_EV_A_CLEAR_CMD,
15 /* MSC SCCP disconnect indication */
16 GSCON_EV_A_DISC_IND,
17 /* MSC sends Handover Request (in CR) */
18 GSCON_EV_A_HO_REQ,
19
20 /* RR ASSIGNMENT COMPLETE received */
21 GSCON_EV_RR_ASS_COMPL,
22 /* RR ASSIGNMENT FAIL received */
23 GSCON_EV_RR_ASS_FAIL,
24 /* RR MODE MODIFY ACK received */
25 GSCON_EV_RR_MODE_MODIFY_ACK,
26
Harald Welte3561bd42018-01-28 03:04:16 +010027 /* RSL RLL Release Indication */
28 GSCON_EV_RLL_REL_IND,
29 /* RSL CONNection FAILure Indication */
30 GSCON_EV_RSL_CONN_FAIL,
31
32 /* RSL/lchan tells us clearing is complete */
33 GSCON_EV_RSL_CLEAR_COMPL,
34
35 /* Mobile-originated DTAP (from MS) */
36 GSCON_EV_MO_DTAP,
37 /* Mobile-terminated DTAP (from MSC) */
38 GSCON_EV_MT_DTAP,
39
40 /* Transmit custom SCCP message */
41 GSCON_EV_TX_SCCP,
42
43 /* MGW is indicating failure (BTS) */
44 GSCON_EV_MGW_FAIL_BTS,
45 /* MGW is indicating failure (MSC) */
46 GSCON_EV_MGW_FAIL_MSC,
47 /* CRCX response received (BTS) */
48 GSCON_EV_MGW_CRCX_RESP_BTS,
49 /* MDCX response received (BTS) */
50 GSCON_EV_MGW_MDCX_RESP_BTS,
51 /* CRCX response received (MSC) */
52 GSCON_EV_MGW_CRCX_RESP_MSC,
53
54 /* Internal handover request (intra-BSC handover) */
55 GSCON_EV_HO_START,
56 /* Handover timed out (T3103 in handover_logic.c) */
57 GSCON_EV_HO_TIMEOUT,
58 /* Handover failed (handover_logic.c) */
59 GSCON_EV_HO_FAIL,
60 /* Handover completed successfully (handover_logic.c) */
61 GSCON_EV_HO_COMPL,
62};
63
64struct gsm_subscriber_connection;
65struct gsm_network;
66
67/* Allocate a subscriber connection and its associated FSM */
68struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *net);