projects/linux·blob master · refs

61 lines · 1.9 KiB

1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef LLC_S_EV_H
3#define LLC_S_EV_H
4/*
5 * Copyright (c) 1997 by Procom Technology,Inc.
6 * 2001 by Arnaldo Carvalho de Melo <[email protected]>
7 */
8
9#include <linux/skbuff.h>
10#include <net/llc.h>
11
12/* Defines SAP component events */
13/* Types of events (possible values in 'ev->type') */
14#define LLC_SAP_EV_TYPE_SIMPLE 1
15#define LLC_SAP_EV_TYPE_CONDITION 2
16#define LLC_SAP_EV_TYPE_PRIM 3
17#define LLC_SAP_EV_TYPE_PDU 4 /* command/response PDU */
18#define LLC_SAP_EV_TYPE_ACK_TMR 5
19#define LLC_SAP_EV_TYPE_RPT_STATUS 6
20
21#define LLC_SAP_EV_ACTIVATION_REQ 1
22#define LLC_SAP_EV_RX_UI 2
23#define LLC_SAP_EV_UNITDATA_REQ 3
24#define LLC_SAP_EV_XID_REQ 4
25#define LLC_SAP_EV_RX_XID_C 5
26#define LLC_SAP_EV_RX_XID_R 6
27#define LLC_SAP_EV_TEST_REQ 7
28#define LLC_SAP_EV_RX_TEST_C 8
29#define LLC_SAP_EV_RX_TEST_R 9
30#define LLC_SAP_EV_DEACTIVATION_REQ 10
31
32struct llc_sap_state_ev {
33 u8 prim;
34 u8 prim_type;
35 u8 type;
36 u8 reason;
37 u8 ind_cfm_flag;
38 struct llc_addr saddr;
39 struct llc_addr daddr;
40};
41
42static __inline__ struct llc_sap_state_ev *llc_sap_ev(struct sk_buff *skb)
43{
44 return (struct llc_sap_state_ev *)skb->cb;
45}
46
47struct llc_sap;
48
49typedef int (*llc_sap_ev_t)(struct llc_sap *sap, struct sk_buff *skb);
50
51int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb);
52int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb);
53int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb);
54int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb);
55int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb);
56int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb);
57int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb);
58int llc_sap_ev_rx_test_c(struct llc_sap *sap, struct sk_buff *skb);
59int llc_sap_ev_rx_test_r(struct llc_sap *sap, struct sk_buff *skb);
60int llc_sap_ev_deactivation_req(struct llc_sap *sap, struct sk_buff *skb);
61#endif /* LLC_S_EV_H */