Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
x_tables.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/socket.h>
#include <linux/net.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/string.h>
#include <linux/vmalloc.h>
#include <linux/mutex.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/audit.h>
#include <net/net_namespace.h>
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_arp.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv6/ip6_tables.h>
#include <linux/netfilter_arp/arp_tables.h>

Go to the source code of this file.

Data Structures

struct  compat_delta
 
struct  xt_af
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define SMP_ALIGN(x)   (((x) + SMP_CACHE_BYTES-1) & ~(SMP_CACHE_BYTES-1))
 

Functions

 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Harald Welte <[email protected]>")
 
 MODULE_DESCRIPTION ("{ip,ip6,arp,eb}_tables backend module")
 
int xt_register_target (struct xt_target *target)
 
 EXPORT_SYMBOL (xt_register_target)
 
void xt_unregister_target (struct xt_target *target)
 
 EXPORT_SYMBOL (xt_unregister_target)
 
int xt_register_targets (struct xt_target *target, unsigned int n)
 
 EXPORT_SYMBOL (xt_register_targets)
 
void xt_unregister_targets (struct xt_target *target, unsigned int n)
 
 EXPORT_SYMBOL (xt_unregister_targets)
 
int xt_register_match (struct xt_match *match)
 
 EXPORT_SYMBOL (xt_register_match)
 
void xt_unregister_match (struct xt_match *match)
 
 EXPORT_SYMBOL (xt_unregister_match)
 
int xt_register_matches (struct xt_match *match, unsigned int n)
 
 EXPORT_SYMBOL (xt_register_matches)
 
void xt_unregister_matches (struct xt_match *match, unsigned int n)
 
 EXPORT_SYMBOL (xt_unregister_matches)
 
struct xt_matchxt_find_match (u8 af, const char *name, u8 revision)
 
 EXPORT_SYMBOL (xt_find_match)
 
struct xt_matchxt_request_find_match (uint8_t nfproto, const char *name, uint8_t revision)
 
 EXPORT_SYMBOL_GPL (xt_request_find_match)
 
struct xt_targetxt_find_target (u8 af, const char *name, u8 revision)
 
 EXPORT_SYMBOL (xt_find_target)
 
struct xt_targetxt_request_find_target (u8 af, const char *name, u8 revision)
 
 EXPORT_SYMBOL_GPL (xt_request_find_target)
 
int xt_find_revision (u8 af, const char *name, u8 revision, int target, int *err)
 
 EXPORT_SYMBOL_GPL (xt_find_revision)
 
int xt_check_match (struct xt_mtchk_param *par, unsigned int size, u_int8_t proto, bool inv_proto)
 
 EXPORT_SYMBOL_GPL (xt_check_match)
 
int xt_check_target (struct xt_tgchk_param *par, unsigned int size, u_int8_t proto, bool inv_proto)
 
 EXPORT_SYMBOL_GPL (xt_check_target)
 
struct xt_table_infoxt_alloc_table_info (unsigned int size)
 
 EXPORT_SYMBOL (xt_alloc_table_info)
 
void xt_free_table_info (struct xt_table_info *info)
 
 EXPORT_SYMBOL (xt_free_table_info)
 
struct xt_tablext_find_table_lock (struct net *net, u_int8_t af, const char *name)
 
 EXPORT_SYMBOL_GPL (xt_find_table_lock)
 
void xt_table_unlock (struct xt_table *table)
 
 EXPORT_SYMBOL_GPL (xt_table_unlock)
 
 DEFINE_PER_CPU (seqcount_t, xt_recseq)
 
 EXPORT_PER_CPU_SYMBOL_GPL (xt_recseq)
 
struct xt_table_infoxt_replace_table (struct xt_table *table, unsigned int num_counters, struct xt_table_info *newinfo, int *error)
 
 EXPORT_SYMBOL_GPL (xt_replace_table)
 
struct xt_tablext_register_table (struct net *net, const struct xt_table *input_table, struct xt_table_info *bootstrap, struct xt_table_info *newinfo)
 
 EXPORT_SYMBOL_GPL (xt_register_table)
 
voidxt_unregister_table (struct xt_table *table)
 
 EXPORT_SYMBOL_GPL (xt_unregister_table)
 
struct nf_hook_ops * xt_hook_link (const struct xt_table *table, nf_hookfn *fn)
 
 EXPORT_SYMBOL_GPL (xt_hook_link)
 
void xt_hook_unlink (const struct xt_table *table, struct nf_hook_ops *ops)
 
 EXPORT_SYMBOL_GPL (xt_hook_unlink)
 
int xt_proto_init (struct net *net, u_int8_t af)
 
 EXPORT_SYMBOL_GPL (xt_proto_init)
 
void xt_proto_fini (struct net *net, u_int8_t af)
 
 EXPORT_SYMBOL_GPL (xt_proto_fini)
 
 module_init (xt_init)
 
 module_exit (xt_fini)
 

Macro Definition Documentation

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 15 of file x_tables.c.

#define SMP_ALIGN (   x)    (((x) + SMP_CACHE_BYTES-1) & ~(SMP_CACHE_BYTES-1))

Definition at line 40 of file x_tables.c.

Function Documentation

DEFINE_PER_CPU ( seqcount_t  ,
xt_recseq   
)
EXPORT_PER_CPU_SYMBOL_GPL ( xt_recseq  )
EXPORT_SYMBOL ( xt_register_target  )
EXPORT_SYMBOL ( xt_unregister_target  )
EXPORT_SYMBOL ( xt_register_targets  )
EXPORT_SYMBOL ( xt_unregister_targets  )
EXPORT_SYMBOL ( xt_register_match  )
EXPORT_SYMBOL ( xt_unregister_match  )
EXPORT_SYMBOL ( xt_register_matches  )
EXPORT_SYMBOL ( xt_unregister_matches  )
EXPORT_SYMBOL ( xt_find_match  )
EXPORT_SYMBOL ( xt_find_target  )
EXPORT_SYMBOL ( xt_alloc_table_info  )
EXPORT_SYMBOL ( xt_free_table_info  )
EXPORT_SYMBOL_GPL ( xt_request_find_match  )
EXPORT_SYMBOL_GPL ( xt_request_find_target  )
EXPORT_SYMBOL_GPL ( xt_find_revision  )
EXPORT_SYMBOL_GPL ( xt_check_match  )
EXPORT_SYMBOL_GPL ( xt_check_target  )
EXPORT_SYMBOL_GPL ( xt_find_table_lock  )
EXPORT_SYMBOL_GPL ( xt_table_unlock  )
EXPORT_SYMBOL_GPL ( xt_replace_table  )
EXPORT_SYMBOL_GPL ( xt_register_table  )
EXPORT_SYMBOL_GPL ( xt_unregister_table  )
EXPORT_SYMBOL_GPL ( xt_hook_link  )
EXPORT_SYMBOL_GPL ( xt_hook_unlink  )
EXPORT_SYMBOL_GPL ( xt_proto_init  )
EXPORT_SYMBOL_GPL ( xt_proto_fini  )
MODULE_AUTHOR ( "Harald Welte <[email protected]>"  )
MODULE_DESCRIPTION ( "{ip,ip6,arp,eb}_tables backend module )
module_exit ( xt_fini  )
module_init ( xt_init  )
MODULE_LICENSE ( "GPL"  )
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 par,
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 par,
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 table,
nf_hookfn *  fn 
)
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 match)

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 input_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 ( uint8_t  nfproto,
const char name,
uint8_t  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 table)

Definition at line 746 of file x_tables.c.

void xt_unregister_match ( struct xt_match match)

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.