netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ebtables.h File Reference
#include <linux/if.h>
#include <linux/netfilter_bridge.h>
#include <linux/if_ether.h>
Include dependency graph for ebtables.h:

Data Structures

struct  ebt_counter
 
struct  ebt_replace
 
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

Referenced by do_command().

#define EBT_ACCEPT   -1

Referenced by do_command().

#define EBT_BASE_CTL   128
#define EBT_CHAIN_MAXNAMELEN   EBT_TABLE_MAXNAMELEN

Referenced by do_command().

#define EBT_CONTINUE   -3
#define EBT_DESTMAC   0x10
#define EBT_DROP   -2
#define EBT_ENTRY_ITERATE (   entries,
  size,
  fn,
  args... 
)
Value:
({ \
unsigned int __i; \
int __ret = 0; \
struct ebt_entry *__entry; \
\
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; \
})
STRUCT_GET_ENTRIES entries
Definition: libarptc_incl.c:83
Definition: ebtables.h:67
u8 size
Definition: ip_set_hash_gen.h:186
Definition: ebtables.h:166

Referenced by ebt_get_table().

#define EBT_ENTRY_OR_ENTRIES   0x01
#define EBT_F_MASK
Value:
#define EBT_DESTMAC
Definition: ebtables.h:99
#define EBT_NOPROTO
Definition: ebtables.h:96
#define EBT_802_3
Definition: ebtables.h:97
#define EBT_SOURCEMAC
Definition: ebtables.h:98
#define EBT_ENTRY_OR_ENTRIES
Definition: ebtables.h:94
#define EBT_FUNCTION_MAXNAMELEN   EBT_TABLE_MAXNAMELEN
#define EBT_IDEST   0x10

Referenced by do_command().

#define EBT_IIN   0x02

Referenced by do_command().

#define EBT_ILOGICALIN   0x20

Referenced by do_command().

#define EBT_ILOGICALOUT   0x40

Referenced by do_command().

#define EBT_INV_MASK
Value:
#define EBT_ILOGICALOUT
Definition: ebtables.h:109
#define EBT_ILOGICALIN
Definition: ebtables.h:108
#define EBT_IPROTO
Definition: ebtables.h:103
#define EBT_ISOURCE
Definition: ebtables.h:106
#define EBT_IDEST
Definition: ebtables.h:107
#define EBT_IIN
Definition: ebtables.h:104
#define EBT_IOUT
Definition: ebtables.h:105
#define EBT_IOUT   0x04

Referenced by do_command().

#define EBT_IPROTO   0x01

Referenced by do_command().

#define EBT_ISOURCE   0x8

Referenced by do_command().

#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: ebtables.h:113
Definition: ebtables.h:166
#define EBT_NOPROTO   0x02

Referenced by do_command(), and ebt_initialize_entry().

#define EBT_RETURN   -4

Referenced by do_command().

#define EBT_SO_GET_ENTRIES   (EBT_SO_GET_INFO+1)
#define EBT_SO_GET_INFO   (EBT_BASE_CTL)
#define EBT_SO_GET_INIT_ENTRIES   (EBT_SO_GET_INIT_INFO+1)
#define EBT_SO_GET_INIT_INFO   (EBT_SO_GET_ENTRIES+1)
#define EBT_SO_GET_MAX   (EBT_SO_GET_INIT_ENTRIES+1)
#define EBT_SO_SET_COUNTERS   (EBT_SO_SET_ENTRIES+1)

Referenced by ebt_deliver_counters().

#define EBT_SO_SET_ENTRIES   (EBT_BASE_CTL)

Referenced by ebt_deliver_table().

#define EBT_SO_SET_MAX   (EBT_SO_SET_COUNTERS+1)
#define EBT_SOURCEMAC   0x08
#define EBT_STANDARD_TARGET   "standard"
#define EBT_TABLE_MAXNAMELEN   32

Referenced by do_command().

#define EBT_VERDICT_BITS   0x0000000F
#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: ebtables.h:127
#define NUM_STANDARD_TARGETS   4

Referenced by do_command(), ebt_change_policy(), and main().