0001 #ifndef LLC_S_EV_H
0002 #define LLC_S_EV_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <linux/skbuff.h>
0016 #include <net/llc.h>
0017
0018
0019
0020 #define LLC_SAP_EV_TYPE_SIMPLE 1
0021 #define LLC_SAP_EV_TYPE_CONDITION 2
0022 #define LLC_SAP_EV_TYPE_PRIM 3
0023 #define LLC_SAP_EV_TYPE_PDU 4
0024 #define LLC_SAP_EV_TYPE_ACK_TMR 5
0025 #define LLC_SAP_EV_TYPE_RPT_STATUS 6
0026
0027 #define LLC_SAP_EV_ACTIVATION_REQ 1
0028 #define LLC_SAP_EV_RX_UI 2
0029 #define LLC_SAP_EV_UNITDATA_REQ 3
0030 #define LLC_SAP_EV_XID_REQ 4
0031 #define LLC_SAP_EV_RX_XID_C 5
0032 #define LLC_SAP_EV_RX_XID_R 6
0033 #define LLC_SAP_EV_TEST_REQ 7
0034 #define LLC_SAP_EV_RX_TEST_C 8
0035 #define LLC_SAP_EV_RX_TEST_R 9
0036 #define LLC_SAP_EV_DEACTIVATION_REQ 10
0037
0038 struct llc_sap_state_ev {
0039 u8 prim;
0040 u8 prim_type;
0041 u8 type;
0042 u8 reason;
0043 u8 ind_cfm_flag;
0044 struct llc_addr saddr;
0045 struct llc_addr daddr;
0046 };
0047
0048 static __inline__ struct llc_sap_state_ev *llc_sap_ev(struct sk_buff *skb)
0049 {
0050 return (struct llc_sap_state_ev *)skb->cb;
0051 }
0052
0053 struct llc_sap;
0054
0055 typedef int (*llc_sap_ev_t)(struct llc_sap *sap, struct sk_buff *skb);
0056
0057 int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb);
0058 int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb);
0059 int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb);
0060 int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb);
0061 int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb);
0062 int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb);
0063 int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb);
0064 int llc_sap_ev_rx_test_c(struct llc_sap *sap, struct sk_buff *skb);
0065 int llc_sap_ev_rx_test_r(struct llc_sap *sap, struct sk_buff *skb);
0066 int llc_sap_ev_deactivation_req(struct llc_sap *sap, struct sk_buff *skb);
0067 #endif