Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ebt_802_3.h
Go to the documentation of this file.
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 
6 #define EBT_802_3_SAP 0x01
7 #define EBT_802_3_TYPE 0x02
8 
9 #define EBT_802_3_MATCH "802_3"
10 
11 /*
12  * If frame has DSAP/SSAP value 0xaa you must check the SNAP type
13  * to discover what kind of packet we're carrying.
14  */
15 #define CHECK_TYPE 0xaa
16 
17 /*
18  * Control field may be one or two bytes. If the first byte has
19  * the value 0x03 then the entire length is one byte, otherwise it is two.
20  * One byte controls are used in Unnumbered Information frames.
21  * Two byte controls are used in Numbered Information frames.
22  */
23 #define IS_UI 0x03
24 
25 #define EBT_802_3_MASK (EBT_802_3_SAP | EBT_802_3_TYPE | EBT_802_3)
26 
27 /* ui has one byte ctrl, ni has two */
28 struct hdr_ui {
32  __u8 orig[3];
34 };
35 
36 struct hdr_ni {
40  __u8 orig[3];
42 };
43 
44 struct ebt_802_3_hdr {
45  __u8 daddr[6];
46  __u8 saddr[6];
48  union {
49  struct hdr_ui ui;
50  struct hdr_ni ni;
51  } llc;
52 };
53 
54 
60 };
61 
62 #endif /* _UAPI__LINUX_BRIDGE_EBT_802_3_H */