Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
ebtables.h File Reference
#include <linux/if.h>
#include <linux/netfilter_bridge.h>
#include <linux/if_ether.h>

Go to the source code of this file.

Data Structures

struct  ebt_counter
 
struct  ebt_replace
 
struct  ebt_replace_kernel
 
struct  ebt_entries
 
struct  ebt_entry_match
 
struct  ebt_entry_watcher
 
struct  ebt_entry_target
 
struct  ebt_standard_target
 
struct  ebt_entry
 

Macros

#define EBT_TABLE_MAXNAMELEN   32
 
#define EBT_CHAIN_MAXNAMELEN   EBT_TABLE_MAXNAMELEN
 
#define EBT_FUNCTION_MAXNAMELEN   EBT_TABLE_MAXNAMELEN
 
#define EBT_ACCEPT   -1
 
#define EBT_DROP   -2
 
#define EBT_CONTINUE   -3
 
#define EBT_RETURN   -4
 
#define NUM_STANDARD_TARGETS   4
 
#define EBT_VERDICT_BITS   0x0000000F
 
#define EBT_ENTRY_OR_ENTRIES   0x01
 
#define EBT_NOPROTO   0x02
 
#define EBT_802_3   0x04
 
#define EBT_SOURCEMAC   0x08
 
#define EBT_DESTMAC   0x10
 
#define EBT_F_MASK
 
#define EBT_IPROTO   0x01
 
#define EBT_IIN   0x02
 
#define EBT_IOUT   0x04
 
#define EBT_ISOURCE   0x8
 
#define EBT_IDEST   0x10
 
#define EBT_ILOGICALIN   0x20
 
#define EBT_ILOGICALOUT   0x40
 
#define EBT_INV_MASK
 
#define EBT_STANDARD_TARGET   "standard"
 
#define EBT_BASE_CTL   128
 
#define EBT_SO_SET_ENTRIES   (EBT_BASE_CTL)
 
#define EBT_SO_SET_COUNTERS   (EBT_SO_SET_ENTRIES+1)
 
#define EBT_SO_SET_MAX   (EBT_SO_SET_COUNTERS+1)
 
#define EBT_SO_GET_INFO   (EBT_BASE_CTL)
 
#define EBT_SO_GET_ENTRIES   (EBT_SO_GET_INFO+1)
 
#define EBT_SO_GET_INIT_INFO   (EBT_SO_GET_ENTRIES+1)
 
#define EBT_SO_GET_INIT_ENTRIES   (EBT_SO_GET_INIT_INFO+1)
 
#define EBT_SO_GET_MAX   (EBT_SO_GET_INIT_ENTRIES+1)
 
#define EBT_MATCH_ITERATE(e, fn, args...)
 
#define EBT_WATCHER_ITERATE(e, fn, args...)
 
#define EBT_ENTRY_ITERATE(entries, size, fn, args...)
 

Macro Definition Documentation

#define EBT_802_3   0x04

Definition at line 104 of file ebtables.h.

#define EBT_ACCEPT   -1

Definition at line 24 of file ebtables.h.

#define EBT_BASE_CTL   128

Definition at line 184 of file ebtables.h.

#define EBT_CHAIN_MAXNAMELEN   EBT_TABLE_MAXNAMELEN

Definition at line 20 of file ebtables.h.

#define EBT_CONTINUE   -3

Definition at line 26 of file ebtables.h.

#define EBT_DESTMAC   0x10

Definition at line 106 of file ebtables.h.

#define EBT_DROP   -2

Definition at line 25 of file ebtables.h.

#define EBT_ENTRY_ITERATE (   entries,
  size,
  fn,
  args... 
)
Value:
({ \
unsigned int __i; \
int __ret = 0; \
for (__i = 0; __i < (size);) { \
__entry = (void *)(entries) + __i; \
__ret = fn(__entry , ## args); \
if (__ret != 0) \
break; \
if (__entry->bitmask != 0) \
__i += __entry->next_offset; \
else \
__i += sizeof(struct ebt_entries); \
} \
if (__ret == 0) { \
if (__i != (size)) \
__ret = -EINVAL; \
} \
__ret; \
})

Definition at line 245 of file ebtables.h.

#define EBT_ENTRY_OR_ENTRIES   0x01

Definition at line 101 of file ebtables.h.

#define EBT_F_MASK
Value:

Definition at line 107 of file ebtables.h.

#define EBT_FUNCTION_MAXNAMELEN   EBT_TABLE_MAXNAMELEN

Definition at line 21 of file ebtables.h.

#define EBT_IDEST   0x10

Definition at line 114 of file ebtables.h.

#define EBT_IIN   0x02

Definition at line 111 of file ebtables.h.

#define EBT_ILOGICALIN   0x20

Definition at line 115 of file ebtables.h.

#define EBT_ILOGICALOUT   0x40

Definition at line 116 of file ebtables.h.

#define EBT_INV_MASK
Value:

Definition at line 117 of file ebtables.h.

#define EBT_IOUT   0x04

Definition at line 112 of file ebtables.h.

#define EBT_IPROTO   0x01

Definition at line 110 of file ebtables.h.

#define EBT_ISOURCE   0x8

Definition at line 113 of file ebtables.h.

#define EBT_MATCH_ITERATE (   e,
  fn,
  args... 
)
Value:
({ \
unsigned int __i; \
int __ret = 0; \
for (__i = sizeof(struct ebt_entry); \
__i < (e)->watchers_offset; \
__i += __match->match_size + \
sizeof(struct ebt_entry_match)) { \
__match = (void *)(e) + __i; \
\
__ret = fn(__match , ## args); \
if (__ret != 0) \
break; \
} \
if (__ret == 0) { \
if (__i != (e)->watchers_offset) \
__ret = -EINVAL; \
} \
__ret; \
})

Definition at line 199 of file ebtables.h.

#define EBT_NOPROTO   0x02

Definition at line 103 of file ebtables.h.

#define EBT_RETURN   -4

Definition at line 27 of file ebtables.h.

#define EBT_SO_GET_ENTRIES   (EBT_SO_GET_INFO+1)

Definition at line 191 of file ebtables.h.

#define EBT_SO_GET_INFO   (EBT_BASE_CTL)

Definition at line 190 of file ebtables.h.

#define EBT_SO_GET_INIT_ENTRIES   (EBT_SO_GET_INIT_INFO+1)

Definition at line 193 of file ebtables.h.

#define EBT_SO_GET_INIT_INFO   (EBT_SO_GET_ENTRIES+1)

Definition at line 192 of file ebtables.h.

#define EBT_SO_GET_MAX   (EBT_SO_GET_INIT_ENTRIES+1)

Definition at line 194 of file ebtables.h.

#define EBT_SO_SET_COUNTERS   (EBT_SO_SET_ENTRIES+1)

Definition at line 187 of file ebtables.h.

#define EBT_SO_SET_ENTRIES   (EBT_BASE_CTL)

Definition at line 186 of file ebtables.h.

#define EBT_SO_SET_MAX   (EBT_SO_SET_COUNTERS+1)

Definition at line 188 of file ebtables.h.

#define EBT_SOURCEMAC   0x08

Definition at line 105 of file ebtables.h.

#define EBT_STANDARD_TARGET   "standard"

Definition at line 150 of file ebtables.h.

#define EBT_TABLE_MAXNAMELEN   32

Definition at line 19 of file ebtables.h.

#define EBT_VERDICT_BITS   0x0000000F

Definition at line 32 of file ebtables.h.

#define EBT_WATCHER_ITERATE (   e,
  fn,
  args... 
)
Value:
({ \
unsigned int __i; \
int __ret = 0; \
for (__i = e->watchers_offset; \
__i < (e)->target_offset; \
__i += __watcher->watcher_size + \
sizeof(struct ebt_entry_watcher)) { \
__watcher = (void *)(e) + __i; \
\
__ret = fn(__watcher , ## args); \
if (__ret != 0) \
break; \
} \
if (__ret == 0) { \
if (__i != (e)->target_offset) \
__ret = -EINVAL; \
} \
__ret; \
})

Definition at line 222 of file ebtables.h.

#define NUM_STANDARD_TARGETS   4

Definition at line 28 of file ebtables.h.