diff options
Diffstat (limited to 'include/linux/if_tun.h')
-rw-r--r-- | include/linux/if_tun.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 563fae542da6..4c6307ad9fdb 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define __IF_TUN_H | 17 | #define __IF_TUN_H |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/if_ether.h> | ||
20 | 21 | ||
21 | /* Read queue size */ | 22 | /* Read queue size */ |
22 | #define TUN_READQ_SIZE 500 | 23 | #define TUN_READQ_SIZE 500 |
@@ -42,7 +43,8 @@ | |||
42 | #define TUNSETLINK _IOW('T', 205, int) | 43 | #define TUNSETLINK _IOW('T', 205, int) |
43 | #define TUNSETGROUP _IOW('T', 206, int) | 44 | #define TUNSETGROUP _IOW('T', 206, int) |
44 | #define TUNGETFEATURES _IOR('T', 207, unsigned int) | 45 | #define TUNGETFEATURES _IOR('T', 207, unsigned int) |
45 | #define TUNSETOFFLOAD _IOW('T', 208, unsigned int) | 46 | #define TUNSETOFFLOAD _IOW('T', 208, unsigned int) |
47 | #define TUNSETTXFILTER _IOW('T', 209, unsigned int) | ||
46 | 48 | ||
47 | /* TUNSETIFF ifr flags */ | 49 | /* TUNSETIFF ifr flags */ |
48 | #define IFF_TUN 0x0001 | 50 | #define IFF_TUN 0x0001 |
@@ -57,10 +59,26 @@ | |||
57 | #define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */ | 59 | #define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */ |
58 | #define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */ | 60 | #define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */ |
59 | 61 | ||
62 | /* Protocol info prepended to the packets (when IFF_NO_PI is not set) */ | ||
63 | #define TUN_PKT_STRIP 0x0001 | ||
60 | struct tun_pi { | 64 | struct tun_pi { |
61 | unsigned short flags; | 65 | __u16 flags; |
62 | __be16 proto; | 66 | __be16 proto; |
63 | }; | 67 | }; |
64 | #define TUN_PKT_STRIP 0x0001 | 68 | |
69 | /* | ||
70 | * Filter spec (used for SETXXFILTER ioctls) | ||
71 | * This stuff is applicable only to the TAP (Ethernet) devices. | ||
72 | * If the count is zero the filter is disabled and the driver accepts | ||
73 | * all packets (promisc mode). | ||
74 | * If the filter is enabled in order to accept broadcast packets | ||
75 | * broadcast addr must be explicitly included in the addr list. | ||
76 | */ | ||
77 | #define TUN_FLT_ALLMULTI 0x0001 /* Accept all multicast packets */ | ||
78 | struct tun_filter { | ||
79 | __u16 flags; /* TUN_FLT_ flags see above */ | ||
80 | __u16 count; /* Number of addresses */ | ||
81 | __u8 addr[0][ETH_ALEN]; | ||
82 | }; | ||
65 | 83 | ||
66 | #endif /* __IF_TUN_H */ | 84 | #endif /* __IF_TUN_H */ |