Back to home page

OSCL-LXR

 
 

    


0001 #ifndef LLC_C_ST_H
0002 #define LLC_C_ST_H
0003 /*
0004  * Copyright (c) 1997 by Procom Technology,Inc.
0005  *      2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
0006  *
0007  * This program can be redistributed or modified under the terms of the
0008  * GNU General Public License as published by the Free Software Foundation.
0009  * This program is distributed without any warranty or implied warranty
0010  * of merchantability or fitness for a particular purpose.
0011  *
0012  * See the GNU General Public License for more details.
0013  */
0014 
0015 #include <net/llc_c_ac.h>
0016 #include <net/llc_c_ev.h>
0017 
0018 /* Connection component state management */
0019 /* connection states */
0020 #define LLC_CONN_OUT_OF_SVC      0  /* prior to allocation */
0021  
0022 #define LLC_CONN_STATE_ADM       1  /* disc, initial state */
0023 #define LLC_CONN_STATE_SETUP         2  /* disconnected state */
0024 #define LLC_CONN_STATE_NORMAL        3  /* connected state */
0025 #define LLC_CONN_STATE_BUSY      4  /* connected state */
0026 #define LLC_CONN_STATE_REJ       5  /* connected state */
0027 #define LLC_CONN_STATE_AWAIT         6  /* connected state */
0028 #define LLC_CONN_STATE_AWAIT_BUSY    7  /* connected state */
0029 #define LLC_CONN_STATE_AWAIT_REJ     8  /* connected state */
0030 #define LLC_CONN_STATE_D_CONN        9  /* disconnected state */
0031 #define LLC_CONN_STATE_RESET        10  /* disconnected state */
0032 #define LLC_CONN_STATE_ERROR        11  /* disconnected state */
0033 #define LLC_CONN_STATE_TEMP     12  /* disconnected state */
0034 
0035 #define NBR_CONN_STATES         12  /* size of state table */
0036 #define NO_STATE_CHANGE         100
0037 
0038 /* Connection state table structure */
0039 struct llc_conn_state_trans {
0040     llc_conn_ev_t      ev;
0041     u8         next_state;
0042     const llc_conn_ev_qfyr_t *ev_qualifiers;
0043     const llc_conn_action_t  *ev_actions;
0044 };
0045 
0046 struct llc_conn_state {
0047     u8              current_state;
0048     struct llc_conn_state_trans **transitions;
0049 };
0050 
0051 extern struct llc_conn_state llc_conn_state_table[];
0052 #endif /* LLC_C_ST_H */