aboutsummaryrefslogtreecommitdiffstats
path: root/src/xua_asp_fsm.h
blob: 32749ecca1723c7594c5831a2469e38e95be745d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once

enum xua_asp_state {
	XUA_ASP_S_DOWN,
	XUA_ASP_S_INACTIVE,
	XUA_ASP_S_ACTIVE,
};

enum xua_asp_event {
	XUA_ASP_E_M_ASP_UP_REQ,
	XUA_ASP_E_M_ASP_ACTIVE_REQ,
	XUA_ASP_E_M_ASP_DOWN_REQ,
	XUA_ASP_E_M_ASP_INACTIVE_REQ,

	XUA_ASP_E_SCTP_COMM_DOWN_IND,
	XUA_ASP_E_SCTP_RESTART_IND,
	XUA_ASP_E_SCTP_EST_IND,

	XUA_ASP_E_ASPSM_ASPUP,
	XUA_ASP_E_ASPSM_ASPUP_ACK,
	XUA_ASP_E_ASPTM_ASPAC,
	XUA_ASP_E_ASPTM_ASPAC_ACK,
	XUA_ASP_E_ASPSM_ASPDN,
	XUA_ASP_E_ASPSM_ASPDN_ACK,
	XUA_ASP_E_ASPTM_ASPIA,
	XUA_ASP_E_ASPTM_ASPIA_ACK,

	XUA_ASP_E_ASPSM_BEAT,
	XUA_ASP_E_ASPSM_BEAT_ACK,

	/* IPA specific */
	IPA_ASP_E_ID_RESP,
	IPA_ASP_E_ID_ACK,
	IPA_ASP_E_ID_GET,

	_NUM_XUA_ASP_E
};

enum xua_asp_role {
	XUA_ASPFSM_ROLE_ASP,
	XUA_ASPFSM_ROLE_SG,
	XUA_ASPFSM_ROLE_IPSP,
};

extern struct osmo_fsm xua_asp_fsm;
extern struct osmo_fsm ipa_asp_fsm;

struct osmo_fsm_inst *xua_asp_fsm_start(struct osmo_ss7_asp *asp,
					enum xua_asp_role role, int log_level);