#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <getopt.h>
#include <fcntl.h>
#include <sys/types.h>
#include <nftables.h>
#include <utils.h>
#include <parser.h>
#include <rule.h>
#include <netlink.h>
#include <erec.h>
#include <mnl.h>
#include <cli.h>
Macros | |
#define | OPTSTRING "hvf:iI:vnNa" |
Enumerations | |
enum | opt_vals { OPT_HELP = 'h', OPT_VERSION = 'v', OPT_FILE = 'f', OPT_INTERACTIVE = 'i', OPT_INCLUDEPATH = 'I', OPT_NUMERIC = 'n', OPT_IP2NAME = 'N', OPT_DEBUG = 'd', OPT_HANDLE_OUTPUT = 'a', OPT_INVALID = '?' } |
Functions | |
int | nft_run (void *scanner, struct parser_state *state, struct list_head *msgs) |
int | main (int argc, char *const *argv) |
Variables | |
unsigned int | max_errors = 10 |
unsigned int | numeric_output |
unsigned int | ip2name_output |
unsigned int | handle_output |
const char * | include_paths [INCLUDE_PATHS_MAX] = { DEFAULT_INCLUDE_PATH } |
#define OPTSTRING "hvf:iI:vnNa" |
Referenced by main().
enum opt_vals |
int main | ( | int | argc, |
char *const * | argv | ||
) |
References array_size, buf, cli_init(), erec_print_list(), handle_output, include_paths, INCLUDE_PATHS_MAX, internal_location, ip2name_output, len, LIST_HEAD, name, NFT_EXIT_FAILURE, NFT_EXIT_SUCCESS, nft_run(), NULL, numeric_output, OPT_DEBUG, OPT_FILE, OPT_HANDLE_OUTPUT, OPT_HELP, OPT_INCLUDEPATH, OPT_INTERACTIVE, OPT_INVALID, OPT_IP2NAME, OPT_NUMERIC, OPT_VERSION, OPTSTRING, parser_init(), scanner_destroy(), scanner_init(), scanner_push_buffer(), scanner_read_file(), xfree, and xzalloc().
int nft_run | ( | void * | scanner, |
struct parser_state * | state, | ||
struct list_head * | msgs | ||
) |
References cmd_free(), parser_state::cmds, cmd::list, list_for_each_entry_safe, parser_state::nerrs, netlink_restart(), and nft_parse().
Referenced by main().
unsigned int handle_output |
Referenced by main(), and rule_print().
const char* include_paths[INCLUDE_PATHS_MAX] = { DEFAULT_INCLUDE_PATH } |
Referenced by main().
unsigned int max_errors = 10 |