blob: 234161fa04ccff370e5417795bdc80c5ee92f0eb [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
27 /* RR HO ACC (access burst on ext HO) */
28 GSCON_EV_RR_HO_ACC, /* NOT USED YET! */
29 /* RR HANDOVER COMPLETE received */
30 GSCON_EV_RR_HO_COMPL, /* NOT USED YET! */
31 GSCON_EV_RR_HO_FAIL, /* NOT USED YET! */
32
33 /* RSL RLL Release Indication */
34 GSCON_EV_RLL_REL_IND,
35 /* RSL CONNection FAILure Indication */
36 GSCON_EV_RSL_CONN_FAIL,
37
38 /* RSL/lchan tells us clearing is complete */
39 GSCON_EV_RSL_CLEAR_COMPL,
40
41 /* Mobile-originated DTAP (from MS) */
42 GSCON_EV_MO_DTAP,
43 /* Mobile-terminated DTAP (from MSC) */
44 GSCON_EV_MT_DTAP,
45
46 /* Transmit custom SCCP message */
47 GSCON_EV_TX_SCCP,
48
49 /* MGW is indicating failure (BTS) */
50 GSCON_EV_MGW_FAIL_BTS,
51 /* MGW is indicating failure (MSC) */
52 GSCON_EV_MGW_FAIL_MSC,
53 /* CRCX response received (BTS) */
54 GSCON_EV_MGW_CRCX_RESP_BTS,
55 /* MDCX response received (BTS) */
56 GSCON_EV_MGW_MDCX_RESP_BTS,
57 /* CRCX response received (MSC) */
58 GSCON_EV_MGW_CRCX_RESP_MSC,
59
60 /* Internal handover request (intra-BSC handover) */
61 GSCON_EV_HO_START,
62 /* Handover timed out (T3103 in handover_logic.c) */
63 GSCON_EV_HO_TIMEOUT,
64 /* Handover failed (handover_logic.c) */
65 GSCON_EV_HO_FAIL,
66 /* Handover completed successfully (handover_logic.c) */
67 GSCON_EV_HO_COMPL,
68};
69
70struct gsm_subscriber_connection;
71struct gsm_network;
72
73/* Allocate a subscriber connection and its associated FSM */
74struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *net);