^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #ifndef LLC_C_ST_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #define LLC_C_ST_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Copyright (c) 1997 by Procom Technology,Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * This program can be redistributed or modified under the terms of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * GNU General Public License as published by the Free Software Foundation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * This program is distributed without any warranty or implied warranty
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * of merchantability or fitness for a particular purpose.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * See the GNU General Public License for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /* Connection component state management */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) /* connection states */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #define LLC_CONN_OUT_OF_SVC 0 /* prior to allocation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define LLC_CONN_STATE_ADM 1 /* disc, initial state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define LLC_CONN_STATE_SETUP 2 /* disconnected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define LLC_CONN_STATE_NORMAL 3 /* connected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define LLC_CONN_STATE_BUSY 4 /* connected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define LLC_CONN_STATE_REJ 5 /* connected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define LLC_CONN_STATE_AWAIT 6 /* connected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define LLC_CONN_STATE_AWAIT_BUSY 7 /* connected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define LLC_CONN_STATE_AWAIT_REJ 8 /* connected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #define LLC_CONN_STATE_D_CONN 9 /* disconnected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define LLC_CONN_STATE_RESET 10 /* disconnected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define LLC_CONN_STATE_ERROR 11 /* disconnected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define LLC_CONN_STATE_TEMP 12 /* disconnected state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define NBR_CONN_STATES 12 /* size of state table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define NO_STATE_CHANGE 100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) /* Connection state table structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) struct llc_conn_state_trans {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) llc_conn_ev_t ev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) u8 next_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) const llc_conn_ev_qfyr_t *ev_qualifiers;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) const llc_conn_action_t *ev_actions;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) struct llc_conn_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) u8 current_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) struct llc_conn_state_trans **transitions;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) extern struct llc_conn_state llc_conn_state_table[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #endif /* LLC_C_ST_H */