1#ifndef LLC_S_EV_H
2#define LLC_S_EV_H
3
4
5
6
7
8
9
10
11
12
13
14
15#include <linux/skbuff.h>
16
17
18
19#define LLC_SAP_EV_TYPE_SIMPLE 1
20#define LLC_SAP_EV_TYPE_CONDITION 2
21#define LLC_SAP_EV_TYPE_PRIM 3
22#define LLC_SAP_EV_TYPE_PDU 4
23#define LLC_SAP_EV_TYPE_ACK_TMR 5
24#define LLC_SAP_EV_TYPE_RPT_STATUS 6
25
26#define LLC_SAP_EV_ACTIVATION_REQ 1
27#define LLC_SAP_EV_RX_UI 2
28#define LLC_SAP_EV_UNITDATA_REQ 3
29#define LLC_SAP_EV_XID_REQ 4
30#define LLC_SAP_EV_RX_XID_C 5
31#define LLC_SAP_EV_RX_XID_R 6
32#define LLC_SAP_EV_TEST_REQ 7
33#define LLC_SAP_EV_RX_TEST_C 8
34#define LLC_SAP_EV_RX_TEST_R 9
35#define LLC_SAP_EV_DEACTIVATION_REQ 10
36
37struct llc_sap_state_ev {
38 u8 prim;
39 u8 prim_type;
40 u8 type;
41 u8 reason;
42 u8 ind_cfm_flag;
43 struct llc_addr saddr;
44 struct llc_addr daddr;
45};
46
47static __inline__ struct llc_sap_state_ev *llc_sap_ev(struct sk_buff *skb)
48{
49 return (struct llc_sap_state_ev *)skb->cb;
50}
51
52struct llc_sap;
53
54typedef int (*llc_sap_ev_t)(struct llc_sap *sap, struct sk_buff *skb);
55
56extern int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb);
57extern int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb);
58extern int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb);
59extern int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb);
60extern int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb);
61extern int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb);
62extern int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb);
63extern int llc_sap_ev_rx_test_c(struct llc_sap *sap, struct sk_buff *skb);
64extern int llc_sap_ev_rx_test_r(struct llc_sap *sap, struct sk_buff *skb);
65extern int llc_sap_ev_deactivation_req(struct llc_sap *sap,
66 struct sk_buff *skb);
67#endif
68