#include <getopt.h>
#include <string.h>
#include <netdb.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <dlfcn.h>
#include <ctype.h>
#include <stdarg.h>
#include <limits.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <net/if.h>
#include <netinet/ether.h>
#include <xtables.h>
#include "xshared.h"
#include "nft.h"
#include "nft-arp.h"
#include <linux/netfilter_arp/arp_tables.h>
Data Structures | |
struct | pprot |
Macros | |
#define | TRUE 1 |
#define | FALSE 0 |
#define | CMD_NONE 0x0000U |
#define | CMD_INSERT 0x0001U |
#define | CMD_DELETE 0x0002U |
#define | CMD_DELETE_NUM 0x0004U |
#define | CMD_REPLACE 0x0008U |
#define | CMD_APPEND 0x0010U |
#define | CMD_LIST 0x0020U |
#define | CMD_FLUSH 0x0040U |
#define | CMD_ZERO 0x0080U |
#define | CMD_NEW_CHAIN 0x0100U |
#define | CMD_DELETE_CHAIN 0x0200U |
#define | CMD_SET_POLICY 0x0400U |
#define | CMD_CHECK 0x0800U |
#define | CMD_RENAME_CHAIN 0x1000U |
#define | NUMBER_OF_CMD 13 |
#define | OPTION_OFFSET 256 |
#define | OPT_NONE 0x00000U |
#define | OPT_NUMERIC 0x00001U |
#define | OPT_S_IP 0x00002U |
#define | OPT_D_IP 0x00004U |
#define | OPT_S_MAC 0x00008U |
#define | OPT_D_MAC 0x00010U |
#define | OPT_H_LENGTH 0x00020U |
#define | OPT_P_LENGTH 0x00040U |
#define | OPT_OPCODE 0x00080U |
#define | OPT_H_TYPE 0x00100U |
#define | OPT_P_TYPE 0x00200U |
#define | OPT_JUMP 0x00400U |
#define | OPT_VERBOSE 0x00800U |
#define | OPT_VIANAMEIN 0x01000U |
#define | OPT_VIANAMEOUT 0x02000U |
#define | OPT_LINENUMBERS 0x04000U |
#define | OPT_COUNTERS 0x08000U |
#define | NUMBER_OF_OPT 16 |
Typedefs | |
typedef char | arpt_chainlabel [32] |
Functions | |
void | xtables_exit_error (enum xtables_exittype status, const char *msg,...) |
int | do_commandarp (struct nft_handle *h, int argc, char *argv[], char **table) |
Variables | |
int | RUNTIME_NF_ARP_NUMHOOKS = 3 |
struct xtables_globals | xtables_globals |
const char * | program_version = XTABLES_VERSION |
const char * | program_name = "arptables" |
unsigned char | mac_type_unicast [ETH_ALEN] = {0,0,0,0,0,0} |
unsigned char | msk_type_unicast [ETH_ALEN] = {1,0,0,0,0,0} |
unsigned char | mac_type_multicast [ETH_ALEN] = {1,0,0,0,0,0} |
unsigned char | msk_type_multicast [ETH_ALEN] = {1,0,0,0,0,0} |
unsigned char | mac_type_broadcast [ETH_ALEN] = {255,255,255,255,255,255} |
unsigned char | msk_type_broadcast [ETH_ALEN] = {255,255,255,255,255,255} |
#define CMD_APPEND 0x0010U |
Referenced by do_commandarp().
#define CMD_CHECK 0x0800U |
#define CMD_DELETE 0x0002U |
Referenced by do_commandarp().
#define CMD_DELETE_CHAIN 0x0200U |
Referenced by do_commandarp().
#define CMD_DELETE_NUM 0x0004U |
Referenced by do_commandarp().
#define CMD_FLUSH 0x0040U |
Referenced by do_commandarp().
#define CMD_INSERT 0x0001U |
Referenced by do_commandarp().
#define CMD_LIST 0x0020U |
Referenced by do_commandarp().
#define CMD_NEW_CHAIN 0x0100U |
Referenced by do_commandarp().
#define CMD_NONE 0x0000U |
Referenced by do_commandarp().
#define CMD_RENAME_CHAIN 0x1000U |
Referenced by do_commandarp().
#define CMD_REPLACE 0x0008U |
Referenced by do_commandarp().
#define CMD_SET_POLICY 0x0400U |
Referenced by do_commandarp().
#define CMD_ZERO 0x0080U |
Referenced by do_commandarp().
#define FALSE 0 |
Referenced by do_commandarp().
#define NUMBER_OF_CMD 13 |
#define NUMBER_OF_OPT 16 |
#define OPT_COUNTERS 0x08000U |
Referenced by do_commandarp().
#define OPT_D_IP 0x00004U |
Referenced by do_commandarp().
#define OPT_D_MAC 0x00010U |
Referenced by do_commandarp().
#define OPT_H_LENGTH 0x00020U |
Referenced by do_commandarp().
#define OPT_H_TYPE 0x00100U |
Referenced by do_commandarp().
#define OPT_JUMP 0x00400U |
Referenced by do_commandarp().
#define OPT_LINENUMBERS 0x04000U |
Referenced by do_commandarp().
#define OPT_NONE 0x00000U |
#define OPT_NUMERIC 0x00001U |
Referenced by do_commandarp().
#define OPT_OPCODE 0x00080U |
Referenced by do_commandarp().
#define OPT_P_LENGTH 0x00040U |
#define OPT_P_TYPE 0x00200U |
Referenced by do_commandarp().
#define OPT_S_IP 0x00002U |
Referenced by do_commandarp().
#define OPT_S_MAC 0x00008U |
Referenced by do_commandarp().
#define OPT_VERBOSE 0x00800U |
Referenced by do_commandarp().
#define OPT_VIANAMEIN 0x01000U |
Referenced by do_commandarp().
#define OPT_VIANAMEOUT 0x02000U |
Referenced by do_commandarp().
#define OPTION_OFFSET 256 |
#define TRUE 1 |
Referenced by do_commandarp().
typedef char arpt_chainlabel[32] |
int do_commandarp | ( | struct nft_handle * | h, |
int | argc, | ||
char * | argv[], | ||
char ** | table | ||
) |
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_FUNCTION_MAXNAMELEN, ARPT_INV_SRCIP, ARPT_INV_TGTIP, 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, exit_printhelp(), exit_tryhelp(), FALSE, nft_handle::family, arptables_command_state::fw, generic_opt_check(), get16_and_mask(), getlength_and_mask(), getmac_and_mask(), arpt_arp::iniface, arpt_arp::iniface_mask, arpt_arp::invflags, arptables_command_state::jumpto, arpt_devaddr_info::mask, xtables_target::next, nft_chain_set(), nft_chain_user_add(), nft_chain_user_del(), nft_chain_user_rename(), nft_chain_zero_counters(), nft_family_ops_lookup(), nft_init(), nft_rule_delete_num(), nft_rule_flush(), NULL, NUMOPCODES, opcodes, nft_handle::ops, 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, opts, xtables_globals::orig_opts, OTHER_PROBLEM, arpt_arp::outiface, arpt_arp::outiface_mask, PARAMETER_PROBLEM, parse_hostnetworkmask(), arpt_counters::pcnt, program_name, program_version, size, arpt_arp::src_devaddr, xtables_target::t, arptables_command_state::target, arpt_entry_target::target, xtables_target::tflags, arpt_arp::tgt_devaddr, arpt_arp::tmsk, TRUE, xtables_target::used, XT_STANDARD_TARGET, xtables_arp, xtables_calloc(), xtables_error, xtables_find_target(), xtables_option_tfcall(), xtables_option_tpcall(), xtables_targets, XTF_LOAD_MUST_SUCCEED, and XTF_TRY_LOAD.
Referenced by xtables_arp_main().
void xtables_exit_error | ( | enum xtables_exittype | status, |
const char * | msg, | ||
... | |||
) |
References exit_tryhelp(), PARAMETER_PROBLEM, prog_name, prog_vers, VERSION_PROBLEM, and xtables_free_opts().
const char* program_name = "arptables" |
Referenced by do_commandarp().
const char* program_version = XTABLES_VERSION |
Referenced by do_commandarp().
int RUNTIME_NF_ARP_NUMHOOKS = 3 |