netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
x_tables.h File Reference
#include <linux/kernel.h>
#include <linux/types.h>
Include dependency graph for x_tables.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  xt_entry_match
 
struct  xt_entry_target
 
struct  xt_standard_target
 
struct  xt_error_target
 
struct  xt_get_revision
 
struct  _xt_align
 
struct  xt_counters
 
struct  xt_counters_info
 

Macros

#define XT_FUNCTION_MAXNAMELEN   30
 
#define XT_EXTENSION_MAXNAMELEN   29
 
#define XT_TABLE_MAXNAMELEN   32
 
#define XT_TARGET_INIT(__name, __size)
 
#define XT_CONTINUE   0xFFFFFFFF
 
#define XT_RETURN   (-NF_REPEAT - 1)
 
#define XT_ALIGN(s)   __ALIGN_KERNEL((s), __alignof__(struct _xt_align))
 
#define XT_STANDARD_TARGET   ""
 
#define XT_ERROR_TARGET   "ERROR"
 
#define SET_COUNTER(c, b, p)   do { (c).bcnt = (b); (c).pcnt = (p); } while(0)
 
#define ADD_COUNTER(c, b, p)   do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
 
#define XT_INV_PROTO   0x40 /* Invert the sense of PROTO. */
 
#define XT_MATCH_ITERATE(type, e, fn, args...)
 
#define XT_ENTRY_ITERATE_CONTINUE(type, entries, size, n, fn, args...)
 
#define XT_ENTRY_ITERATE(type, entries, size, fn, args...)   XT_ENTRY_ITERATE_CONTINUE(type, entries, size, 0, fn, args)
 
#define xt_entry_foreach(pos, ehead, esize)
 
#define xt_ematch_foreach(pos, entry)
 

Macro Definition Documentation

#define ADD_COUNTER (   c,
  b,
 
)    do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
#define SET_COUNTER (   c,
  b,
 
)    do { (c).bcnt = (b); (c).pcnt = (p); } while(0)
#define XT_ALIGN (   s)    __ALIGN_KERNEL((s), __alignof__(struct _xt_align))
#define XT_CONTINUE   0xFFFFFFFF
#define xt_ematch_foreach (   pos,
  entry 
)
Value:
for ((pos) = (struct xt_entry_match *)entry->elems; \
(pos) < (struct xt_entry_match *)((char *)(entry) + \
(entry)->target_offset); \
(pos) = (struct xt_entry_match *)((char *)(pos) + \
(pos)->u.match_size))
Definition: x_tables.h:10
u8 pos
Definition: ip_set_hash_gen.h:187
#define xt_entry_foreach (   pos,
  ehead,
  esize 
)
Value:
for ((pos) = (typeof(pos))(ehead); \
(pos) < (typeof(pos))((char *)(ehead) + (esize)); \
(pos) = (typeof(pos))((char *)(pos) + (pos)->next_offset))
u8 pos
Definition: ip_set_hash_gen.h:187
#define XT_ENTRY_ITERATE (   type,
  entries,
  size,
  fn,
  args... 
)    XT_ENTRY_ITERATE_CONTINUE(type, entries, size, 0, fn, args)
#define XT_ENTRY_ITERATE_CONTINUE (   type,
  entries,
  size,
  n,
  fn,
  args... 
)
Value:
({ \
unsigned int __i, __n; \
int __ret = 0; \
type *__entry; \
\
for (__i = 0, __n = 0; __i < (size); \
__i += __entry->next_offset, __n++) { \
__entry = (void *)(entries) + __i; \
if (__n < n) \
continue; \
\
__ret = fn(__entry , ## args); \
if (__ret != 0) \
break; \
} \
__ret; \
})
STRUCT_GET_ENTRIES entries
Definition: libarptc_incl.c:83
void size_t u_int16_t type
Definition: libnetfilter_conntrack.h:557
u8 size
Definition: ip_set_hash_gen.h:186
#define XT_ERROR_TARGET   "ERROR"
#define XT_FUNCTION_MAXNAMELEN   30
#define XT_INV_PROTO   0x40 /* Invert the sense of PROTO. */
#define XT_MATCH_ITERATE (   type,
  e,
  fn,
  args... 
)
Value:
({ \
unsigned int __i; \
int __ret = 0; \
\
for (__i = sizeof(type); \
__i < (e)->target_offset; \
__i += __m->u.match_size) { \
__m = (void *)e + __i; \
\
__ret = fn(__m , ## args); \
if (__ret != 0) \
break; \
} \
__ret; \
})
struct expr
Definition: x_tables.h:10
#define XT_RETURN   (-NF_REPEAT - 1)
#define XT_STANDARD_TARGET   ""
#define XT_TABLE_MAXNAMELEN   32
#define XT_TARGET_INIT (   __name,
  __size 
)
Value:
{ \
.target.u.user = { \
.target_size = XT_ALIGN(__size), \
.name = __name, \
}, \
}
#define XT_ALIGN(s)
Definition: x_tables.h:99