netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
main.c File Reference
#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>
Include dependency graph for main.c:

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 }
 

Macro Definition Documentation

#define OPTSTRING   "hvf:iI:vnNa"

Referenced by main().

Enumeration Type Documentation

enum opt_vals
Enumerator
OPT_HELP 
OPT_VERSION 
OPT_FILE 
OPT_INTERACTIVE 
OPT_INCLUDEPATH 
OPT_NUMERIC 
OPT_IP2NAME 
OPT_DEBUG 
OPT_HANDLE_OUTPUT 
OPT_INVALID 

Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

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 ip2name_output

Referenced by main().

unsigned int max_errors = 10
unsigned int numeric_output

Referenced by main().