^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #ifndef LLC_C_EV_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #define LLC_C_EV_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)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <net/sock.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) /* Connection component state transition event qualifiers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) /* Types of events (possible values in 'ev->type') */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define LLC_CONN_EV_TYPE_SIMPLE 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define LLC_CONN_EV_TYPE_CONDITION 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define LLC_CONN_EV_TYPE_PRIM 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define LLC_CONN_EV_TYPE_PDU 4 /* command/response PDU */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define LLC_CONN_EV_TYPE_ACK_TMR 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define LLC_CONN_EV_TYPE_P_TMR 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define LLC_CONN_EV_TYPE_REJ_TMR 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #define LLC_CONN_EV_TYPE_BUSY_TMR 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define LLC_CONN_EV_TYPE_RPT_STATUS 9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define LLC_CONN_EV_TYPE_SENDACK_TMR 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #define NBR_CONN_EV 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) /* Connection events which cause state transitions when fully qualified */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #define LLC_CONN_EV_CONN_REQ 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #define LLC_CONN_EV_CONN_RESP 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #define LLC_CONN_EV_DATA_REQ 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #define LLC_CONN_EV_DISC_REQ 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) #define LLC_CONN_EV_RESET_REQ 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) #define LLC_CONN_EV_RESET_RESP 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #define LLC_CONN_EV_LOCAL_BUSY_DETECTED 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #define LLC_CONN_EV_LOCAL_BUSY_CLEARED 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #define LLC_CONN_EV_RX_BAD_PDU 9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #define LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #define LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X 11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) #define LLC_CONN_EV_RX_FRMR_RSP_Fbit_SET_X 12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #define LLC_CONN_EV_RX_I_CMD_Pbit_SET_X 13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #define LLC_CONN_EV_RX_I_CMD_Pbit_SET_X_UNEXPD_Ns 14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #define LLC_CONN_EV_RX_I_CMD_Pbit_SET_X_INVAL_Ns 15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #define LLC_CONN_EV_RX_I_RSP_Fbit_SET_X 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) #define LLC_CONN_EV_RX_I_RSP_Fbit_SET_X_UNEXPD_Ns 17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) #define LLC_CONN_EV_RX_I_RSP_Fbit_SET_X_INVAL_Ns 18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #define LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_X 19
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #define LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_X 20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) #define LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_X 21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #define LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_X 22
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #define LLC_CONN_EV_RX_RR_CMD_Pbit_SET_X 23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #define LLC_CONN_EV_RX_RR_RSP_Fbit_SET_X 24
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) #define LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X 25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) #define LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X 26
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) #define LLC_CONN_EV_RX_XXX_CMD_Pbit_SET_X 27
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #define LLC_CONN_EV_RX_XXX_RSP_Fbit_SET_X 28
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) #define LLC_CONN_EV_RX_XXX_YYY 29
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) #define LLC_CONN_EV_RX_ZZZ_CMD_Pbit_SET_X_INVAL_Nr 30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) #define LLC_CONN_EV_RX_ZZZ_RSP_Fbit_SET_X_INVAL_Nr 31
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) #define LLC_CONN_EV_P_TMR_EXP 32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) #define LLC_CONN_EV_ACK_TMR_EXP 33
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) #define LLC_CONN_EV_REJ_TMR_EXP 34
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) #define LLC_CONN_EV_BUSY_TMR_EXP 35
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) #define LLC_CONN_EV_RX_XXX_CMD_Pbit_SET_1 36
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) #define LLC_CONN_EV_RX_XXX_CMD_Pbit_SET_0 37
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) #define LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns 38
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) #define LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns 39
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) #define LLC_CONN_EV_RX_I_RSP_Fbit_SET_1_UNEXPD_Ns 40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) #define LLC_CONN_EV_RX_I_CMD_Pbit_SET_1_UNEXPD_Ns 41
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) #define LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 42
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) #define LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 43
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) #define LLC_CONN_EV_RX_I_CMD_Pbit_SET_1 44
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) #define LLC_CONN_EV_RX_RR_CMD_Pbit_SET_0 45
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) #define LLC_CONN_EV_RX_RR_RSP_Fbit_SET_0 46
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) #define LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 47
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) #define LLC_CONN_EV_RX_RR_CMD_Pbit_SET_1 48
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) #define LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_0 49
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) #define LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_0 50
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) #define LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 51
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) #define LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_1 52
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) #define LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 53
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) #define LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 54
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) #define LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_1 55
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) #define LLC_CONN_EV_RX_I_RSP_Fbit_SET_1 56
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) #define LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_1 57
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) #define LLC_CONN_EV_RX_XXX_RSP_Fbit_SET_1 58
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) #define LLC_CONN_EV_TX_BUFF_FULL 59
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) #define LLC_CONN_EV_INIT_P_F_CYCLE 100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) * Connection event qualifiers; for some events a certain combination of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) * these qualifiers must be TRUE before event recognized valid for state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) * these constants act as indexes into the Event Qualifier function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) * table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) #define LLC_CONN_EV_QFY_DATA_FLAG_EQ_1 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) #define LLC_CONN_EV_QFY_DATA_FLAG_EQ_0 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) #define LLC_CONN_EV_QFY_DATA_FLAG_EQ_2 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) #define LLC_CONN_EV_QFY_P_FLAG_EQ_1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) #define LLC_CONN_EV_QFY_P_FLAG_EQ_0 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) #define LLC_CONN_EV_QFY_P_FLAG_EQ_Fbit 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) #define LLC_CONN_EV_QFY_REMOTE_BUSY_EQ_0 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) #define LLC_CONN_EV_QFY_RETRY_CNT_LT_N2 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) #define LLC_CONN_EV_QFY_RETRY_CNT_GTE_N2 9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) #define LLC_CONN_EV_QFY_S_FLAG_EQ_1 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) #define LLC_CONN_EV_QFY_S_FLAG_EQ_0 11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) #define LLC_CONN_EV_QFY_INIT_P_F_CYCLE 12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) struct llc_conn_state_ev {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) u8 prim;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) u8 prim_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) u8 reason;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) u8 status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) u8 ind_prim;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) u8 cfm_prim;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) static __inline__ struct llc_conn_state_ev *llc_conn_ev(struct sk_buff *skb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) return (struct llc_conn_state_ev *)skb->cb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) typedef int (*llc_conn_ev_t)(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) typedef int (*llc_conn_ev_qfyr_t)(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) int llc_conn_ev_conn_req(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) int llc_conn_ev_data_req(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) int llc_conn_ev_disc_req(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) int llc_conn_ev_rst_req(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) int llc_conn_ev_local_busy_detected(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) int llc_conn_ev_local_busy_cleared(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) int llc_conn_ev_rx_bad_pdu(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) int llc_conn_ev_rx_disc_cmd_pbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) int llc_conn_ev_rx_dm_rsp_fbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) int llc_conn_ev_rx_frmr_rsp_fbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) int llc_conn_ev_rx_i_cmd_pbit_set_x_inval_ns(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) int llc_conn_ev_rx_i_rsp_fbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) int llc_conn_ev_rx_i_rsp_fbit_set_x_unexpd_ns(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) int llc_conn_ev_rx_i_rsp_fbit_set_x_inval_ns(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) int llc_conn_ev_rx_rej_rsp_fbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) int llc_conn_ev_rx_sabme_cmd_pbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) int llc_conn_ev_rx_ua_rsp_fbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) int llc_conn_ev_rx_xxx_cmd_pbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) int llc_conn_ev_rx_xxx_rsp_fbit_set_x(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) int llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nr(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) int llc_conn_ev_rx_zzz_rsp_fbit_set_x_inval_nr(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) int llc_conn_ev_p_tmr_exp(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) int llc_conn_ev_ack_tmr_exp(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) int llc_conn_ev_rej_tmr_exp(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) int llc_conn_ev_busy_tmr_exp(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) int llc_conn_ev_sendack_tmr_exp(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) /* NOT_USED functions and their variations */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) int llc_conn_ev_rx_xxx_cmd_pbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) int llc_conn_ev_rx_xxx_rsp_fbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) int llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) int llc_conn_ev_rx_i_cmd_pbit_set_1_unexpd_ns(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) int llc_conn_ev_rx_i_cmd_pbit_set_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) int llc_conn_ev_rx_i_cmd_pbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) int llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_ns(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) int llc_conn_ev_rx_i_rsp_fbit_set_1_unexpd_ns(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) int llc_conn_ev_rx_i_rsp_fbit_set_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) int llc_conn_ev_rx_i_rsp_fbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) int llc_conn_ev_rx_rr_cmd_pbit_set_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) int llc_conn_ev_rx_rr_cmd_pbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) int llc_conn_ev_rx_rr_rsp_fbit_set_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) int llc_conn_ev_rx_rr_rsp_fbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) int llc_conn_ev_rx_rnr_cmd_pbit_set_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) int llc_conn_ev_rx_rnr_cmd_pbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) int llc_conn_ev_rx_rnr_rsp_fbit_set_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) int llc_conn_ev_rx_rnr_rsp_fbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) int llc_conn_ev_rx_rej_cmd_pbit_set_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) int llc_conn_ev_rx_rej_cmd_pbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) int llc_conn_ev_rx_rej_rsp_fbit_set_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) int llc_conn_ev_rx_rej_rsp_fbit_set_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) int llc_conn_ev_rx_any_frame(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) int llc_conn_ev_tx_buffer_full(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) int llc_conn_ev_init_p_f_cycle(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) /* Available connection action qualifiers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) int llc_conn_ev_qlfy_data_flag_eq_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) int llc_conn_ev_qlfy_data_flag_eq_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) int llc_conn_ev_qlfy_data_flag_eq_2(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) int llc_conn_ev_qlfy_p_flag_eq_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) int llc_conn_ev_qlfy_last_frame_eq_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) int llc_conn_ev_qlfy_last_frame_eq_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) int llc_conn_ev_qlfy_p_flag_eq_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) int llc_conn_ev_qlfy_p_flag_eq_f(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) int llc_conn_ev_qlfy_remote_busy_eq_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) int llc_conn_ev_qlfy_remote_busy_eq_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) int llc_conn_ev_qlfy_retry_cnt_lt_n2(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) int llc_conn_ev_qlfy_retry_cnt_gte_n2(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) int llc_conn_ev_qlfy_s_flag_eq_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) int llc_conn_ev_qlfy_s_flag_eq_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) int llc_conn_ev_qlfy_cause_flag_eq_1(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) int llc_conn_ev_qlfy_cause_flag_eq_0(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) int llc_conn_ev_qlfy_set_status_conn(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) int llc_conn_ev_qlfy_set_status_disc(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) int llc_conn_ev_qlfy_set_status_failed(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) int llc_conn_ev_qlfy_set_status_remote_busy(struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) int llc_conn_ev_qlfy_set_status_refuse(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) int llc_conn_ev_qlfy_set_status_conflict(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) int llc_conn_ev_qlfy_set_status_rst_done(struct sock *sk, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) static __inline__ int llc_conn_space(struct sock *sk, struct sk_buff *skb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) return atomic_read(&sk->sk_rmem_alloc) + skb->truesize <
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) (unsigned int)sk->sk_rcvbuf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) #endif /* LLC_C_EV_H */