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

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_matchload_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)
 

Macro Definition Documentation

#define XT_SOCKET_LEN   8

Referenced by xtables_lock().

#define XT_SOCKET_NAME   "xtables"

Referenced by xtables_lock().

Function Documentation

const char* proto_to_name ( uint8_t  proto,
int  nolookup 
)

References xtables_pprot::name, NULL, and xtables_chain_protos.

Referenced by print_firewall_details().

Here is the caller graph for this function:

int subcmd_main ( int  argc,
char **  argv,
const struct subcommand cb 
)

References subcommand::name, and NULL.

Referenced by main().

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

bool xtables_lock ( int  wait)

References offsetof, XT_SOCKET_LEN, and XT_SOCKET_NAME.

Referenced by do_command4(), and do_command6().

Here is the caller graph for this function: