Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / include / uapi / linux / netfilter_bridge / ebt_802_3.h
1 #ifndef _UAPI__LINUX_BRIDGE_EBT_802_3_H
2 #define _UAPI__LINUX_BRIDGE_EBT_802_3_H
3
4 #include <linux/types.h>
5 #include <linux/if_ether.h>
6
7 #define EBT_802_3_SAP 0x01
8 #define EBT_802_3_TYPE 0x02
9
10 #define EBT_802_3_MATCH "802_3"
11
12 /*
13  * If frame has DSAP/SSAP value 0xaa you must check the SNAP type
14  * to discover what kind of packet we're carrying. 
15  */
16 #define CHECK_TYPE 0xaa
17
18 /*
19  * Control field may be one or two bytes.  If the first byte has
20  * the value 0x03 then the entire length is one byte, otherwise it is two.
21  * One byte controls are used in Unnumbered Information frames.
22  * Two byte controls are used in Numbered Information frames.
23  */
24 #define IS_UI 0x03
25
26 #define EBT_802_3_MASK (EBT_802_3_SAP | EBT_802_3_TYPE | EBT_802_3)
27
28 /* ui has one byte ctrl, ni has two */
29 struct hdr_ui {
30         __u8 dsap;
31         __u8 ssap;
32         __u8 ctrl;
33         __u8 orig[3];
34         __be16 type;
35 };
36
37 struct hdr_ni {
38         __u8 dsap;
39         __u8 ssap;
40         __be16 ctrl;
41         __u8  orig[3];
42         __be16 type;
43 };
44
45 struct ebt_802_3_hdr {
46         __u8  daddr[ETH_ALEN];
47         __u8  saddr[ETH_ALEN];
48         __be16 len;
49         union {
50                 struct hdr_ui ui;
51                 struct hdr_ni ni;
52         } llc;
53 };
54
55
56 struct ebt_802_3_info {
57         __u8  sap;
58         __be16 type;
59         __u8  bitmask;
60         __u8  invflags;
61 };
62
63 #endif /* _UAPI__LINUX_BRIDGE_EBT_802_3_H */