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

Data Structures

struct  arpt_entry_match
 
struct  arptables_match
 
struct  arptables_target
 

Enumerations

enum  arpt_tryload {
  DONT_LOAD,
  TRY_LOAD,
  LOAD_MUST_SUCCEED
}
 

Functions

void register_match (struct arptables_match *me)
 
void register_target (struct arptables_target *me)
 
struct in_addr * dotted_to_addr (const char *dotted)
 
char * addr_to_dotted (const struct in_addr *addrp)
 
char * addr_to_anyname (const struct in_addr *addr)
 
char * mask_to_dotted (const struct in_addr *mask)
 
void parse_hostnetworkmask (const char *name, struct in_addr **addrpp, struct in_addr *maskp, unsigned int *naddrs)
 
u_int16_t parse_protocol (const char *s)
 
int do_command (int argc, char *argv[], char **table, arptc_handle_t *handle)
 
struct arptables_targetfind_target (const char *name, enum arpt_tryload)
 
struct arptables_matchfind_match (const char *name, enum arpt_tryload)
 
int delete_chain (const arpt_chainlabel chain, int verbose, arptc_handle_t *handle)
 
int flush_entries (const arpt_chainlabel chain, int verbose, arptc_handle_t *handle)
 
int for_each_chain (int(*fn)(const arpt_chainlabel, int, arptc_handle_t *), int verbose, int builtinstoo, arptc_handle_t *handle)
 
struct in_addr * parse_hostnetwork (const char *name, unsigned int *naddrs)
 
void print_mac (const unsigned char *mac, int l)
 

Variables

struct arptables_matcharptables_matches
 
struct arptables_targetarptables_targets
 

Enumeration Type Documentation

Enumerator
DONT_LOAD 
TRY_LOAD 
LOAD_MUST_SUCCEED 

Function Documentation

char* addr_to_anyname ( const struct in_addr *  addr)

References addr_to_dotted(), name, and NULL.

Here is the call graph for this function:

char* addr_to_dotted ( const struct in_addr *  addrp)

References buf.

Referenced by addr_to_anyname(), and mask_to_dotted().

Here is the caller graph for this function:

int delete_chain ( const arpt_chainlabel  chain,
int  verbose,
arptc_handle_t handle 
)

References arptc_delete_chain(), delete_chain(), and for_each_chain().

Referenced by delete_chain(), and do_command().

Here is the call graph for this function:

Here is the caller graph for this function:

int do_command ( int  argc,
char *  argv[],
char **  table,
arptc_handle_t handle 
)

References arpt_devaddr_info::addr, arpt_arp::arhln, arpt_arp::arhln_mask, arpt_arp::arhrd, arpt_arp::arhrd_mask, arpt_entry::arp, arpt_arp::arpop, arpt_arp::arpop_mask, arpt_arp::arpro, arpt_arp::arpro_mask, ARPT_ALIGN, ARPT_FUNCTION_MAXNAMELEN, ARPT_INV_SRCIP, ARPT_INV_TGTIP, ARPT_STANDARD_TARGET, arptables_insmod(), arptc_create_chain(), arptc_delete_num_entry(), arptc_init(), arptc_is_chain(), arptc_rename_chain(), arptc_set_policy(), arptc_strerror(), arpt_counters::bcnt, check_inverse(), CMD_APPEND, CMD_DELETE, CMD_DELETE_CHAIN, CMD_DELETE_NUM, CMD_FLUSH, CMD_INSERT, CMD_LIST, CMD_NEW_CHAIN, CMD_NONE, CMD_RENAME_CHAIN, CMD_REPLACE, CMD_SET_POLICY, CMD_ZERO, arpt_entry::counters, delete_chain(), dump_entries(), exit_error(), exit_printhelp(), exit_tryhelp(), arptables_target::extra_opts, FALSE, arptables_target::final_check, find_match(), find_target(), flush_entries(), get16_and_mask(), getlength_and_mask(), getmac_and_mask(), arpt_arp::iniface, arpt_arp::iniface_mask, arptables_target::init, arpt_arp::invflags, LOAD_MUST_SUCCEED, arpt_devaddr_info::mask, arptables_target::next, NULL, NUMOPCODES, OPT_COUNTERS, OPT_D_IP, OPT_D_MAC, OPT_H_LENGTH, OPT_H_TYPE, OPT_JUMP, OPT_LINENUMBERS, OPT_NUMERIC, OPT_OPCODE, OPT_P_TYPE, OPT_S_IP, OPT_S_MAC, OPT_VERBOSE, OPT_VIANAMEIN, OPT_VIANAMEOUT, arptables_target::option_offset, opts, arpt_arp::outiface, arpt_arp::outiface_mask, PARAMETER_PROBLEM, arptables_target::parse, parse_hostnetworkmask(), arpt_counters::pcnt, program_name, program_version, RUNTIME_NF_ARP_NUMHOOKS, arptables_target::size, size, arpt_arp::src_devaddr, arptables_target::t, arpt_entry_target::target_size, arptables_target::tflags, arpt_arp::tgt_devaddr, arpt_arp::tmsk, TRUE, TRY_LOAD, arpt_entry_target::u, arptables_target::used, arpt_entry_target::user, and VERSION_PROBLEM.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

struct in_addr* dotted_to_addr ( const char *  dotted)

References buf, NULL, and string_to_number().

Referenced by parse_hostnetwork().

Here is the call graph for this function:

Here is the caller graph for this function:

struct arptables_match* find_match ( const char *  name,
enum  arpt_tryload 
)

References DONT_LOAD, exit_error(), LOAD_MUST_SUCCEED, arptables_match::loaded, arptables_match::name, arptables_match::next, NULL, PARAMETER_PROBLEM, and arptables_match::used.

Referenced by do_command(), and register_match().

Here is the call graph for this function:

Here is the caller graph for this function:

struct arptables_target* find_target ( const char *  name,
enum  arpt_tryload 
)
int flush_entries ( const arpt_chainlabel  chain,
int  verbose,
arptc_handle_t handle 
)

References arptc_flush_entries(), flush_entries(), and for_each_chain().

Referenced by do_command(), and flush_entries().

Here is the call graph for this function:

Here is the caller graph for this function:

int for_each_chain ( int(*)(const arpt_chainlabel, int, arptc_handle_t *)  fn,
int  verbose,
int  builtinstoo,
arptc_handle_t handle 
)

References arptc_builtin(), arptc_first_chain(), and arptc_next_chain().

Referenced by delete_chain(), and flush_entries().

Here is the call graph for this function:

Here is the caller graph for this function:

char* mask_to_dotted ( const struct in_addr *  mask)

References addr_to_dotted(), and buf.

Here is the call graph for this function:

struct in_addr* parse_hostnetwork ( const char *  name,
unsigned int *  naddrs 
)

References dotted_to_addr(), exit_error(), NULL, and PARAMETER_PROBLEM.

Referenced by parse_hostnetworkmask().

Here is the call graph for this function:

Here is the caller graph for this function:

void parse_hostnetworkmask ( const char *  name,
struct in_addr **  addrpp,
struct in_addr *  maskp,
unsigned int *  naddrs 
)

References buf, NULL, and parse_hostnetwork().

Referenced by do_command(), and do_commandarp().

Here is the call graph for this function:

Here is the caller graph for this function:

u_int16_t parse_protocol ( const char *  s)
void print_mac ( const unsigned char *  mac,
int  l 
)

Referenced by print_mac_and_mask().

Here is the caller graph for this function:

Variable Documentation

struct arptables_match* arptables_matches
struct arptables_target* arptables_targets

Referenced by register_target().