Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

fw.c File Reference

#include "config.h"
#include <sys/types.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dnet.h"
#include "mod.h"

Go to the source code of this file.

Functions

static void usage (void)
static int print_rule (const struct fw_rule *fr, void *arg)
static int arg_to_fr (int argc, char *argv[], struct fw_rule *fr)
int fw_main (int argc, char *argv[])

Variables

mod mod_fw


Function Documentation

static int arg_to_fr int  argc,
char *  argv[],
struct fw_rule fr
[static]
 

Definition at line 86 of file fw.c.

References addr_aton, errno, FW_DIR_IN, FW_DIR_OUT, FW_OP_ALLOW, FW_OP_BLOCK, IP_PROTO_ICMP, IP_PROTO_IGMP, IP_PROTO_TCP, IP_PROTO_UDP, memset, NULL, strlcpy, strtol(), and TCP_PORT_MAX.

Referenced by fw_main().

int fw_main int  argc,
char *  argv[]
 

Definition at line 156 of file fw.c.

References arg_to_fr(), err(), fw_add(), fw_close(), fw_delete(), fw_loop(), fw_open(), NULL, print_rule(), and usage().

static int print_rule const struct fw_rule fr,
void *  arg
[static]
 

Definition at line 33 of file fw.c.

References addr_ntoa(), addr::addr_type, fw_rule::fw_device, fw_rule::fw_dir, FW_DIR_IN, fw_rule::fw_dport, fw_rule::fw_dst, fw_rule::fw_op, FW_OP_ALLOW, fw_rule::fw_proto, fw_rule::fw_sport, fw_rule::fw_src, IP_PROTO_ICMP, IP_PROTO_TCP, IP_PROTO_UDP, NULL, and snprintf.

Referenced by fw_main().

static void usage void   )  [static]
 

Definition at line 23 of file fw.c.

Referenced by fw_main(), intf_main(), and route_main().


Variable Documentation

struct mod mod_fw
 

Initial value:

 {
        "fw",
        MOD_TYPE_KERN,
        fw_main
}

Definition at line 192 of file fw.c.


Generated on Sun May 14 14:51:22 2006 by  doxygen 1.4.2