xref: /linux/include/net/llc_c_st.h (revision 90e63d5354951d37fa2b3b91e6f17b95d2bf9bee)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef LLC_C_ST_H
3 #define LLC_C_ST_H
4 /*
5  * Copyright (c) 1997 by Procom Technology,Inc.
6  *		2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
7  */
8 
9 #include <net/llc_c_ac.h>
10 #include <net/llc_c_ev.h>
11 
12 /* Connection component state management */
13 /* connection states */
14 #define LLC_CONN_OUT_OF_SVC		 0	/* prior to allocation */
15 
16 #define LLC_CONN_STATE_ADM		 1	/* disc, initial state */
17 #define LLC_CONN_STATE_SETUP		 2	/* disconnected state */
18 #define LLC_CONN_STATE_NORMAL		 3	/* connected state */
19 #define LLC_CONN_STATE_BUSY		 4	/* connected state */
20 #define LLC_CONN_STATE_REJ		 5	/* connected state */
21 #define LLC_CONN_STATE_AWAIT		 6	/* connected state */
22 #define LLC_CONN_STATE_AWAIT_BUSY	 7	/* connected state */
23 #define LLC_CONN_STATE_AWAIT_REJ	 8	/* connected state */
24 #define LLC_CONN_STATE_D_CONN		 9	/* disconnected state */
25 #define LLC_CONN_STATE_RESET		10	/* disconnected state */
26 #define LLC_CONN_STATE_ERROR		11	/* disconnected state */
27 #define LLC_CONN_STATE_TEMP		12	/* disconnected state */
28 
29 #define NBR_CONN_STATES			12	/* size of state table */
30 #define NO_STATE_CHANGE			100
31 
32 /* Connection state table structure */
33 struct llc_conn_state_trans {
34 	llc_conn_ev_t	   ev;
35 	u8		   next_state;
36 	const llc_conn_ev_qfyr_t *ev_qualifiers;
37 	const llc_conn_action_t  *ev_actions;
38 };
39 
40 struct llc_conn_state {
41 	u8				  current_state;
42 	const struct llc_conn_state_trans **transitions;
43 };
44 
45 extern struct llc_conn_state llc_conn_state_table[];
46 #endif /* LLC_C_ST_H */
47