Go to the documentation of this file.
13 #ifndef _UAPI__LINUX_BRIDGE_EFF_H
14 #define _UAPI__LINUX_BRIDGE_EFF_H
16 #include <linux/netfilter_bridge.h>
17 #include <linux/if_ether.h>
19 #define EBT_TABLE_MAXNAMELEN 32
20 #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN
21 #define EBT_FUNCTION_MAXNAMELEN EBT_TABLE_MAXNAMELEN
26 #define EBT_CONTINUE -3
28 #define NUM_STANDARD_TARGETS 4
32 #define EBT_VERDICT_BITS 0x0000000F
101 #define EBT_ENTRY_OR_ENTRIES 0x01
103 #define EBT_NOPROTO 0x02
104 #define EBT_802_3 0x04
105 #define EBT_SOURCEMAC 0x08
106 #define EBT_DESTMAC 0x10
107 #define EBT_F_MASK (EBT_NOPROTO | EBT_802_3 | EBT_SOURCEMAC | EBT_DESTMAC \
108 | EBT_ENTRY_OR_ENTRIES)
110 #define EBT_IPROTO 0x01
112 #define EBT_IOUT 0x04
113 #define EBT_ISOURCE 0x8
114 #define EBT_IDEST 0x10
115 #define EBT_ILOGICALIN 0x20
116 #define EBT_ILOGICALOUT 0x40
117 #define EBT_INV_MASK (EBT_IPROTO | EBT_IIN | EBT_IOUT | EBT_ILOGICALIN \
118 | EBT_ILOGICALOUT | EBT_ISOURCE | EBT_IDEST)
150 #define EBT_STANDARD_TARGET "standard"
184 #define EBT_BASE_CTL 128
186 #define EBT_SO_SET_ENTRIES (EBT_BASE_CTL)
187 #define EBT_SO_SET_COUNTERS (EBT_SO_SET_ENTRIES+1)
188 #define EBT_SO_SET_MAX (EBT_SO_SET_COUNTERS+1)
190 #define EBT_SO_GET_INFO (EBT_BASE_CTL)
191 #define EBT_SO_GET_ENTRIES (EBT_SO_GET_INFO+1)
192 #define EBT_SO_GET_INIT_INFO (EBT_SO_GET_ENTRIES+1)
193 #define EBT_SO_GET_INIT_ENTRIES (EBT_SO_GET_INIT_INFO+1)
194 #define EBT_SO_GET_MAX (EBT_SO_GET_INIT_ENTRIES+1)
199 #define EBT_MATCH_ITERATE(e, fn, args...) \
203 struct ebt_entry_match *__match; \
205 for (__i = sizeof(struct ebt_entry); \
206 __i < (e)->watchers_offset; \
207 __i += __match->match_size + \
208 sizeof(struct ebt_entry_match)) { \
209 __match = (void *)(e) + __i; \
211 __ret = fn(__match , ## args); \
216 if (__i != (e)->watchers_offset) \
222 #define EBT_WATCHER_ITERATE(e, fn, args...) \
226 struct ebt_entry_watcher *__watcher; \
228 for (__i = e->watchers_offset; \
229 __i < (e)->target_offset; \
230 __i += __watcher->watcher_size + \
231 sizeof(struct ebt_entry_watcher)) { \
232 __watcher = (void *)(e) + __i; \
234 __ret = fn(__watcher , ## args); \
239 if (__i != (e)->target_offset) \
245 #define EBT_ENTRY_ITERATE(entries, size, fn, args...) \
249 struct ebt_entry *__entry; \
251 for (__i = 0; __i < (size);) { \
252 __entry = (void *)(entries) + __i; \
253 __ret = fn(__entry , ## args); \
256 if (__entry->bitmask != 0) \
257 __i += __entry->next_offset; \
259 __i += sizeof(struct ebt_entries); \