/*
 * firewall policy tables
 */
#ifndef FW_POLICIES_H
#define FW_POLICIES_H

#include <stdio.h>
#include <linux/if.h>
#include <linux/ip_fw.h>

#define FIREWALL_CONFIG	"/etc/gatekeeper.cf"

#define MAX_PORTS IP_FW_MAX_PORTS
#define	PORT_RANGE	IP_FW_F_DRNG

struct address {
    long address;
    long netmask;
} ;
struct chainv4 {
    long srcaddr, srcmask;
    long dstaddr, dstmask;
    int nrports;
    unsigned short port[MAX_PORTS];
    int flag;		/* flags */
    short proto;	/* TCP/UDP/ICMP */
    short direction;	/* IN/OUT */
    short action;	/* ALLOW/DENY */
    struct chainv4* next, *prev;
};

extern struct chainv4 *soft_fw[2];
extern struct chainv4 *hard_fw[2];

extern void print(FILE *, char *, struct chainv4 *);
extern char *ip_proto_name(int);
extern void display(FILE *, char *, struct chainv4 *);

#endif/*FW_POLICIES_H*/
