home *** CD-ROM | disk | FTP | other *** search
/ PC Press: Internet / PC_PRESS.ISO / software / dos / misc / inar-100.exe / SRC / CF / CF.H < prev   
Encoding:
C/C++ Source or Header  |  1995-05-21  |  2.2 KB  |  133 lines

  1. /* Header file for cf.c */
  2.  
  3. typedef unsigned int    uint;
  4. typedef unsigned short    ushort;
  5. typedef unsigned long    ulong;
  6. typedef unsigned char    unchar;
  7.  
  8. typedef struct {
  9.     unchar    *keyword;
  10.     uint    type;
  11.     uint    status;
  12.     uint    (*handler)(unchar *cp, void **ap);
  13.     void    *arg;
  14.     uint    line;
  15. } key;
  16.  
  17. typedef struct {
  18.     unchar    *keyword;
  19.     uint    val;
  20. } xlate;
  21.  
  22. typedef struct var_struct {
  23.     struct var_struct *next;
  24.     unchar *name;
  25.     unchar *val;
  26. } var;
  27.  
  28. typedef enum { NORMAL, ESCAPE, VARC1, VARC2 } states;
  29.  
  30. /* internal representation of IP numbers */
  31. typedef ulong ip_t;
  32. typedef ip_t ip;
  33.  
  34. /* network representation of IP numbers */
  35. typedef struct {
  36.     unchar    addr[4];
  37. } netip;
  38.  
  39. typedef struct {
  40.     unchar    type;
  41.     unchar    version;
  42.     ushort    len;
  43. } pcr_header;
  44.  
  45. typedef struct {
  46.     netip    address;
  47.     netip    net;
  48.     netip    netmask;
  49.     ushort    flags;
  50.     ushort    metric;
  51.     ushort    id;
  52. } pcr_interface;
  53.  
  54. typedef struct {
  55.     netip    net;
  56.     netip    netmask;
  57.     netip    gateway;
  58.     unchar    metric;
  59.     unchar    flags;
  60.     ushort    id;
  61. } pcr_route;
  62.  
  63. typedef struct {
  64.     netip    forward_address;
  65. } pcr_bootp;
  66.  
  67. typedef struct {
  68.     netip    log_host;
  69.     ushort    log_priority;
  70.     ushort    log_mask;
  71. } pcr_syslog;
  72.  
  73.  
  74. #define TRUE    1
  75. #define FALSE    0
  76.  
  77. #define MAX_GLOBALS        1
  78. #define MAX_INTERFACES        8
  79. #define MAX_ROUTES        200
  80. #define MAX_SOURCES        200
  81. #define MAX_LINKS        200
  82. #define TRANSIT_NET        "127.1.0.0"
  83. #define TRANSIT_MASK        "255.255.0.0"
  84. #define INBUF_SIZE        4096
  85.  
  86. /* interface types */
  87. #define IT_ETHERNET        1
  88. #define IT_POINT2POINT        2
  89. #define IT_ISDN            3
  90.  
  91. #define H_NONE        1
  92. #define H_CTS        2
  93.  
  94. #define DS_OFF        1
  95. #define DS_ON        2
  96.  
  97. #define DR_DENY        1
  98. #define DR_PERMIT    2
  99.  
  100. /* keyword types */
  101. #define T_REQUIRED    1
  102. #define T_OPTIONAL    2
  103. #define T_INHIBITED    3
  104. #define T_TERMINAL    4
  105.  
  106. /* keyword statuses */
  107. #define S_NOTSET    1
  108. #define S_SET        2
  109. #define S_TRAVERSE    3
  110.  
  111. /* PCroute defines */
  112. #define PCR_CFG_BASE    "p"
  113. #define PCR_CFG_TAIL    ".cfg"
  114.  
  115. #define IF_TYPE        1
  116. #define RT_TYPE        10
  117. #define BP_TYPE        20
  118. #define SL_TYPE        22
  119.  
  120. #define IF_VERSION    3
  121. #define RT_VERSION    2
  122. #define BP_VERSION    1
  123. #define SL_VERSION    1
  124.  
  125. /* ISPA defines */
  126. #define ISPA_NAME    "ispa"
  127. #define ISPA_CFG_BASE    "ispa"
  128. #define ISPA_CFG_TAIL    ".cfg"
  129.  
  130. #define START_FILE_NAME    "inar.bat"
  131.  
  132. #define BASE_INT    0x60
  133.