#include <getopt.h>
#include <libgen.h>
#include <netdb.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <xtables.h>
#include "xshared.h"
Macros | |
#define | XT_SOCKET_NAME "xtables" |
#define | XT_SOCKET_LEN 8 |
Functions | |
void | print_extension_helps (const struct xtables_target *t, const struct xtables_rule_match *m) |
const char * | proto_to_name (uint8_t proto, int nolookup) |
struct xtables_match * | load_proto (struct iptables_command_state *cs) |
int | command_default (struct iptables_command_state *cs, struct xtables_globals *gl) |
int | subcmd_main (int argc, char **argv, const struct subcommand *cb) |
void | xs_init_target (struct xtables_target *target) |
void | xs_init_match (struct xtables_match *match) |
bool | xtables_lock (int wait) |
#define XT_SOCKET_LEN 8 |
Referenced by xtables_lock().
#define XT_SOCKET_NAME "xtables" |
Referenced by xtables_lock().
int command_default | ( | struct iptables_command_state * | cs, |
struct xtables_globals * | gl | ||
) |
References iptables_command_state::argv, iptables_command_state::c, xtables_rule_match::completed, xtables_match::extra_opts, iptables_command_state::fw, iptables_command_state::invert, load_proto(), xtables_match::m, xtables_rule_match::match, xt_entry_match::match_size, iptables_command_state::matches, xtables_match::name, xtables_rule_match::next, NULL, xtables_match::option_offset, xtables_target::option_offset, xtables_globals::opts, xtables_globals::orig_opts, OTHER_PROBLEM, PARAMETER_PROBLEM, xtables_match::parse, xtables_target::parse, iptables_command_state::proto_used, xtables_match::revision, size, xtables_match::size, iptables_command_state::target, xt_entry_match::u, xt_entry_match::user, xtables_match::x6_options, xtables_match::x6_parse, xtables_target::x6_parse, xs_init_match(), XT_ALIGN, XT_OPTION_OFFSET_SCALE, xtables_calloc(), xtables_error, xtables_merge_options(), xtables_option_mpcall(), xtables_option_tpcall(), and xtables_options_xfrm().
Referenced by do_command4(), do_command6(), and do_commandx().
struct xtables_match* load_proto | ( | struct iptables_command_state * | cs | ) |
References iptables_command_state::matches, NULL, OPT_NUMERIC, iptables_command_state::options, iptables_command_state::protocol, and XTF_TRY_LOAD.
Referenced by command_default().
void print_extension_helps | ( | const struct xtables_target * | t, |
const struct xtables_rule_match * | m | ||
) |
const char* proto_to_name | ( | uint8_t | proto, |
int | nolookup | ||
) |
References xtables_pprot::name, NULL, and xtables_chain_protos.
Referenced by print_firewall_details().
int subcmd_main | ( | int | argc, |
char ** | argv, | ||
const struct subcommand * | cb | ||
) |
References subcommand::name, and NULL.
Referenced by main().
void xs_init_match | ( | struct xtables_match * | match | ) |
References xtables_match::init, xtables_match::m, NULL, RESOURCE_PROBLEM, xtables_match::udata, xtables_match::udata_size, and xtables_error.
Referenced by command_default().
void xs_init_target | ( | struct xtables_target * | target | ) |
References xtables_target::init, NULL, RESOURCE_PROBLEM, xtables_target::t, xtables_target::udata, xtables_target::udata_size, and xtables_error.
Referenced by do_command4(), and do_command6().
bool xtables_lock | ( | int | wait | ) |
References offsetof, XT_SOCKET_LEN, and XT_SOCKET_NAME.
Referenced by do_command4(), and do_command6().