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

Macros

#define iptc_handle   xtc_handle
 
#define ipt_chainlabel   xt_chainlabel
 
#define IPTC_LABEL_ACCEPT   "ACCEPT"
 
#define IPTC_LABEL_DROP   "DROP"
 
#define IPTC_LABEL_QUEUE   "QUEUE"
 
#define IPTC_LABEL_RETURN   "RETURN"
 

Functions

int iptc_is_chain (const char *chain, struct xtc_handle *const handle)
 
struct xtc_handleiptc_init (const char *tablename)
 
void iptc_free (struct xtc_handle *h)
 
const char * iptc_first_chain (struct xtc_handle *handle)
 
const char * iptc_next_chain (struct xtc_handle *handle)
 
const struct ipt_entryiptc_first_rule (const char *chain, struct xtc_handle *handle)
 
const struct ipt_entryiptc_next_rule (const struct ipt_entry *prev, struct xtc_handle *handle)
 
const char * iptc_get_target (const struct ipt_entry *e, struct xtc_handle *handle)
 
int iptc_builtin (const char *chain, struct xtc_handle *const handle)
 
const char * iptc_get_policy (const char *chain, struct xt_counters *counter, struct xtc_handle *handle)
 
int iptc_insert_entry (const xt_chainlabel chain, const struct ipt_entry *e, unsigned int rulenum, struct xtc_handle *handle)
 
int iptc_replace_entry (const xt_chainlabel chain, const struct ipt_entry *e, unsigned int rulenum, struct xtc_handle *handle)
 
int iptc_append_entry (const xt_chainlabel chain, const struct ipt_entry *e, struct xtc_handle *handle)
 
int iptc_check_entry (const xt_chainlabel chain, const struct ipt_entry *origfw, unsigned char *matchmask, struct xtc_handle *handle)
 
int iptc_delete_entry (const xt_chainlabel chain, const struct ipt_entry *origfw, unsigned char *matchmask, struct xtc_handle *handle)
 
int iptc_delete_num_entry (const xt_chainlabel chain, unsigned int rulenum, struct xtc_handle *handle)
 
const char * iptc_check_packet (const xt_chainlabel chain, struct ipt_entry *entry, struct xtc_handle *handle)
 
int iptc_flush_entries (const xt_chainlabel chain, struct xtc_handle *handle)
 
int iptc_zero_entries (const xt_chainlabel chain, struct xtc_handle *handle)
 
int iptc_create_chain (const xt_chainlabel chain, struct xtc_handle *handle)
 
int iptc_delete_chain (const xt_chainlabel chain, struct xtc_handle *handle)
 
int iptc_rename_chain (const xt_chainlabel oldname, const xt_chainlabel newname, struct xtc_handle *handle)
 
int iptc_set_policy (const xt_chainlabel chain, const xt_chainlabel policy, struct xt_counters *counters, struct xtc_handle *handle)
 
int iptc_get_references (unsigned int *ref, const xt_chainlabel chain, struct xtc_handle *handle)
 
struct xt_countersiptc_read_counter (const xt_chainlabel chain, unsigned int rulenum, struct xtc_handle *handle)
 
int iptc_zero_counter (const xt_chainlabel chain, unsigned int rulenum, struct xtc_handle *handle)
 
int iptc_set_counter (const xt_chainlabel chain, unsigned int rulenum, struct xt_counters *counters, struct xtc_handle *handle)
 
int iptc_commit (struct xtc_handle *handle)
 
int iptc_get_raw_socket (void)
 
const char * iptc_strerror (int err)
 
void dump_entries (struct xtc_handle *const)
 

Variables

const struct xtc_ops iptc_ops
 

Macro Definition Documentation

#define ipt_chainlabel   xt_chainlabel
#define iptc_handle   xtc_handle
#define IPTC_LABEL_ACCEPT   "ACCEPT"
#define IPTC_LABEL_DROP   "DROP"
#define IPTC_LABEL_QUEUE   "QUEUE"
#define IPTC_LABEL_RETURN   "RETURN"

Function Documentation

void dump_entries ( struct xtc_handle const)
int iptc_append_entry ( const xt_chainlabel  chain,
const struct ipt_entry e,
struct xtc_handle handle 
)
int iptc_builtin ( const char *  chain,
struct xtc_handle *const  handle 
)

Referenced by for_each_chain4().

Here is the caller graph for this function:

int iptc_check_entry ( const xt_chainlabel  chain,
const struct ipt_entry origfw,
unsigned char *  matchmask,
struct xtc_handle handle 
)
const char* iptc_check_packet ( const xt_chainlabel  chain,
struct ipt_entry entry,
struct xtc_handle handle 
)
int iptc_commit ( struct xtc_handle handle)

Referenced by iptables_main().

Here is the caller graph for this function:

int iptc_create_chain ( const xt_chainlabel  chain,
struct xtc_handle handle 
)

Referenced by do_command4().

Here is the caller graph for this function:

int iptc_delete_chain ( const xt_chainlabel  chain,
struct xtc_handle handle 
)

Referenced by delete_chain4().

Here is the caller graph for this function:

int iptc_delete_entry ( const xt_chainlabel  chain,
const struct ipt_entry origfw,
unsigned char *  matchmask,
struct xtc_handle handle 
)
int iptc_delete_num_entry ( const xt_chainlabel  chain,
unsigned int  rulenum,
struct xtc_handle handle 
)

Referenced by do_command4().

Here is the caller graph for this function:

const char* iptc_first_chain ( struct xtc_handle handle)

Referenced by for_each_chain4().

Here is the caller graph for this function:

const struct ipt_entry* iptc_first_rule ( const char *  chain,
struct xtc_handle handle 
)
int iptc_flush_entries ( const xt_chainlabel  chain,
struct xtc_handle handle 
)

Referenced by flush_entries4().

Here is the caller graph for this function:

void iptc_free ( struct xtc_handle h)

Referenced by iptables_main().

Here is the caller graph for this function:

const char* iptc_get_policy ( const char *  chain,
struct xt_counters counter,
struct xtc_handle handle 
)
int iptc_get_raw_socket ( void  )
int iptc_get_references ( unsigned int *  ref,
const xt_chainlabel  chain,
struct xtc_handle handle 
)
const char* iptc_get_target ( const struct ipt_entry e,
struct xtc_handle handle 
)

Referenced by print_rule4().

Here is the caller graph for this function:

struct xtc_handle* iptc_init ( const char *  tablename)

Referenced by do_command4().

Here is the caller graph for this function:

int iptc_insert_entry ( const xt_chainlabel  chain,
const struct ipt_entry e,
unsigned int  rulenum,
struct xtc_handle handle 
)
int iptc_is_chain ( const char *  chain,
struct xtc_handle *const  handle 
)

Referenced by do_command4().

Here is the caller graph for this function:

const char* iptc_next_chain ( struct xtc_handle handle)

Referenced by for_each_chain4().

Here is the caller graph for this function:

const struct ipt_entry* iptc_next_rule ( const struct ipt_entry prev,
struct xtc_handle handle 
)
struct xt_counters* iptc_read_counter ( const xt_chainlabel  chain,
unsigned int  rulenum,
struct xtc_handle handle 
)
int iptc_rename_chain ( const xt_chainlabel  oldname,
const xt_chainlabel  newname,
struct xtc_handle handle 
)

Referenced by do_command4().

Here is the caller graph for this function:

int iptc_replace_entry ( const xt_chainlabel  chain,
const struct ipt_entry e,
unsigned int  rulenum,
struct xtc_handle handle 
)
int iptc_set_counter ( const xt_chainlabel  chain,
unsigned int  rulenum,
struct xt_counters counters,
struct xtc_handle handle 
)
int iptc_set_policy ( const xt_chainlabel  chain,
const xt_chainlabel  policy,
struct xt_counters counters,
struct xtc_handle handle 
)

Referenced by do_command4().

Here is the caller graph for this function:

const char* iptc_strerror ( int  err)

Referenced by do_command4(), and iptables_main().

Here is the caller graph for this function:

int iptc_zero_counter ( const xt_chainlabel  chain,
unsigned int  rulenum,
struct xtc_handle handle 
)

Referenced by do_command4().

Here is the caller graph for this function:

int iptc_zero_entries ( const xt_chainlabel  chain,
struct xtc_handle handle 
)

Variable Documentation

const struct xtc_ops iptc_ops

Referenced by iptables_restore_main().