/*
- * $Id: cache_cf.cc,v 1.75 1996/08/27 17:55:18 wessels Exp $
+ * $Id: cache_cf.cc,v 1.76 1996/08/28 17:44:28 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
#define DefaultTcpOutgoingAddr INADDR_NONE
#define DefaultUdpIncomingAddr INADDR_ANY
#define DefaultUdpOutgoingAddr INADDR_NONE
-#define DefaultClientNetmask 0xFFFFFFFF;
+#define DefaultClientNetmask 0xFFFFFFFF
#define DefaultSslProxyPort 0
#define DefaultSslProxyHost (char *)NULL
+#define DefaultIpcacheSize 1024
+#define DefaultIpcacheLow 90
+#define DefaultIpcacheHigh 95
int httpd_accel_mode = 0; /* for fast access */
char *DefaultSwapDir = DEFAULT_SWAP_DIR;
else if (!strcmp(token, "err_html_text"))
parseErrHtmlLine();
+ else if (!strcmp(token, "ipcache_size"))
+ parseIntegerValue(&Config.ipcache.size);
+ else if (!strcmp(token, "ipcache_low"))
+ parseIntegerValue(&Config.ipcache.low);
+ else if (!strcmp(token, "ipcache_high"))
+ parseIntegerValue(&Config.ipcache.high);
+
else {
debug(3, 0, "parseConfigFile: line %d unrecognized: '%s'\n",
config_lineno,
Config.Addrs.client_netmask.s_addr = DefaultClientNetmask;
Config.sslProxy.port = DefaultSslProxyPort;
Config.sslProxy.host = safe_xstrdup(DefaultSslProxyHost);
+ Config.ipcache.size = DefaultIpcacheSize;
+ Config.ipcache.low = DefaultIpcacheLow;
+ Config.ipcache.high = DefaultIpcacheHigh;
}
static void configDoConfigure()
/*
- * $Id: ipcache.cc,v 1.48 1996/08/28 17:34:29 wessels Exp $
+ * $Id: ipcache.cc,v 1.49 1996/08/28 17:44:30 wessels Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
#define MAX_LINELEN (4096)
-#define MAX_IP 1024 /* Maximum cached IP */
#define IP_LOW_WATER 90
#define IP_HIGH_WATER 95
#define MAX_HOST_NAME 256
*(static_result->h_addr_list + 0) = xcalloc(1, 4);
static_result->h_name = xcalloc(1, MAX_HOST_NAME + 1);
- ipcache_high = (long) (((float) MAX_IP *
- (float) IP_HIGH_WATER) / (float) 100);
- ipcache_low = (long) (((float) MAX_IP *
- (float) IP_LOW_WATER) / (float) 100);
+ ipcache_high = (long) (((float) Config.ipcache.size *
+ (float) Config.ipcache.high) / (float) 100);
+ ipcache_low = (long) (((float) Config.ipcache.size *
+ (float) Config.ipcache.low) / (float) 100);
}
/* clean up the pending entries in dnsserver */