home *** CD-ROM | disk | FTP | other *** search
- /* Header file for cf.c */
-
- typedef unsigned int uint;
- typedef unsigned short ushort;
- typedef unsigned long ulong;
- typedef unsigned char unchar;
-
- typedef struct {
- unchar *keyword;
- uint type;
- uint status;
- uint (*handler)(unchar *cp, void **ap);
- void *arg;
- uint line;
- } key;
-
- typedef struct {
- unchar *keyword;
- uint val;
- } xlate;
-
- typedef struct var_struct {
- struct var_struct *next;
- unchar *name;
- unchar *val;
- } var;
-
- typedef enum { NORMAL, ESCAPE, VARC1, VARC2 } states;
-
- /* internal representation of IP numbers */
- typedef ulong ip_t;
- typedef ip_t ip;
-
- /* network representation of IP numbers */
- typedef struct {
- unchar addr[4];
- } netip;
-
- typedef struct {
- unchar type;
- unchar version;
- ushort len;
- } pcr_header;
-
- typedef struct {
- netip address;
- netip net;
- netip netmask;
- ushort flags;
- ushort metric;
- ushort id;
- } pcr_interface;
-
- typedef struct {
- netip net;
- netip netmask;
- netip gateway;
- unchar metric;
- unchar flags;
- ushort id;
- } pcr_route;
-
- typedef struct {
- netip forward_address;
- } pcr_bootp;
-
- typedef struct {
- netip log_host;
- ushort log_priority;
- ushort log_mask;
- } pcr_syslog;
-
-
- #define TRUE 1
- #define FALSE 0
-
- #define MAX_GLOBALS 1
- #define MAX_INTERFACES 8
- #define MAX_ROUTES 200
- #define MAX_SOURCES 200
- #define MAX_LINKS 200
- #define TRANSIT_NET "127.1.0.0"
- #define TRANSIT_MASK "255.255.0.0"
- #define INBUF_SIZE 4096
-
- /* interface types */
- #define IT_ETHERNET 1
- #define IT_POINT2POINT 2
- #define IT_ISDN 3
-
- #define H_NONE 1
- #define H_CTS 2
-
- #define DS_OFF 1
- #define DS_ON 2
-
- #define DR_DENY 1
- #define DR_PERMIT 2
-
- /* keyword types */
- #define T_REQUIRED 1
- #define T_OPTIONAL 2
- #define T_INHIBITED 3
- #define T_TERMINAL 4
-
- /* keyword statuses */
- #define S_NOTSET 1
- #define S_SET 2
- #define S_TRAVERSE 3
-
- /* PCroute defines */
- #define PCR_CFG_BASE "p"
- #define PCR_CFG_TAIL ".cfg"
-
- #define IF_TYPE 1
- #define RT_TYPE 10
- #define BP_TYPE 20
- #define SL_TYPE 22
-
- #define IF_VERSION 3
- #define RT_VERSION 2
- #define BP_VERSION 1
- #define SL_VERSION 1
-
- /* ISPA defines */
- #define ISPA_NAME "ispa"
- #define ISPA_CFG_BASE "ispa"
- #define ISPA_CFG_TAIL ".cfg"
-
- #define START_FILE_NAME "inar.bat"
-
- #define BASE_INT 0x60
-