xref: /linux/include/net/llc_c_st.h (revision 70de41ef78573ce958ac04ecc2b5671851723c59)
11da177e4SLinus Torvalds #ifndef LLC_C_ST_H
21da177e4SLinus Torvalds #define LLC_C_ST_H
31da177e4SLinus Torvalds /*
41da177e4SLinus Torvalds  * Copyright (c) 1997 by Procom Technology,Inc.
51da177e4SLinus Torvalds  *		2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
61da177e4SLinus Torvalds  *
71da177e4SLinus Torvalds  * This program can be redistributed or modified under the terms of the
81da177e4SLinus Torvalds  * GNU General Public License as published by the Free Software Foundation.
91da177e4SLinus Torvalds  * This program is distributed without any warranty or implied warranty
101da177e4SLinus Torvalds  * of merchantability or fitness for a particular purpose.
111da177e4SLinus Torvalds  *
121da177e4SLinus Torvalds  * See the GNU General Public License for more details.
131da177e4SLinus Torvalds  */
14949d6b40SJakub Kicinski 
15949d6b40SJakub Kicinski #include <net/llc_c_ac.h>
16949d6b40SJakub Kicinski #include <net/llc_c_ev.h>
17949d6b40SJakub Kicinski 
181da177e4SLinus Torvalds /* Connection component state management */
191da177e4SLinus Torvalds /* connection states */
201da177e4SLinus Torvalds #define LLC_CONN_OUT_OF_SVC		 0	/* prior to allocation */
211da177e4SLinus Torvalds 
221da177e4SLinus Torvalds #define LLC_CONN_STATE_ADM		 1	/* disc, initial state */
231da177e4SLinus Torvalds #define LLC_CONN_STATE_SETUP		 2	/* disconnected state */
241da177e4SLinus Torvalds #define LLC_CONN_STATE_NORMAL		 3	/* connected state */
251da177e4SLinus Torvalds #define LLC_CONN_STATE_BUSY		 4	/* connected state */
261da177e4SLinus Torvalds #define LLC_CONN_STATE_REJ		 5	/* connected state */
271da177e4SLinus Torvalds #define LLC_CONN_STATE_AWAIT		 6	/* connected state */
281da177e4SLinus Torvalds #define LLC_CONN_STATE_AWAIT_BUSY	 7	/* connected state */
291da177e4SLinus Torvalds #define LLC_CONN_STATE_AWAIT_REJ	 8	/* connected state */
301da177e4SLinus Torvalds #define LLC_CONN_STATE_D_CONN		 9	/* disconnected state */
311da177e4SLinus Torvalds #define LLC_CONN_STATE_RESET		10	/* disconnected state */
321da177e4SLinus Torvalds #define LLC_CONN_STATE_ERROR		11	/* disconnected state */
331da177e4SLinus Torvalds #define LLC_CONN_STATE_TEMP		12	/* disconnected state */
341da177e4SLinus Torvalds 
351da177e4SLinus Torvalds #define NBR_CONN_STATES			12	/* size of state table */
361da177e4SLinus Torvalds #define NO_STATE_CHANGE			100
371da177e4SLinus Torvalds 
381da177e4SLinus Torvalds /* Connection state table structure */
391da177e4SLinus Torvalds struct llc_conn_state_trans {
401da177e4SLinus Torvalds 	llc_conn_ev_t	   ev;
411da177e4SLinus Torvalds 	u8		   next_state;
429b373069SJoe Perches 	const llc_conn_ev_qfyr_t *ev_qualifiers;
4314b7d95fSJoe Perches 	const llc_conn_action_t  *ev_actions;
441da177e4SLinus Torvalds };
451da177e4SLinus Torvalds 
461da177e4SLinus Torvalds struct llc_conn_state {
471da177e4SLinus Torvalds 	u8				  current_state;
48*70de41efSChristophe JAILLET 	const struct llc_conn_state_trans **transitions;
491da177e4SLinus Torvalds };
501da177e4SLinus Torvalds 
511da177e4SLinus Torvalds extern struct llc_conn_state llc_conn_state_table[];
521da177e4SLinus Torvalds #endif /* LLC_C_ST_H */
53