Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
x_tables.h File Reference
#include <linux/netdevice.h>
#include <uapi/linux/netfilter/x_tables.h>
#include <linux/netfilter_ipv4.h>

Go to the source code of this file.

Data Structures

struct  xt_action_param
 
struct  xt_mtchk_param
 
struct  xt_mtdtor_param
 
struct  xt_tgchk_param
 
struct  xt_tgdtor_param
 
struct  xt_match
 
struct  xt_target
 
struct  xt_table
 
struct  xt_table_info
 

Macros

#define XT_TABLE_INFO_SZ
 

Functions

int xt_register_target (struct xt_target *target)
 
void xt_unregister_target (struct xt_target *target)
 
int xt_register_targets (struct xt_target *target, unsigned int n)
 
void xt_unregister_targets (struct xt_target *target, unsigned int n)
 
int xt_register_match (struct xt_match *target)
 
void xt_unregister_match (struct xt_match *target)
 
int xt_register_matches (struct xt_match *match, unsigned int n)
 
void xt_unregister_matches (struct xt_match *match, unsigned int n)
 
int xt_check_match (struct xt_mtchk_param *, unsigned int size, u_int8_t proto, bool inv_proto)
 
int xt_check_target (struct xt_tgchk_param *, unsigned int size, u_int8_t proto, bool inv_proto)
 
struct xt_tablext_register_table (struct net *net, const struct xt_table *table, struct xt_table_info *bootstrap, struct xt_table_info *newinfo)
 
voidxt_unregister_table (struct xt_table *table)
 
struct xt_table_infoxt_replace_table (struct xt_table *table, unsigned int num_counters, struct xt_table_info *newinfo, int *error)
 
struct xt_matchxt_find_match (u8 af, const char *name, u8 revision)
 
struct xt_targetxt_find_target (u8 af, const char *name, u8 revision)
 
struct xt_matchxt_request_find_match (u8 af, const char *name, u8 revision)
 
struct xt_targetxt_request_find_target (u8 af, const char *name, u8 revision)
 
int xt_find_revision (u8 af, const char *name, u8 revision, int target, int *err)
 
struct xt_tablext_find_table_lock (struct net *net, u_int8_t af, const char *name)
 
void xt_table_unlock (struct xt_table *t)
 
int xt_proto_init (struct net *net, u_int8_t af)
 
void xt_proto_fini (struct net *net, u_int8_t af)
 
struct xt_table_infoxt_alloc_table_info (unsigned int size)
 
void xt_free_table_info (struct xt_table_info *info)
 
 DECLARE_PER_CPU (seqcount_t, xt_recseq)
 
struct nf_hook_ops * xt_hook_link (const struct xt_table *, nf_hookfn *)
 
void xt_hook_unlink (const struct xt_table *, struct nf_hook_ops *)
 

Macro Definition Documentation

#define XT_TABLE_INFO_SZ
Value:
+ nr_cpu_ids * sizeof(char *))

Definition at line 230 of file x_tables.h.

Function Documentation

DECLARE_PER_CPU ( seqcount_t  ,
xt_recseq   
)

xt_recseq - recursive seqcount for netfilter use

Packet processing changes the seqcount only if no recursion happened get_counters() can use read_seqcount_begin()/read_seqcount_retry(), because we use the normal seqcount convention : Low order bit set to 1 if a writer is active.

struct xt_table_info* xt_alloc_table_info ( unsigned int  size)
read

Definition at line 663 of file x_tables.c.

int xt_check_match ( struct xt_mtchk_param ,
unsigned int  size,
u_int8_t  proto,
bool  inv_proto 
)

Definition at line 374 of file x_tables.c.

int xt_check_target ( struct xt_tgchk_param ,
unsigned int  size,
u_int8_t  proto,
bool  inv_proto 
)

Definition at line 552 of file x_tables.c.

struct xt_match* xt_find_match ( u8  af,
const char name,
u8  revision 
)
read

Definition at line 191 of file x_tables.c.

int xt_find_revision ( u8  af,
const char name,
u8  revision,
int  target,
int err 
)

Definition at line 320 of file x_tables.c.

struct xt_table* xt_find_table_lock ( struct net net,
u_int8_t  af,
const char name 
)
read

Definition at line 730 of file x_tables.c.

struct xt_target* xt_find_target ( u8  af,
const char name,
u8  revision 
)
read

Definition at line 236 of file x_tables.c.

void xt_free_table_info ( struct xt_table_info info)

Definition at line 697 of file x_tables.c.

struct nf_hook_ops* xt_hook_link ( const struct xt_table ,
nf_hookfn *   
)
read

Definition at line 1228 of file x_tables.c.

void xt_hook_unlink ( const struct xt_table table,
struct nf_hook_ops *  ops 
)

xt_hook_unlink - remove hooks for a table : nf_hook_ops array as returned by nf_hook_link : the very same mask that was passed to nf_hook_link

Definition at line 1267 of file x_tables.c.

void xt_proto_fini ( struct net net,
u_int8_t  af 
)

Definition at line 1326 of file x_tables.c.

int xt_proto_init ( struct net net,
u_int8_t  af 
)

Definition at line 1274 of file x_tables.c.

int xt_register_match ( struct xt_match target)

Definition at line 128 of file x_tables.c.

int xt_register_matches ( struct xt_match match,
unsigned int  n 
)

Definition at line 156 of file x_tables.c.

struct xt_table* xt_register_table ( struct net net,
const struct xt_table table,
struct xt_table_info bootstrap,
struct xt_table_info newinfo 
)
read

Definition at line 865 of file x_tables.c.

int xt_register_target ( struct xt_target target)

Definition at line 74 of file x_tables.c.

int xt_register_targets ( struct xt_target target,
unsigned int  n 
)

Definition at line 100 of file x_tables.c.

struct xt_table_info* xt_replace_table ( struct xt_table table,
unsigned int  num_counters,
struct xt_table_info newinfo,
int error 
)
read

Definition at line 808 of file x_tables.c.

struct xt_match* xt_request_find_match ( u8  af,
const char name,
u8  revision 
)
read

Definition at line 221 of file x_tables.c.

struct xt_target* xt_request_find_target ( u8  af,
const char name,
u8  revision 
)
read

Definition at line 265 of file x_tables.c.

void xt_table_unlock ( struct xt_table t)

Definition at line 746 of file x_tables.c.

void xt_unregister_match ( struct xt_match target)

Definition at line 145 of file x_tables.c.

void xt_unregister_matches ( struct xt_match match,
unsigned int  n 
)

Definition at line 176 of file x_tables.c.

void* xt_unregister_table ( struct xt_table table)

Definition at line 918 of file x_tables.c.

void xt_unregister_target ( struct xt_target target)

Definition at line 89 of file x_tables.c.

void xt_unregister_targets ( struct xt_target target,
unsigned int  n 
)

Definition at line 120 of file x_tables.c.