---------------------
PatchSet 153 
Date: 2000/04/20 21:57:33
Author: hno
Branch: NLANR
Tag: Z_hno-modio 
Log:
Imported squid-2.4.DEVEL2

Members: 
	COPYRIGHT:1.1.1.2->1.1.1.3 
	ChangeLog:1.1.1.5->1.1.1.6 
	acconfig.h:1.1.1.5->1.1.1.6 
	configure:1.1.1.5->1.1.1.6 
	configure.in:1.1.1.5->1.1.1.6 
	makefile.in:1.1.1.5->1.1.1.6 
	auth_modules/PAM/pam_auth.c:1.1.1.3->1.1.1.4 
	doc/Programming-Guide/prog-guide.sgml:1.1.1.3->1.1.1.4 
	errors/Makefile.in:1.1.1.4->1.1.1.5 
	errors/English/ERR_DNS_FAIL:1.1.1.3->1.1.1.4 
	errors/English/ERR_FTP_PUT_CREATED:1.1.1.2->1.1.1.3 
	errors/English/ERR_FTP_PUT_MODIFIED:1.1.1.2->1.1.1.3 
	errors/English/ERR_SHUTTING_DOWN:1.1.1.3->1.1.1.4 
	errors/Hungarian/ERR_TOO_BIG:1.1.1.2->1.1.1.3 
	include/autoconf.h.in:1.1.1.5->1.1.1.6 
	include/config.h.in:1.1.1.5->1.1.1.6 
	include/heap.h:1.1.1.3->1.1.1.4 
	include/splay.h:1.1.1.4->1.1.1.5 
	include/util.h:1.1.1.5->1.1.1.6 
	include/version.h:1.1.1.5->1.1.1.6 
	lib/Array.c:1.1.1.3->1.1.1.4 
	lib/Makefile.in:1.1.1.4->1.1.1.5 
	lib/Stack.c:1.1.1.3->1.1.1.4 
	lib/getfullhostname.c:1.1.1.2->1.1.1.3 
	lib/hash.c:1.1.1.4->1.1.1.5 
	lib/heap.c:1.1.1.3->1.1.1.4 
	lib/radix.c:1.1.1.3->1.1.1.4 
	lib/rfc1035.c:1.1.1.3->1.1.1.4 
	lib/rfc1123.c:1.1.1.4->1.1.1.5 
	lib/rfc1738.c:1.1.1.4->1.1.1.5 
	lib/splay.c:1.1.1.4->1.1.1.5 
	lib/strerror.c:1.1.1.2->1.1.1.3 
	lib/util.c:1.1.1.5->1.1.1.6 
	src/CacheDigest.c:1.1.1.3->1.1.1.4 
	src/ETag.c:1.1.1.2->1.1.1.3 
	src/HttpBody.c:1.1.1.2->1.1.1.3 
	src/HttpHdrCc.c:1.1.1.5->1.1.1.6 
	src/HttpHdrContRange.c:1.1.1.5->1.1.1.6 
	src/HttpHdrExtField.c:1.1.1.4->1.1.1.5 
	src/HttpHdrRange.c:1.1.1.5->1.1.1.6 
	src/HttpHeader.c:1.1.1.5->1.1.1.6 
	src/HttpHeaderTools.c:1.1.1.5->1.1.1.6 
	src/HttpMsg.c:1.1.1.2->1.1.1.3 
	src/HttpReply.c:1.1.1.5->1.1.1.6 
	src/HttpRequest.c:1.1.1.5->1.1.1.6 
	src/HttpStatusLine.c:1.1.1.4->1.1.1.5 
	src/Makefile.in:1.1.1.5->1.1.1.6 
	src/MemBuf.c:1.1.1.3->1.1.1.4 
	src/MemPool.c:1.1.1.5->1.1.1.6 
	src/Packer.c:1.1.1.3->1.1.1.4 
	src/StatHist.c:1.1.1.3->1.1.1.4 
	src/String.c:1.1.1.2->1.1.1.3 
	src/access_log.c:1.1.1.5->1.1.1.6 
	src/acl.c:1.1.1.5->1.1.1.6 
	src/aiops.c:1.1.1.5->1.1.1.6 
	src/asn.c:1.1.1.5->1.1.1.6 
	src/async_io.c:1.1.1.5->1.1.1.6 
	src/authenticate.c:1.1.1.4->1.1.1.5 
	src/cache_cf.c:1.1.1.5->1.1.1.6 
	src/cache_diff.c:1.1.1.2->1.1.1.3 
	src/cache_manager.c:1.1.1.3->1.1.1.4 
	src/cachemgr.c:1.1.1.4->1.1.1.5 
	src/carp.c:1.1.1.2->1.1.1.3 
	src/cbdata.c:1.1.1.4->1.1.1.5 
	src/cf.data.pre:1.1.1.5->1.1.1.6 
	src/cf_gen.c:1.1.1.4->1.1.1.5 
	src/client.c:1.1.1.5->1.1.1.6 
	src/client_db.c:1.1.1.5->1.1.1.6 
	src/client_side.c:1.1.1.5->1.1.1.6 
	src/comm.c:1.1.1.5->1.1.1.6 
	src/comm_select.c:1.1.1.5->1.1.1.6 
	src/debug.c:1.1.1.5->1.1.1.6 
	src/defines.h:1.1.1.5->1.1.1.6 
	src/delay_pools.c:1.1.1.5->1.1.1.6 
	src/disk.c:1.1.1.4->1.1.1.5 
	src/dns.c:1.1.1.5->1.1.1.6 
	src/dns_internal.c:1.1.1.3->1.1.1.4 
	src/dnsserver.c:1.1.1.4->1.1.1.5 
	src/enums.h:1.1.1.5->1.1.1.6 
	src/errorpage.c:1.1.1.5->1.1.1.6 
	src/event.c:1.1.1.4->1.1.1.5 
	src/fd.c:1.1.1.4->1.1.1.5 
	src/filemap.c:1.1.1.4->1.1.1.5 
	src/forward.c:1.1.1.5->1.1.1.6 
	src/fqdncache.c:1.1.1.4->1.1.1.5 
	src/ftp.c:1.1.1.5->1.1.1.6 
	src/globals.h:1.1.1.5->1.1.1.6 
	src/gopher.c:1.1.1.5->1.1.1.6 
	src/htcp.c:1.1.1.4->1.1.1.5 
	src/http.c:1.1.1.5->1.1.1.6 
	src/icmp.c:1.1.1.3->1.1.1.4 
	src/icp_v2.c:1.1.1.5->1.1.1.6 
	src/icp_v3.c:1.1.1.4->1.1.1.5 
	src/ident.c:1.1.1.4->1.1.1.5 
	src/internal.c:1.1.1.5->1.1.1.6 
	src/ipc.c:1.1.1.5->1.1.1.6 
	src/ipcache.c:1.1.1.5->1.1.1.6 
	src/leakfinder.c:1.1.1.3->1.1.1.4 
	src/main.c:1.1.1.5->1.1.1.6 
	src/mem.c:1.1.1.4->1.1.1.5 
	src/mime.c:1.1.1.5->1.1.1.6 
	src/multicast.c:1.1.1.2->1.1.1.3 
	src/neighbors.c:1.1.1.5->1.1.1.6 
	src/net_db.c:1.1.1.5->1.1.1.6 
	src/pconn.c:1.1.1.3->1.1.1.4 
	src/peer_digest.c:1.1.1.5->1.1.1.6 
	src/peer_select.c:1.1.1.5->1.1.1.6 
	src/pinger.c:1.1.1.4->1.1.1.5 
	src/protos.h:1.1.1.5->1.1.1.6 
	src/pump.c:1.1.1.5->1.1.1.6 
	src/recv-announce.c:1.1.1.2->1.1.1.3 
	src/redirect.c:1.1.1.5->1.1.1.6 
	src/refresh.c:1.1.1.5->1.1.1.6 
	src/send-announce.c:1.1.1.5->1.1.1.6 
	src/snmp_agent.c:1.1.1.5->1.1.1.6 
	src/snmp_core.c:1.1.1.5->1.1.1.6 
	src/squid.h:1.1.1.5->1.1.1.6 
	src/ssl.c:1.1.1.5->1.1.1.6 
	src/stat.c:1.1.1.5->1.1.1.6 
	src/stmem.c:1.1.1.3->1.1.1.4 
	src/store.c:1.1.1.5->1.1.1.6 
	src/store_client.c:1.1.1.5->1.1.1.6 
	src/store_digest.c:1.1.1.5->1.1.1.6 
	src/store_dir.c:1.1.1.5->1.1.1.6 
	src/store_dir_ufs.c:1.1.1.3->1.1.1.4 
	src/store_heap_replacement.c:1.1.1.3->1.1.1.4 
	src/store_io_asyncufs.c:1.1.1.3->1.1.1.4 
	src/store_io_ufs.c:1.1.1.3->1.1.1.4 
	src/store_key_md5.c:1.1.1.5->1.1.1.6 
	src/store_log.c:1.1.1.4->1.1.1.5 
	src/store_rebuild.c:1.1.1.5->1.1.1.6 
	src/store_swapin.c:1.1.1.5->1.1.1.6 
	src/store_swapmeta.c:1.1.1.4->1.1.1.5 
	src/store_swapout.c:1.1.1.5->1.1.1.6 
	src/structs.h:1.1.1.5->1.1.1.6 
	src/test_cache_digest.c:1.1.1.2->1.1.1.3 
	src/tools.c:1.1.1.5->1.1.1.6 
	src/typedefs.h:1.1.1.5->1.1.1.6 
	src/unlinkd.c:1.1.1.5->1.1.1.6 
	src/url.c:1.1.1.5->1.1.1.6 
	src/urn.c:1.1.1.5->1.1.1.6 
	src/useragent.c:1.1.1.5->1.1.1.6 
	src/wais.c:1.1.1.3->1.1.1.4 
	src/wccp.c:1.1.1.3->1.1.1.4 
	src/whois.c:1.1.1.3->1.1.1.4 

Index: squid/COPYRIGHT
===================================================================
RCS file: /cvsroot/squid-sf//squid/COPYRIGHT,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/COPYRIGHT	20 Apr 2000 18:21:58 -0000	1.1.1.2
+++ squid/COPYRIGHT	20 Apr 2000 21:57:33 -0000	1.1.1.3
@@ -1,11 +1,10 @@
 By accepting this notice, you agree to be bound by the following
 agreements:
 
-This software product, SQUID, is developed by Duane Wessels, and
-copyrighted (C) 2000 by the Regents of the University of California,
-with all rights reserved.  UCSD administers the NLANR Cache grants,
-NCR 9616602 and NCR 9521745 under which most of this code was
-developed.
+This software product, SQUID, is copyrighted(C) 1998 by Duane Wessels,
+and the University of California, San Diego (UCSD), with all rights
+reserved.  UCSD administers the NLANR Cache grants, NCR 9616602 and NCR
+9521745 under which most of this code was developed.
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License (version 2) as
Index: squid/ChangeLog
===================================================================
RCS file: /cvsroot/squid-sf//squid/ChangeLog,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/ChangeLog	20 Apr 2000 18:21:58 -0000	1.1.1.5
+++ squid/ChangeLog	20 Apr 2000 21:57:33 -0000	1.1.1.6
@@ -1,98 +1,5 @@
-Changes to Squid-2.3.STABLE2 (Mar 2, 2000):
-
-	- Changed Copyright text.
-	- Changed configure so that some IRIX-6.4 hacks apply to
-	  all IRIX-6.* versions.
-	- Cleaned up HTML bugs in error pages.
-	- Told configure to check for netinet/if_ether.h, which
-	  is used in ARP ACL code, but might not be required.
-	- Added "Cookie" to known HTTP headers so it can be
-	  used in anonymizer configuration.
-	- Added optional TCP_REDIRECT log code for logging
-	  of 301/302 responses returned by Squid.
-	- Added a check for a currently running Squid process.
-	  If the pid file exists, and the pid is running,
-	  Squid complains and refuses to start another instance.
-	- Changed async I/O scope to PTHREAD_SCOPE_PROCESS for
-	  IRIX.
-	- Fixed a bug with the PURGE method.  The purge enable
-	  flag was not getting cleared during reconfigure.
-	  Also required PURGE method to be used in http_access
-	  list before enabling.
-	- Fixed async I/O assertions for file open errors.
-	- Fixed internal DNS assertion when unpacking truncated
-	  messages.
-	- Fixed anonymize_headers bug that caused all headers
-	  to be allowed after a reconfigure.
-	- Fixed an access denied bug for accelerator-only installations.
-	- Fixed internal DNS initialization so that it uses
-	  'dns_nameservers' settings in squid.conf if set.
-	- Fixed 'maxconn' ACL bug that caused it to work backwards
-	  (Pedro Ribeiro).
-	- Fixed syslog bug for daemon mode on Linux.
-	- Fixed 'http_port' parsing bugs.
-	- Fixed internal DNS byte ordering bugs for PTR queries.
-	- Fixed internal DNS queue getting stuck during periods
-	  of low activity (Henrik).
-	- Fixed byte ordering bugs for parsing EPLF FTP listings
-	  on 64-bit systems.
-	- Fixed 'request_body_max_size' bug that caused all
-	  POST, PUT requests to be denied if max size is set
-	  to zero.
-	- Fixed 'redirector_access' bug when using 'myport' ACLs.
-	- Fixed CARP neighbor selection bugs for down peers.
-	- Added 'client_persistent_connections' and
-	  'server_persistent_connections' flags to disable persistent
-	  connections for clients and servers.
-	- Fixed access logging bug that caused many requests to be
-	  logged as TCP_MISS.
-	- Added some bounds checking to delay pools code.
-
-Changes to Squid-2.3.STABLE1 (Jan 9, 2000):
-
-	- Updated PAM authentication module from Henrik Nordstrom.
-	- Updated Bulgarian error messages from Svetlin Simeonov.
-	- Changed ACL routines so that User-Agent (browser) string
-	  is always taken from compiled HTTP request headers
-	  instead of passed as an argument to aclCreateChecklist.
-	- Added a 'strip' option to the 'uri_whitesace' configuration
-	  directive and made it the default behavior.  Whitespace
-	  found in URI's is now stripped out by default.
-	- Added chroot feature.  The 'chroot_dir' config option enables
-	  it and specifies the directory.
-	- Changed clientBuildReplyHeader so that the Age header is
-	  added only for cache hits, and only when we can calculate
-	  a valid, positive age value.
-	- Changed clientWriteComplete and clientGotNotEnough so
-	  that they keep persistent connections open for more types
-	  of replies that don't have bodies.
-	- Changed filemap.c routines to dynamically grow filemap
-	  space as needed.
-	- Added a hack to ftp.c to deal with ftp.netscape.com, which
-	  sometimes doesn't acknowledge PASV commands.
-	- Fixed FTP bug with ftpScheduleReadControlReply; there
-	  was not always a timeout handler on the control socket
-	  after the transfer completed.
-	- Fixed FTP filedescriptor leak from invalid PASV replies.
-	- Changed httpBuildRequestHeader so that it doesn't
-	  copy the Host header from the client request.  Instead
-	  we should generate our own Host header which is known
-	  to be correct.
-	- Changed storeTimestampsSet to adjust entry->timestamp
-	  if the response includes an Age header.
-	- Removed size limit from storeKeyHashBuckets.
-	- Changed fwdConnectStart from a "heavy" to a "light" event.
-	- Fixed an 'anonymize_headers' bug that affects unknown
-	  HTTP headers.  With the bug, if you list a header that
-	  Squid doesn't know about (such as "Charset"), it would
-	  add HDR_OTHER to the allow/deny mask.  This caused all
-	  unknown headers to be allowed or denied (depending on
-	  the scheme you use).  Now, with the bug fixed, an unknown
-	  header in the 'anonymize_headers' list is simply ignored.
-
 Changes to Squid-2.3.DEVEL3 ():
 
-	- Added MSNT auth module from Antonino Iannella.
 	- Added --enable-underscores configure option.  This allows
 	  Squid to accept hostnames with underscores in them.  Your
 	  DNS resolver may still complain about them, however.
@@ -278,7 +185,6 @@
 	- Added 'peer_connect_timeout' squid.conf option.
 	- Added 'redirector_bypass' squid.conf option.
 	- Added RFC 2518 (WEBDAV) request methods.
-	
 
 Changes to Squid-2.2 (April 19, 1999):
 
Index: squid/acconfig.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/Attic/acconfig.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/acconfig.h	20 Apr 2000 18:21:58 -0000	1.1.1.5
+++ squid/acconfig.h	20 Apr 2000 21:57:33 -0000	1.1.1.6
@@ -20,7 +20,7 @@
  *
  */
 @ TOP @
-/* $Id: acconfig.h,v 1.1.1.5 2000/04/20 18:21:58 hno Exp $ */
+/* $Id: acconfig.h,v 1.1.1.6 2000/04/20 21:57:33 hno Exp $ */
 
 /*********************************
  * START OF CONFIGURABLE OPTIONS *
@@ -261,3 +261,13 @@
  * Use the heap-based replacement techniques
  */
 #undef HEAP_REPLACEMENT
+
+/*
+ * Use DISKD
+ */
+#undef USE_DISKD
+
+/*
+ * message type for message queues
+ */
+#undef mtyp_t
Index: squid/configure
===================================================================
RCS file: /cvsroot/squid-sf//squid/Attic/configure,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/configure	20 Apr 2000 18:21:58 -0000	1.1.1.5
+++ squid/configure	20 Apr 2000 21:57:33 -0000	1.1.1.6
@@ -112,6 +112,9 @@
                           replacement algorithms, instead of the standard
                           LRU algorithm.
                           "
+ac_help="$ac_help
+  --enable-diskd          Uses shared memory, message queues, and external
+                          processes for disk I/O."
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -620,7 +623,7 @@
 
 
 
-# From configure.in Revision: 1.176.2.14 
+# From configure.in Revision: 1.181 
 ac_aux_dir=
 for ac_dir in cfgaux $srcdir/cfgaux; do
   if test -f $ac_dir/install-sh; then
@@ -648,7 +651,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:652: checking host system type" >&5
+echo "configure:655: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -716,7 +719,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:720: checking for $ac_word" >&5
+echo "configure:723: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -745,7 +748,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:749: checking for $ac_word" >&5
+echo "configure:752: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -793,7 +796,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:800: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -803,11 +806,11 @@
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 807 "configure"
+#line 810 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -827,12 +830,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:831: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:834: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:836: checking whether we are using GNU C" >&5
+echo "configure:839: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -841,7 +844,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -856,7 +859,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:860: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:863: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -907,9 +910,9 @@
         esac
     else
 	case "$host" in
-	*mips-sgi-irix6.*)
+	*mips-sgi-irix6.4*)
 	    # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
-	    CFLAGS="$CFLAGS -n32 -mips3 -O3 -OPT:Olimit=0:space=OFF \
+	    CFLAGS="$CFLAGS -n32 -mips4 -O3 -OPT:Olimit=0:space=OFF \
 		-woff 1009,1014,1048,1110,1116,1185,1188,1204,1230,1233 \
 		-Wl,-woff,85,-woff,84,-woff,134 \
 		-nostdinc -I/usr/include -D_BSD_SIGNALS"
@@ -934,9 +937,9 @@
         esac
     else
 	case "$host" in
-	*mips-sgi-irix6.*)
+	*mips-sgi-irix6.4*)
 	    # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
-	    LDFLAGS="-n32 -mips3 -nostdlib -L/usr/lib32"
+	    LDFLAGS="-n32 -mips4 -nostdlib -L/usr/lib32"
 	    ;;
 	esac
     fi
@@ -1514,6 +1517,24 @@
 fi
 
 
+# Check whether --enable-diskd or --disable-diskd was given.
+if test "${enable_diskd+set}" = set; then
+  enableval="$enable_diskd"
+   if test "$enableval" = "yes" ; then
+    echo "DISKD enabled"
+    cat >> confdefs.h <<\EOF
+#define USE_DISKD 1
+EOF
+
+    OPT_DISKD_EXE='$(DISKD_EXE)'
+    
+    DISKD_OBJS='diskd.o'
+    
+  fi
+
+fi
+
+
 # Force some compilers to use ANSI features
 #
 case "$host" in
@@ -1534,7 +1555,7 @@
 esac
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1538: checking how to run the C preprocessor" >&5
+echo "configure:1559: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1549,13 +1570,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1553 "configure"
+#line 1574 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1566,13 +1587,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1570 "configure"
+#line 1591 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1605,7 +1626,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1609: checking for a BSD compatible install" >&5
+echo "configure:1630: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1657,7 +1678,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1661: checking for $ac_word" >&5
+echo "configure:1682: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1684,7 +1705,7 @@
 fi
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1688: checking whether ln -s works" >&5
+echo "configure:1709: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1707,7 +1728,7 @@
 # Extract the first word of "sh", so it can be a program name with args.
 set dummy sh; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1711: checking for $ac_word" >&5
+echo "configure:1732: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1739,7 +1760,7 @@
 # Extract the first word of "false", so it can be a program name with args.
 set dummy false; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1743: checking for $ac_word" >&5
+echo "configure:1764: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_FALSE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1771,7 +1792,7 @@
 # Extract the first word of "true", so it can be a program name with args.
 set dummy true; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1775: checking for $ac_word" >&5
+echo "configure:1796: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_TRUE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1803,7 +1824,7 @@
 # Extract the first word of "rm", so it can be a program name with args.
 set dummy rm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1807: checking for $ac_word" >&5
+echo "configure:1828: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1835,7 +1856,7 @@
 # Extract the first word of "mv", so it can be a program name with args.
 set dummy mv; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1839: checking for $ac_word" >&5
+echo "configure:1860: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1867,7 +1888,7 @@
 # Extract the first word of "mkdir", so it can be a program name with args.
 set dummy mkdir; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1871: checking for $ac_word" >&5
+echo "configure:1892: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1899,7 +1920,7 @@
 # Extract the first word of "ln", so it can be a program name with args.
 set dummy ln; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1903: checking for $ac_word" >&5
+echo "configure:1924: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1931,7 +1952,7 @@
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1935: checking for $ac_word" >&5
+echo "configure:1956: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1963,7 +1984,7 @@
 # Extract the first word of "makedepend", so it can be a program name with args.
 set dummy makedepend; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1967: checking for $ac_word" >&5
+echo "configure:1988: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MAKEDEPEND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1995,7 +2016,7 @@
 # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1999: checking for $ac_word" >&5
+echo "configure:2020: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2045,12 +2066,12 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:2049: checking for $ac_hdr that defines DIR" >&5
+echo "configure:2070: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2054 "configure"
+#line 2075 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -2058,7 +2079,7 @@
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -2083,7 +2104,7 @@
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2087: checking for opendir in -ldir" >&5
+echo "configure:2108: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2091,7 +2112,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2095 "configure"
+#line 2116 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2102,7 +2123,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2124,7 +2145,7 @@
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2128: checking for opendir in -lx" >&5
+echo "configure:2149: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2132,7 +2153,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2136 "configure"
+#line 2157 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2143,7 +2164,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2166,12 +2187,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2170: checking for ANSI C header files" >&5
+echo "configure:2191: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2175 "configure"
+#line 2196 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2179,7 +2200,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2196,7 +2217,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2200 "configure"
+#line 2221 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2214,7 +2235,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2218 "configure"
+#line 2239 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2235,7 +2256,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2239 "configure"
+#line 2260 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2246,7 +2267,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -2294,7 +2315,6 @@
 	mount.h \
 	net/if.h \
 	netdb.h \
-	netinet/if_ether.h \
 	netinet/in.h \
 	netinet/tcp.h \
 	netinet/ip_compat.h \
@@ -2314,6 +2334,7 @@
 	strings.h \
 	sys/file.h \
 	sys/ioctl.h \
+	sys/msg.h \
 	sys/param.h \
 	sys/resource.h \
 	sys/select.h\
@@ -2334,17 +2355,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2338: checking for $ac_hdr" >&5
+echo "configure:2359: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2343 "configure"
+#line 2364 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2372,12 +2393,12 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2376: checking for working const" >&5
+echo "configure:2397: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2381 "configure"
+#line 2402 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2426,7 +2447,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2447,14 +2468,14 @@
 fi
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2451: checking whether byte ordering is bigendian" >&5
+echo "configure:2472: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 2458 "configure"
+#line 2479 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2465,11 +2486,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 2473 "configure"
+#line 2494 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2480,7 +2501,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -2500,7 +2521,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 2504 "configure"
+#line 2525 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -2513,7 +2534,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -2538,20 +2559,20 @@
 
 
 echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6
-echo "configure:2542: checking if ANSI prototypes work" >&5
+echo "configure:2563: checking if ANSI prototypes work" >&5
 if eval "test \"`echo '$''{'ac_cv_have_ansi_prototypes'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   cat > conftest.$ac_ext <<EOF
-#line 2548 "configure"
+#line 2569 "configure"
 #include "confdefs.h"
 int foo(char *); int foo (char *bar) {return 1;}
 int main() {
 foo("bar")
 ; return 0; }
 EOF
-if { (eval echo configure:2555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_ansi_prototypes="yes"
 else
@@ -2573,13 +2594,13 @@
 fi
 
 echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6
-echo "configure:2577: checking for tm->tm_gmtoff" >&5
+echo "configure:2598: checking for tm->tm_gmtoff" >&5
 if eval "test \"`echo '$''{'ac_cv_have_tm_gmoff'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   cat > conftest.$ac_ext <<EOF
-#line 2583 "configure"
+#line 2604 "configure"
 #include "confdefs.h"
 #include <time.h>
 #include <sys/time.h>
@@ -2588,7 +2609,7 @@
       foo.tm_gmtoff = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_tm_gmoff="yes"
 else
@@ -2610,13 +2631,13 @@
 fi
 
 echo $ac_n "checking for struct mallinfo""... $ac_c" 1>&6
-echo "configure:2614: checking for struct mallinfo" >&5
+echo "configure:2635: checking for struct mallinfo" >&5
 if eval "test \"`echo '$''{'ac_cv_have_struct_mallinfo'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   cat > conftest.$ac_ext <<EOF
-#line 2620 "configure"
+#line 2641 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if HAVE_MALLOC_H
@@ -2634,7 +2655,7 @@
     foo.keepcost = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_struct_mallinfo="yes"
 else
@@ -2656,13 +2677,13 @@
 fi
 
 echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6
-echo "configure:2660: checking for extended mallinfo" >&5
+echo "configure:2681: checking for extended mallinfo" >&5
 if eval "test \"`echo '$''{'ac_cv_have_ext_mallinfo'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   cat > conftest.$ac_ext <<EOF
-#line 2666 "configure"
+#line 2687 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <malloc.h>
@@ -2671,7 +2692,7 @@
       foo.mxfast = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_ext_mallinfo="yes"
 else
@@ -2693,13 +2714,13 @@
 fi
 
 echo $ac_n "checking for struct rusage""... $ac_c" 1>&6
-echo "configure:2697: checking for struct rusage" >&5
+echo "configure:2718: checking for struct rusage" >&5
 if eval "test \"`echo '$''{'ac_cv_have_struct_rusage'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   cat > conftest.$ac_ext <<EOF
-#line 2703 "configure"
+#line 2724 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_TIME_H
@@ -2712,7 +2733,7 @@
 struct rusage R;
 ; return 0; }
 EOF
-if { (eval echo configure:2716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_struct_rusage="yes"
 else
@@ -2734,13 +2755,13 @@
 fi
 
 echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6
-echo "configure:2738: checking for ip->ip_hl" >&5
+echo "configure:2759: checking for ip->ip_hl" >&5
 if eval "test \"`echo '$''{'ac_cv_have_ip_hl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   cat > conftest.$ac_ext <<EOF
-#line 2744 "configure"
+#line 2765 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <netinet/in.h>
@@ -2757,7 +2778,7 @@
       ip.ip_hl= 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_ip_hl="yes"
 else
@@ -2779,7 +2800,7 @@
 fi
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2783: checking size of int" >&5
+echo "configure:2804: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2787,7 +2808,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 2791 "configure"
+#line 2812 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2798,7 +2819,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:2802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -2818,7 +2839,7 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2822: checking size of long" >&5
+echo "configure:2843: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2826,7 +2847,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 2830 "configure"
+#line 2851 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2837,7 +2858,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:2841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -2857,7 +2878,7 @@
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:2861: checking size of void *" >&5
+echo "configure:2882: checking size of void *" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2865,7 +2886,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 2869 "configure"
+#line 2890 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2876,7 +2897,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_void_p=`cat conftestval`
 else
@@ -2899,19 +2920,19 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2903: checking for working alloca.h" >&5
+echo "configure:2924: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2908 "configure"
+#line 2929 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -2932,12 +2953,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2936: checking for alloca" >&5
+echo "configure:2957: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2941 "configure"
+#line 2962 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -2960,7 +2981,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -2992,12 +3013,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2996: checking whether alloca needs Cray hooks" >&5
+echo "configure:3017: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3001 "configure"
+#line 3022 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -3022,12 +3043,12 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3026: checking for $ac_func" >&5
+echo "configure:3047: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3031 "configure"
+#line 3052 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3050,7 +3071,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3077,7 +3098,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3081: checking stack direction for C alloca" >&5
+echo "configure:3102: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3085,7 +3106,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 3089 "configure"
+#line 3110 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -3104,7 +3125,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:3108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -3127,12 +3148,12 @@
 
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3131: checking for pid_t" >&5
+echo "configure:3152: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3136 "configure"
+#line 3157 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3160,12 +3181,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3164: checking for size_t" >&5
+echo "configure:3185: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3169 "configure"
+#line 3190 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3193,12 +3214,12 @@
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3197: checking for ssize_t" >&5
+echo "configure:3218: checking for ssize_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3202 "configure"
+#line 3223 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3226,12 +3247,12 @@
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3230: checking for off_t" >&5
+echo "configure:3251: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3235 "configure"
+#line 3256 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3259,12 +3280,12 @@
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3263: checking for mode_t" >&5
+echo "configure:3284: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3268 "configure"
+#line 3289 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3292,12 +3313,12 @@
 fi
 
 echo $ac_n "checking for fd_mask""... $ac_c" 1>&6
-echo "configure:3296: checking for fd_mask" >&5
+echo "configure:3317: checking for fd_mask" >&5
 if eval "test \"`echo '$''{'ac_cv_type_fd_mask'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3301 "configure"
+#line 3322 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3324,15 +3345,48 @@
 
 fi
 
+echo $ac_n "checking for mtyp_t""... $ac_c" 1>&6
+echo "configure:3350: checking for mtyp_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_mtyp_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3355 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "mtyp_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_mtyp_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_mtyp_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_mtyp_t" 1>&6
+if test $ac_cv_type_mtyp_t = no; then
+  cat >> confdefs.h <<\EOF
+#define mtyp_t long
+EOF
+
+fi
+
 
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:3330: checking for socklen_t" >&5
+echo "configure:3384: checking for socklen_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
   cat > conftest.$ac_ext <<EOF
-#line 3336 "configure"
+#line 3390 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -3363,7 +3417,7 @@
 fi
 
 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:3367: checking for main in -lnsl" >&5
+echo "configure:3421: checking for main in -lnsl" >&5
 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3371,14 +3425,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3375 "configure"
+#line 3429 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3406,7 +3460,7 @@
 fi
 
 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:3410: checking for main in -lsocket" >&5
+echo "configure:3464: checking for main in -lsocket" >&5
 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3414,14 +3468,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3418 "configure"
+#line 3472 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3453,7 +3507,7 @@
   echo "skipping libmalloc check (--enable-dlmalloc specified)"
 else
   echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6
-echo "configure:3457: checking for main in -lgnumalloc" >&5
+echo "configure:3511: checking for main in -lgnumalloc" >&5
 ac_lib_var=`echo gnumalloc'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3461,14 +3515,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lgnumalloc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3465 "configure"
+#line 3519 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3511,7 +3565,7 @@
 			*)
   
 				echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6
-echo "configure:3515: checking for main in -lmalloc" >&5
+echo "configure:3569: checking for main in -lmalloc" >&5
 ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3519,14 +3573,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lmalloc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3523 "configure"
+#line 3577 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3559,7 +3613,7 @@
 fi
 
 echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
-echo "configure:3563: checking for main in -lbsd" >&5
+echo "configure:3617: checking for main in -lbsd" >&5
 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3567,14 +3621,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3571 "configure"
+#line 3625 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3602,7 +3656,7 @@
 fi
 
 echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6
-echo "configure:3606: checking for main in -lregex" >&5
+echo "configure:3660: checking for main in -lregex" >&5
 ac_lib_var=`echo regex'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3610,14 +3664,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lregex  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3614 "configure"
+#line 3668 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3638,7 +3692,7 @@
 fi
 
 echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
-echo "configure:3642: checking for gethostbyname in -lbind" >&5
+echo "configure:3696: checking for gethostbyname in -lbind" >&5
 ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3646,7 +3700,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3650 "configure"
+#line 3704 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3657,7 +3711,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3691,7 +3745,7 @@
 		;;
 	*)
 		echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:3695: checking for inet_aton in -lresolv" >&5
+echo "configure:3749: checking for inet_aton in -lresolv" >&5
 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3699,7 +3753,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3703 "configure"
+#line 3757 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3710,7 +3764,7 @@
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3726,7 +3780,7 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6
-echo "configure:3730: checking for inet_aton in -l44bsd" >&5
+echo "configure:3784: checking for inet_aton in -l44bsd" >&5
 ac_lib_var=`echo 44bsd'_'inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3734,7 +3788,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-l44bsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3738 "configure"
+#line 3792 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3745,7 +3799,7 @@
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3777,7 +3831,7 @@
 fi
 
 		echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
-echo "configure:3781: checking for main in -lresolv" >&5
+echo "configure:3835: checking for main in -lresolv" >&5
 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3785,14 +3839,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3789 "configure"
+#line 3843 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3823,7 +3877,7 @@
     esac
 fi
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:3827: checking for main in -lm" >&5
+echo "configure:3881: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3831,14 +3885,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3835 "configure"
+#line 3889 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3867,7 +3921,7 @@
 
 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:3871: checking for crypt in -lcrypt" >&5
+echo "configure:3925: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3875,7 +3929,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3879 "configure"
+#line 3933 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3886,7 +3940,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3919,7 +3973,7 @@
 
 
 echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
-echo "configure:3923: checking for main in -lpthread" >&5
+echo "configure:3977: checking for main in -lpthread" >&5
 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3927,14 +3981,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3931 "configure"
+#line 3985 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3969,7 +4023,7 @@
 case "$host" in
 	*-pc-sco3.2*)
 		echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:3973: checking for strftime in -lintl" >&5
+echo "configure:4027: checking for strftime in -lintl" >&5
 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3977,7 +4031,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3981 "configure"
+#line 4035 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3988,7 +4042,7 @@
 strftime()
 ; return 0; }
 EOF
-if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4030,7 +4084,6 @@
         	LIBS=`echo $LIBS | sed -e s/-lsocket//`
         	echo "Removing -lnsl for IRIX..."
         	LIBS=`echo $LIBS | sed -e s/-lnsl//`
-		ac_cv_lib_nsl_main=no
 		echo "Removing -lbsd for IRIX..."
 		LIBS=`echo $LIBS | sed -e s/-lbsd//`
 		;;
@@ -4136,7 +4189,6 @@
 	res_init \
 	rint \
 	seteuid \
-	setgroups \
 	setpgrp \
 	setrlimit \
 	getrlimit \
@@ -4152,12 +4204,12 @@
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4156: checking for $ac_func" >&5
+echo "configure:4208: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4161 "configure"
+#line 4213 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4180,7 +4232,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4213,12 +4265,12 @@
 	
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4217: checking for $ac_func" >&5
+echo "configure:4269: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4222 "configure"
+#line 4274 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4241,7 +4293,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4268,7 +4320,7 @@
 fi
 
 echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6
-echo "configure:4272: checking if setresuid is implemented" >&5
+echo "configure:4324: checking if setresuid is implemented" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setresuid'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4276,7 +4328,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 4280 "configure"
+#line 4332 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4289,7 +4341,7 @@
   }
   
 EOF
-if { (eval echo configure:4293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_setresuid="yes"
 else
@@ -4314,7 +4366,7 @@
 
 if test "$IPF_TRANSPARENT" ; then
     echo $ac_n "checking if IP-Filter header files are installed""... $ac_c" 1>&6
-echo "configure:4318: checking if IP-Filter header files are installed" >&5
+echo "configure:4370: checking if IP-Filter header files are installed" >&5
     if test "$ac_cv_header_ip_compat_h" = "yes" &&
        test "$ac_cv_header_ip_fil_h" = "yes" &&
        test "$ac_cv_header_ip_nat_h" = "yes" ; then
@@ -4357,13 +4409,13 @@
     esac
 fi
 echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6
-echo "configure:4361: checking if GNUregex needs to be compiled" >&5
+echo "configure:4413: checking if GNUregex needs to be compiled" >&5
 if test -z "$USE_GNUREGEX"; then
 if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
 	USE_GNUREGEX="yes"
 else
 	cat > conftest.$ac_ext <<EOF
-#line 4367 "configure"
+#line 4419 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <regex.h>
@@ -4371,7 +4423,7 @@
 regex_t t; regcomp(&t,"",0);
 ; return 0; }
 EOF
-if { (eval echo configure:4375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   USE_GNUREGEX="no"
 else
@@ -4402,12 +4454,12 @@
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4406: checking for $ac_func" >&5
+echo "configure:4458: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4411 "configure"
+#line 4463 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4430,7 +4482,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -4458,12 +4510,12 @@
 
 
 echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6
-echo "configure:4462: checking Default FD_SETSIZE value" >&5
+echo "configure:4514: checking Default FD_SETSIZE value" >&5
 if test "$cross_compiling" = yes; then
   DEFAULT_FD_SETSIZE=256
 else
   cat > conftest.$ac_ext <<EOF
-#line 4467 "configure"
+#line 4519 "configure"
 #include "confdefs.h"
 
 #if HAVE_STDIO_H
@@ -4488,7 +4540,7 @@
 }
 
 EOF
-if { (eval echo configure:4492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   DEFAULT_FD_SETSIZE=`cat conftestval`
 else
@@ -4507,7 +4559,7 @@
 
 
 echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6
-echo "configure:4511: checking Maximum number of filedescriptors we can open" >&5
+echo "configure:4563: checking Maximum number of filedescriptors we can open" >&5
 TLDFLAGS="$LDFLAGS"
 case $host in
 i386-unknown-freebsd*)
@@ -4519,7 +4571,7 @@
   SQUID_MAXFD=256
 else
   cat > conftest.$ac_ext <<EOF
-#line 4523 "configure"
+#line 4575 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4576,7 +4628,7 @@
 }
 
 EOF
-if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_MAXFD=`cat conftestval`
 else
@@ -4603,12 +4655,12 @@
 LDFLAGS="$TLDFLAGS"
 
 echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6
-echo "configure:4607: checking Default UDP send buffer size" >&5
+echo "configure:4659: checking Default UDP send buffer size" >&5
 if test "$cross_compiling" = yes; then
   SQUID_UDP_SO_SNDBUF=16384
 else
   cat > conftest.$ac_ext <<EOF
-#line 4612 "configure"
+#line 4664 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4629,7 +4681,7 @@
 }
 
 EOF
-if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_UDP_SO_SNDBUF=`cat conftestval`
 else
@@ -4648,12 +4700,12 @@
 
 
 echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6
-echo "configure:4652: checking Default UDP receive buffer size" >&5
+echo "configure:4704: checking Default UDP receive buffer size" >&5
 if test "$cross_compiling" = yes; then
   SQUID_UDP_SO_RCVBUF=16384
 else
   cat > conftest.$ac_ext <<EOF
-#line 4657 "configure"
+#line 4709 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4674,7 +4726,7 @@
 }
 
 EOF
-if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_UDP_SO_RCVBUF=`cat conftestval`
 else
@@ -4693,12 +4745,12 @@
 
 
 echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6
-echo "configure:4697: checking Default TCP send buffer size" >&5
+echo "configure:4749: checking Default TCP send buffer size" >&5
 if test "$cross_compiling" = yes; then
   SQUID_TCP_SO_SNDBUF=16384
 else
   cat > conftest.$ac_ext <<EOF
-#line 4702 "configure"
+#line 4754 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4719,7 +4771,7 @@
 }
 
 EOF
-if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_TCP_SO_SNDBUF=`cat conftestval`
 else
@@ -4738,12 +4790,12 @@
 
 
 echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6
-echo "configure:4742: checking Default TCP receive buffer size" >&5
+echo "configure:4794: checking Default TCP receive buffer size" >&5
 if test "$cross_compiling" = yes; then
   SQUID_TCP_SO_RCVBUF=16384
 else
   cat > conftest.$ac_ext <<EOF
-#line 4747 "configure"
+#line 4799 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4764,7 +4816,7 @@
 }
 
 EOF
-if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   SQUID_TCP_SO_RCVBUF=`cat conftestval`
 else
@@ -4783,19 +4835,19 @@
 
 
 echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
-echo "configure:4787: checking if sys_errlist is already defined" >&5
+echo "configure:4839: checking if sys_errlist is already defined" >&5
 if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4792 "configure"
+#line 4844 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 char *s = sys_errlist;
 ; return 0; }
 EOF
-if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_needs_sys_errlist="no"
 else
@@ -4817,16 +4869,16 @@
 fi
 
 echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6
-echo "configure:4821: checking for libresolv _dns_ttl_ hack" >&5
+echo "configure:4873: checking for libresolv _dns_ttl_ hack" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4823 "configure"
+#line 4875 "configure"
 #include "confdefs.h"
 extern int _dns_ttl_;
 int main() {
 return _dns_ttl_;
 ; return 0; }
 EOF
-if { (eval echo configure:4830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 cat >> confdefs.h <<\EOF
@@ -4842,12 +4894,12 @@
 rm -f conftest*
 
 echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6
-echo "configure:4846: checking if inet_ntoa() actually works" >&5
+echo "configure:4898: checking if inet_ntoa() actually works" >&5
 if test "$cross_compiling" = yes; then
   INET_NTOA_RESULT="broken"
 else
   cat > conftest.$ac_ext <<EOF
-#line 4851 "configure"
+#line 4903 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4866,7 +4918,7 @@
 }
 
 EOF
-if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   INET_NTOA_RESULT=`cat conftestval`
 else
@@ -4892,9 +4944,9 @@
 
 if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then
 echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6
-echo "configure:4896: checking for working statvfs() interface" >&5
+echo "configure:4948: checking for working statvfs() interface" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4898 "configure"
+#line 4950 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -4911,7 +4963,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_func_statvfs=yes
 else
@@ -4931,12 +4983,12 @@
 fi
 
 echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6
-echo "configure:4935: checking for _res.nsaddr_list" >&5
+echo "configure:4987: checking for _res.nsaddr_list" >&5
 if eval "test \"`echo '$''{'ac_cv_have_res_nsaddr_list'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4940 "configure"
+#line 4992 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_TYPES_H
@@ -4959,7 +5011,7 @@
 _res.nsaddr_list[0];
 ; return 0; }
 EOF
-if { (eval echo configure:4963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_res_nsaddr_list="yes"
 else
@@ -4981,12 +5033,12 @@
 
 if test $ac_cv_have_res_nsaddr_list = "no" ; then
 echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6
-echo "configure:4985: checking for _res.ns_list" >&5
+echo "configure:5037: checking for _res.ns_list" >&5
 if eval "test \"`echo '$''{'ac_cv_have_res_ns_list'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4990 "configure"
+#line 5042 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_TYPES_H
@@ -5009,7 +5061,7 @@
 _res.ns_list[0].addr;
 ; return 0; }
 EOF
-if { (eval echo configure:5013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_have_res_ns_list="yes"
 else
@@ -5223,6 +5275,8 @@
 s%@HTCP_OBJS@%$HTCP_OBJS%g
 s%@ERR_LANGUAGE@%$ERR_LANGUAGE%g
 s%@LEAKFINDER_OBJS@%$LEAKFINDER_OBJS%g
+s%@OPT_DISKD_EXE@%$OPT_DISKD_EXE%g
+s%@DISKD_OBJS@%$DISKD_OBJS%g
 s%@CPP@%$CPP%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
Index: squid/configure.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/configure.in,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/configure.in	20 Apr 2000 18:21:58 -0000	1.1.1.5
+++ squid/configure.in	20 Apr 2000 21:57:33 -0000	1.1.1.6
@@ -3,13 +3,13 @@
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.1.1.5 2000/04/20 18:21:58 hno Exp $
+dnl  $Id: configure.in,v 1.1.1.6 2000/04/20 21:57:33 hno Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.1.1.5 $)dnl
+AC_REVISION($Revision: 1.1.1.6 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(cfgaux)
 
@@ -88,9 +88,9 @@
         esac
     else
 	case "$host" in
-	*mips-sgi-irix6.*)
+	*mips-sgi-irix6.4*)
 	    # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
-	    CFLAGS="$CFLAGS -n32 -mips3 -O3 -OPT:Olimit=0:space=OFF \
+	    CFLAGS="$CFLAGS -n32 -mips4 -O3 -OPT:Olimit=0:space=OFF \
 		-woff 1009,1014,1048,1110,1116,1185,1188,1204,1230,1233 \
 		-Wl,-woff,85,-woff,84,-woff,134 \
 		-nostdinc -I/usr/include -D_BSD_SIGNALS"
@@ -116,9 +116,9 @@
         esac
     else
 	case "$host" in
-	*mips-sgi-irix6.*)
+	*mips-sgi-irix6.4*)
 	    # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
-	    LDFLAGS="-n32 -mips3 -nostdlib -L/usr/lib32"
+	    LDFLAGS="-n32 -mips4 -nostdlib -L/usr/lib32"
 	    ;;
 	esac
     fi
@@ -554,6 +554,20 @@
   fi
 ])
 
+dnl Enable "diskd" code
+AC_ARG_ENABLE(diskd,
+[  --enable-diskd          Uses shared memory, message queues, and external
+                          processes for disk I/O.],
+[ if test "$enableval" = "yes" ; then
+    echo "DISKD enabled"
+    AC_DEFINE(USE_DISKD, 1)
+    OPT_DISKD_EXE='$(DISKD_EXE)'
+    AC_SUBST(OPT_DISKD_EXE)
+    DISKD_OBJS='diskd.o'
+    AC_SUBST(DISKD_OBJS)
+  fi
+])
+
 # Force some compilers to use ANSI features
 #
 case "$host" in
@@ -633,7 +647,6 @@
 	mount.h \
 	net/if.h \
 	netdb.h \
-	netinet/if_ether.h \
 	netinet/in.h \
 	netinet/tcp.h \
 	netinet/ip_compat.h \
@@ -653,6 +666,7 @@
 	strings.h \
 	sys/file.h \
 	sys/ioctl.h \
+	sys/msg.h \
 	sys/param.h \
 	sys/resource.h \
 	sys/select.h\
@@ -779,6 +793,7 @@
 AC_CHECK_TYPE(off_t, int)
 AC_CHECK_TYPE(mode_t, u_short)
 AC_CHECK_TYPE(fd_mask, int)
+AC_CHECK_TYPE(mtyp_t, long)
 
 dnl Check for type in sys/socket.h
 AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t, [
@@ -879,7 +894,6 @@
         	LIBS=`echo $LIBS | sed -e s/-lsocket//`
         	echo "Removing -lnsl for IRIX..."
         	LIBS=`echo $LIBS | sed -e s/-lnsl//`
-		ac_cv_lib_nsl_main=no
 		echo "Removing -lbsd for IRIX..."
 		LIBS=`echo $LIBS | sed -e s/-lbsd//`
 		;;
@@ -985,7 +999,6 @@
 	res_init \
 	rint \
 	seteuid \
-	setgroups \
 	setpgrp \
 	setrlimit \
 	getrlimit \
Index: squid/makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/Attic/makefile.in,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/makefile.in	20 Apr 2000 18:21:58 -0000	1.1.1.5
+++ squid/makefile.in	20 Apr 2000 21:57:33 -0000	1.1.1.6
@@ -1,4 +1,4 @@
-# $Id: makefile.in,v 1.1.1.5 2000/04/20 18:21:58 hno Exp $
+# $Id: makefile.in,v 1.1.1.6 2000/04/20 21:57:33 hno Exp $
 #
 
 srcdir		= @srcdir@
@@ -16,7 +16,7 @@
 
 SUBDIRS		= lib @makesnmplib@ scripts src icons errors 
 AUTHDIRS	= auth_modules/NCSA \
-		  auth_modules/getpwnam \
+		= auth_modules/getpwnam \
 		  auth_modules/PAM \
 		  auth_modules/SMB \
 		  auth_modules/LDAP
Index: squid/auth_modules/PAM/pam_auth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/PAM/Attic/pam_auth.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/auth_modules/PAM/pam_auth.c	20 Apr 2000 18:21:58 -0000	1.1.1.3
+++ squid/auth_modules/PAM/pam_auth.c	20 Apr 2000 21:57:33 -0000	1.1.1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: pam_auth.c,v 1.1.1.3 2000/04/20 18:21:58 hno Exp $
+ * $Id: pam_auth.c,v 1.1.1.4 2000/04/20 21:57:33 hno Exp $
  *
  * PAM authenticator module for Squid.
  * Copyright (C) 1999 Henrik Nordstrom <hno@hem.passagen.se>
Index: squid/doc/Programming-Guide/prog-guide.sgml
===================================================================
RCS file: /cvsroot/squid-sf//squid/doc/Programming-Guide/prog-guide.sgml,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/doc/Programming-Guide/prog-guide.sgml	20 Apr 2000 18:21:58 -0000	1.1.1.3
+++ squid/doc/Programming-Guide/prog-guide.sgml	20 Apr 2000 21:57:33 -0000	1.1.1.4
@@ -2,7 +2,6 @@
 <article>
 <title>Squid Programmers Guide</title>
 <author>Duane Wessels, Squid Developers
-<date>$Id: prog-guide.sgml,v 1.1.1.3 2000/04/20 18:21:58 hno Exp $</date>
 
 <abstract>
 Squid is a WWW Cache application developed by the National Laboratory
Index: squid/errors/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Attic/Makefile.in,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/errors/Makefile.in	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/errors/Makefile.in	20 Apr 2000 21:57:33 -0000	1.1.1.5
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+# $Id: Makefile.in,v 1.1.1.5 2000/04/20 21:57:33 hno Exp $
 #
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
Index: squid/errors/English/ERR_DNS_FAIL
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/English/ERR_DNS_FAIL,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/errors/English/ERR_DNS_FAIL	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/errors/English/ERR_DNS_FAIL	20 Apr 2000 21:57:33 -0000	1.1.1.4
@@ -12,6 +12,7 @@
 Unable to determine IP address from host name for
 <I>%H</I>
 </BLOCKQUOTE>
+</UL>
 
 <P>
 The dnsserver returned:
Index: squid/errors/English/ERR_FTP_PUT_CREATED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/English/ERR_FTP_PUT_CREATED,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/errors/English/ERR_FTP_PUT_CREATED	20 Apr 2000 18:21:59 -0000	1.1.1.2
+++ squid/errors/English/ERR_FTP_PUT_CREATED	20 Apr 2000 21:57:33 -0000	1.1.1.3
@@ -4,3 +4,6 @@
 <H1>Operation successful</H1>
 <H2>File created</H2>
 <HR>
+<P>
+</P>
+
Index: squid/errors/English/ERR_FTP_PUT_MODIFIED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/English/ERR_FTP_PUT_MODIFIED,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/errors/English/ERR_FTP_PUT_MODIFIED	20 Apr 2000 18:21:59 -0000	1.1.1.2
+++ squid/errors/English/ERR_FTP_PUT_MODIFIED	20 Apr 2000 21:57:33 -0000	1.1.1.3
@@ -4,3 +4,6 @@
 <H1>Operation successful</H1>
 <H2>File updated</H2>
 <HR>
+<P>
+</P>
+
Index: squid/errors/English/ERR_SHUTTING_DOWN
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/English/ERR_SHUTTING_DOWN,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/errors/English/ERR_SHUTTING_DOWN	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/errors/English/ERR_SHUTTING_DOWN	20 Apr 2000 21:57:33 -0000	1.1.1.4
@@ -9,6 +9,7 @@
 <A HREF="%U">%U</A>
 <P>
 The following error was encountered:
+<UL>
 <P>
 This cache is in the process of shutting down and can not
 service your request at this time.  Please retry your
Index: squid/errors/Hungarian/ERR_TOO_BIG
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Hungarian/ERR_TOO_BIG,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/errors/Hungarian/ERR_TOO_BIG	20 Apr 2000 18:21:59 -0000	1.1.1.2
+++ squid/errors/Hungarian/ERR_TOO_BIG	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,28 +1,26 @@
 <HTML><HEAD>
-<TITLE>HIBA: A kért URL nem tölthetõ le</TITLE>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2"></HEAD>
+<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
 </HEAD><BODY>
-<H1>HIBA</H1>
-<H2>A kért URL nem tölthetõ le</H2>
+<H1>ERROR</H1>
+<H2>The requested URL could not be retrieved</H2>
 <HR>
 <P>
-Az alábbi URL letöltésekor:
+While trying to retrieve the URL:
 <A HREF="%U">%U</A>
 <P>
-a következõ hiba lépett fel:
+The following error was encountered:
 <UL>
 <LI>
 <STRONG>
-A kérés vagy a válasz túl nagy méretû.
+The request or reply is too large.
 </STRONG>
 <P>
-POST vagy PUT kérés esetén a kérés törzse (az az anyag
-amit feltöltene) túl nagy méretû. Ha GET típusú
-kérésrõl van szó, akkor a válasz törzse (az az anyag amit éppen
-letöltene) túl nagy méretû. A cache-t mûködtetõ Internet 
-szolgáltató vezette be ezeket a korlátozásokat. Kérjük, forduljon
-közvetlenül szolgáltatójához amennyiben a szerver helytelen
-beállításában látja a hiba okát.
+If you are making a POST or PUT request, then your request body
+(the thing you are trying to upload) is too large.  If you are 
+making a GET request, then the reply body (what you are trying
+to download) is too large.   These limits have been established
+by the Internet Service Provider who operates this cache.  Please
+contact them directly if you feel this is an error.
 </UL>
 <P>
-A cache adminisztrátora: <A HREF="mailto:%w">%w</A>.
+Your cache administrator is <A HREF="mailto:%w">%w</A>.
Index: squid/include/autoconf.h.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/autoconf.h.in,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/include/autoconf.h.in	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/include/autoconf.h.in	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -280,6 +280,16 @@
  */
 #undef HEAP_REPLACEMENT
 
+/*
+ * Use DISKD
+ */
+#undef USE_DISKD
+
+/*
+ * message type for message queues
+ */
+#undef mtyp_t
+
 /* The number of bytes in a int.  */
 #undef SIZEOF_INT
 
@@ -379,9 +389,6 @@
 /* Define if you have the seteuid function.  */
 #undef HAVE_SETEUID
 
-/* Define if you have the setgroups function.  */
-#undef HAVE_SETGROUPS
-
 /* Define if you have the setpgrp function.  */
 #undef HAVE_SETPGRP
 
@@ -496,9 +503,6 @@
 /* Define if you have the <netdb.h> header file.  */
 #undef HAVE_NETDB_H
 
-/* Define if you have the <netinet/if_ether.h> header file.  */
-#undef HAVE_NETINET_IF_ETHER_H
-
 /* Define if you have the <netinet/in.h> header file.  */
 #undef HAVE_NETINET_IN_H
 
@@ -559,6 +563,9 @@
 /* Define if you have the <sys/ioctl.h> header file.  */
 #undef HAVE_SYS_IOCTL_H
 
+/* Define if you have the <sys/msg.h> header file.  */
+#undef HAVE_SYS_MSG_H
+
 /* Define if you have the <sys/ndir.h> header file.  */
 #undef HAVE_SYS_NDIR_H
 
Index: squid/include/config.h.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/config.h.in,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/include/config.h.in	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/include/config.h.in	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h.in,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: config.h.in,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
Index: squid/include/heap.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/heap.h,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/include/heap.h	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/include/heap.h	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: heap.h,v 1.1.1.3 2000/04/20 18:21:59 hno Exp $
+ * $Id: heap.h,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: John Dilley, Hewlett Packard
  *
Index: squid/include/splay.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/splay.h,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/include/splay.h	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/include/splay.h	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,5 +1,5 @@
 /*
- * $Id: splay.h,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+ * $Id: splay.h,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  */
 
 
Index: squid/include/util.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/util.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/include/util.h	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/include/util.h	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: util.h,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: Harvest Derived
  *
Index: squid/include/version.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/version.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/include/version.h	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/include/version.h	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,12 +1,12 @@
 /*
- * $Id: version.h,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: version.h,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  *  SQUID_VERSION - String for version id of this distribution
  */
 #ifndef SQUID_VERSION
-#define SQUID_VERSION	"2.3.STABLE2"
+#define SQUID_VERSION	"2.4.DEVEL2"
 #endif
 
 #ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 952037033
+#define SQUID_RELEASE_TIME 951848317
 #endif
Index: squid/lib/Array.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Array.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/lib/Array.c	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/lib/Array.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: Array.c,v 1.1.1.3 2000/04/20 18:21:59 hno Exp $
+ * $Id: Array.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Attic/Makefile.in,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/lib/Makefile.in	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/lib/Makefile.in	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,5 +1,5 @@
 #
-#  $Id: Makefile.in,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
 #
 prefix		= @prefix@
 top_srcdir	= @top_srcdir@
Index: squid/lib/Stack.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Stack.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/lib/Stack.c	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/lib/Stack.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: Stack.c,v 1.1.1.3 2000/04/20 18:21:59 hno Exp $
+ * $Id: Stack.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/getfullhostname.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/getfullhostname.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/lib/getfullhostname.c	20 Apr 2000 18:21:59 -0000	1.1.1.2
+++ squid/lib/getfullhostname.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: getfullhostname.c,v 1.1.1.2 2000/04/20 18:21:59 hno Exp $
+ * $Id: getfullhostname.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/hash.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/hash.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/lib/hash.c	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/lib/hash.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: hash.c,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+ * $Id: hash.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 0     Hash Tables
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/heap.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/heap.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/lib/heap.c	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/lib/heap.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: heap.c,v 1.1.1.3 2000/04/20 18:21:59 hno Exp $
+ * $Id: heap.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: John Dilley, Hewlett Packard
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/radix.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/radix.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/lib/radix.c	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/lib/radix.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: radix.c,v 1.1.1.3 2000/04/20 18:21:59 hno Exp $
+ * $Id: radix.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 53     Radix tree data structure implementation
  * AUTHOR: NetBSD Derived
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/rfc1035.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1035.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/lib/rfc1035.c	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/lib/rfc1035.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1035.c,v 1.1.1.3 2000/04/20 18:21:59 hno Exp $
+ * $Id: rfc1035.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * Low level DNS protocol routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -33,12 +33,6 @@
  *
  */
 
-/*
- * KNOWN BUGS:
- * 
- * UDP replies with TC set should be retried via TCP
- */
-
 #include "config.h"
 
 #if HAVE_STDIO_H
@@ -233,7 +227,7 @@
     h->qr = (t >> 15) & 0x01;
     h->opcode = (t >> 11) & 0x0F;
     h->aa = (t >> 10) & 0x01;
-    h->tc = (t >> 9) & 0x01;
+    h->tc = (t >> 8) & 0x01;
     h->rd = (t >> 8) & 0x01;
     h->ra = (t >> 7) & 0x01;
     h->rcode = t & 0x0F;
@@ -276,7 +270,7 @@
     do {
 	c = *(buf + off);
 	if (c > RFC1035_MAXLABELSZ) {
-	    /* fucking compression */
+	    /* blasted compression */
 	    unsigned short s;
 	    off_t ptr;
 	    memcpy(&s, buf + off, sizeof(s));
@@ -327,14 +321,6 @@
     RR->ttl = ntohl(i);
     memcpy(&s, buf + off, sizeof(s));
     off += sizeof(s);
-    if (off + ntohs(s) > sz) {
-	/*
-	 * We got a truncated packet.  'dnscache' truncates UDP
-	 * replies at 512 octets, as per RFC 1035.  Returning sz+1
-	 * should cause no further processing for this reply.
-	 */
-	return sz + 1;
-    }
     switch (RR->type) {
     case RFC1035_TYPE_PTR:
 	RR->rdata = malloc(RFC1035_MAXHOSTNAMESZ);
@@ -446,8 +432,7 @@
     recs = calloc(i, sizeof(*recs));
     while (i--) {
 	off = rfc1035RRUnpack(buf, sz, off, &recs[i]);
-	if (off > sz)		/* truncated packet */
-	    break;
+	assert(off <= sz);
 	nr++;
     }
     *records = recs;
Index: squid/lib/rfc1123.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1123.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/lib/rfc1123.c	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/lib/rfc1123.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1123.c,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+ * $Id: rfc1123.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/rfc1738.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1738.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/lib/rfc1738.c	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/lib/rfc1738.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,5 +1,5 @@
 /*
- * $Id: rfc1738.c,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+ * $Id: rfc1738.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/splay.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/splay.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/lib/splay.c	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/lib/splay.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,5 +1,5 @@
 /*
- * $Id: splay.c,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+ * $Id: splay.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  */
 
 #include "config.h"
Index: squid/lib/strerror.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/strerror.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/lib/strerror.c	20 Apr 2000 18:21:59 -0000	1.1.1.2
+++ squid/lib/strerror.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,5 +1,5 @@
 /*
- * $Id: strerror.c,v 1.1.1.2 2000/04/20 18:21:59 hno Exp $
+ * $Id: strerror.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Duane Wessels
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/lib/util.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/util.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/lib/util.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/lib/util.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: util.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: util.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -603,8 +603,9 @@
 {
     static char xstrerror_buf[BUFSIZ];
     if (errno < 0 || errno >= sys_nerr)
-	return ("Unknown");
-    snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", errno, strerror(errno));
+	snprintf(xstrerror_buf, BUFSIZ, "(%d) Unknown", errno);
+    else
+        snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", errno, strerror(errno));
     return xstrerror_buf;
 }
 
Index: squid/src/CacheDigest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/CacheDigest.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/CacheDigest.c	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/src/CacheDigest.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: CacheDigest.c,v 1.1.1.3 2000/04/20 18:21:59 hno Exp $
+ * $Id: CacheDigest.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 70    Cache Digest
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/ETag.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/ETag.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/ETag.c	20 Apr 2000 18:21:59 -0000	1.1.1.2
+++ squid/src/ETag.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ETag.c,v 1.1.1.2 2000/04/20 18:21:59 hno Exp $
+ * $Id: ETag.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpBody.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpBody.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/HttpBody.c	20 Apr 2000 18:21:59 -0000	1.1.1.2
+++ squid/src/HttpBody.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -2,7 +2,7 @@
 
 
 /*
- * $Id: HttpBody.c,v 1.1.1.2 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpBody.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 56    HTTP Message Body
  * AUTHOR: Alex Rousskov
@@ -14,10 +14,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpHdrCc.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrCc.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/HttpHdrCc.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/HttpHdrCc.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrCc.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpHdrCc.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 65    HTTP Cache Control Header
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpHdrContRange.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrContRange.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/HttpHdrContRange.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/HttpHdrContRange.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrContRange.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpHdrContRange.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 68    HTTP Content-Range Header
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpHdrExtField.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrExtField.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/HttpHdrExtField.c	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/src/HttpHdrExtField.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrExtField.c,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpHdrExtField.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 69    HTTP Header: Extension Field
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpHdrRange.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrRange.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/HttpHdrRange.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/HttpHdrRange.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrRange.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpHdrRange.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 64    HTTP Range Header
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpHeader.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHeader.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/HttpHeader.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/HttpHeader.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeader.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpHeader.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -84,7 +84,6 @@
     {"Content-MD5", HDR_CONTENT_MD5, ftStr},	/* for now */
     {"Content-Range", HDR_CONTENT_RANGE, ftPContRange},
     {"Content-Type", HDR_CONTENT_TYPE, ftStr},
-    {"Cookie", HDR_COOKIE, ftStr},
     {"Date", HDR_DATE, ftDate_1123},
     {"ETag", HDR_ETAG, ftETag},
     {"Expires", HDR_EXPIRES, ftDate_1123},
@@ -1095,12 +1094,3 @@
 	Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
     return httpHeaderIdByName(name, name_len, Headers, HDR_ENUM_END);
 }
-
-const char *
-httpHeaderNameById(int id)
-{
-    if (!Headers)
-	Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
-    assert(id >= 0 && id < HDR_ENUM_END);
-    return HeadersAttrs[id].name;
-}
Index: squid/src/HttpHeaderTools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHeaderTools.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/HttpHeaderTools.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/HttpHeaderTools.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeaderTools.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpHeaderTools.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 66    HTTP Header Tools
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpMsg.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpMsg.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/HttpMsg.c	20 Apr 2000 18:21:59 -0000	1.1.1.2
+++ squid/src/HttpMsg.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpMsg.c,v 1.1.1.2 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpMsg.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 74    HTTP Message
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpReply.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpReply.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/HttpReply.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/HttpReply.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpReply.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpRequest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpRequest.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/HttpRequest.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/HttpRequest.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpRequest.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/HttpStatusLine.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpStatusLine.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/HttpStatusLine.c	20 Apr 2000 18:21:59 -0000	1.1.1.4
+++ squid/src/HttpStatusLine.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpStatusLine.c,v 1.1.1.4 2000/04/20 18:21:59 hno Exp $
+ * $Id: HttpStatusLine.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 57    HTTP Status-line
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/Makefile.in,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/Makefile.in	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/Makefile.in	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -26,6 +26,8 @@
 UNLINKD_EXE	= unlinkd$(exec_suffix)
 PINGER_EXE	= pinger$(exec_suffix)
 CACHEMGR_EXE	= cachemgr$(cgi_suffix)
+DISKD_EXE	= diskd$(exec_suffix)
+OPT_DISKD_EXE	= @OPT_DISKD_EXE@
 
 DEFAULT_PREFIX		= $(prefix)
 DEFAULT_CONFIG_FILE     = $(sysconfdir)/squid.conf
@@ -64,18 +66,18 @@
 RM		= @RM@
 SHELL		= /bin/sh
 
-
 INCLUDE		= -I. -I../include -I$(top_srcdir)/include
 CFLAGS 		= $(AC_CFLAGS) $(INCLUDE) $(DEFINES)
 SQUID_LIBS	= -L../lib $(CRYPTLIB) $(REGEXLIB) @SQUID_PTHREAD_LIB@ \
 		  $(SNMPLIB) $(MALLOCLIB) -lmiscutil $(XTRA_LIBS)
 CLIENT_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
 DNSSERVER_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
+DISKD_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
 PINGER_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
 STD_APP_LIBS    = -L../lib -lmiscutil $(XTRA_LIBS)
 
 PROGS           = $(SQUID_EXE) $(CLIENT_EXE)
-UTILS           = $(DNSSERVER_EXE) $(UNLINKD_EXE)
+UTILS           = $(DNSSERVER_EXE) $(UNLINKD_EXE) $(OPT_DISKD_EXE)
 SUID_UTILS	= $(PINGER_EXE)
 CGIPROGS	= $(CACHEMGR_EXE)
 OBJS	 	= \
@@ -154,6 +156,7 @@
 		store.o \
 		store_io.o \
 		store_io_ufs.o \
+		@DISKD_OBJS@ \
 		store_client.o \
 		store_digest.o \
 		store_dir.o \
@@ -218,6 +221,12 @@
 $(DNSSERVER_EXE): dnsserver.o
 	$(CC) -o $@ $(LDFLAGS) dnsserver.o $(DNSSERVER_LIBS)
 
+$(DISKD_EXE): diskd-daemon.o
+	$(CC) -o $@ $(LDFLAGS) diskd-daemon.o $(DISKD_LIBS)
+
+diskd-daemon.o: diskd.c
+	$(CC) -c $(CFLAGS) -DDISKD_DAEMON=1 $(srcdir)/diskd.c -o $@
+
 $(CACHEMGR_EXE): cachemgr.o
 	$(CC) -o $@ $(LDFLAGS) cachemgr.o $(CLIENT_LIBS)
 
Index: squid/src/MemBuf.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/MemBuf.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/MemBuf.c	20 Apr 2000 18:21:59 -0000	1.1.1.3
+++ squid/src/MemBuf.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: MemBuf.c,v 1.1.1.3 2000/04/20 18:21:59 hno Exp $
+ * $Id: MemBuf.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 59    auto-growing Memory Buffer with printf
  * AUTHOR: Alex Rousskov
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/MemPool.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/MemPool.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/MemPool.c	20 Apr 2000 18:21:59 -0000	1.1.1.5
+++ squid/src/MemPool.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: MemPool.c,v 1.1.1.5 2000/04/20 18:21:59 hno Exp $
+ * $Id: MemPool.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 63    Low Level Memory Pool Management
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/Packer.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Packer.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/Packer.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/Packer.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: Packer.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: Packer.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 60    Packer: A uniform interface to store-like modules
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/StatHist.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/StatHist.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/StatHist.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/StatHist.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StatHist.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: StatHist.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 62    Generic Histogram
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/String.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/String.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/String.c	20 Apr 2000 18:22:00 -0000	1.1.1.2
+++ squid/src/String.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: String.c,v 1.1.1.2 2000/04/20 18:22:00 hno Exp $
+ * $Id: String.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 67    String
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/access_log.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/access_log.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/access_log.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/access_log.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: access_log.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: access_log.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 46    Access Log
  * AUTHOR: Duane Wessels
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -63,9 +63,6 @@
     "TCP_MEM_HIT",
     "TCP_DENIED",
     "TCP_OFFLINE_HIT",
-#if LOG_TCP_REDIRECTS
-    "TCP_REDIRECT",
-#endif
     "UDP_HIT",
     "UDP_MISS",
     "UDP_DENIED",
@@ -237,21 +234,8 @@
     xstrncpy(LogfileName, fname, SQUID_MAXPATHLEN);
     LogfileFD = file_open(LogfileName, O_WRONLY | O_CREAT);
     if (LogfileFD == DISK_ERROR) {
-	if (ENOENT == errno) {
-	    fatalf("%s cannot be created, since the\n"
-		"\tdirectory it is to reside in does not exist."
-		"\t(%s)\n", LogfileName, xstrerror());
-	} else if (EACCES == errno) {
-	    fatalf("cannot create %s:\n"
-		"\t%s.\n"
-		"\tThe directory access.log is to reside in needs to be\n"
-		"\twriteable by the user %s, the cache_effective_user\n"
-		"\tset in squid.conf.",
-		LogfileName, xstrerror(), Config.effectiveUser);
-	} else {
-	    debug(50, 0) ("%s: %s\n", LogfileName, xstrerror());
-	    fatalf("Cannot open %s: %s", LogfileName, xstrerror());
-	}
+	debug(50, 0) ("%s: %s\n", LogfileName, xstrerror());
+	fatalf("Cannot open %s: %s", LogfileName, xstrerror());
     }
     LogfileStatus = LOG_ENABLE;
 }
Index: squid/src/acl.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/acl.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/acl.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/acl.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: acl.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -11,11 +11,11 @@
  *  Squid is the result of efforts by numerous individuals from the
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
- *  National Science Foundation.  Squid is Copyrighted (C) 2000 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1372,7 +1372,7 @@
 	/* NOTREACHED */
     case ACL_MAXCONN:
 	k = clientdbEstablished(checklist->src_addr, 0);
-	return ((k > ((intlist *) ae->data)->i) ? 1 : 0);
+	return ((k > ((intlist *) ae->data)->i) ? 0 : 1);
 	/* NOTREACHED */
     case ACL_URL_PORT:
 	return aclMatchIntegerRange(ae->data, (int) r->port);
@@ -2264,9 +2264,7 @@
 #endif
 #include <net/route.h>
 #include <net/if.h>
-#if HAVE_NETINET_IF_ETHER_H
 #include <netinet/if_ether.h>
-#endif
 
 /*
  * Decode an ascii representation (asc) of an ethernet adress, and place
Index: squid/src/aiops.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/aiops.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/aiops.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/aiops.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: aiops.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: aiops.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 43    AIOPS
  * AUTHOR: Stewart Forster <slf@connect.com.au>
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -160,16 +160,8 @@
 
     pthread_attr_init(&globattr);
 #if HAVE_PTHREAD_ATTR_SETSCOPE
-#if defined(_SQUID_SGI_)
-    /* 
-     * Erik Hofman <erik.hofman@a1.nl> suggests PTHREAD_SCOPE_PROCESS
-     * instead of PTHREAD_SCOPE_SYSTEM, esp for IRIX.
-     */
-    pthread_attr_setscope(&globattr, PTHREAD_SCOPE_PROCESS);
-#else
     pthread_attr_setscope(&globattr, PTHREAD_SCOPE_SYSTEM);
 #endif
-#endif
     globsched.sched_priority = 1;
     main_thread = pthread_self();
 #if HAVE_PTHREAD_SETSCHEDPARAM
@@ -179,9 +171,6 @@
 #if HAVE_PTHREAD_ATTR_SETSCHEDPARAM
     pthread_attr_setschedparam(&globattr, &globsched);
 #endif
-#if defined(_SQUID_SGI_)
-    pthread_setconcurrency(NUMTHREADS + 1);
-#endif
 
     /* Create threads and get them to sit in their wait loop */
     threads = xcalloc(NUMTHREADS, sizeof(aio_thread_t));
Index: squid/src/asn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/asn.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/asn.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/asn.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: asn.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: asn.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/async_io.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/async_io.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/async_io.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/async_io.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: async_io.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: async_io.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 32    Asynchronous Disk I/O
  * AUTHOR: Pete Bentley <pete@demon.net>
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -175,7 +175,7 @@
 	    their_data = curr->done_handler_data;
 	    curr->done_handler = NULL;
 	    curr->done_handler_data = NULL;
-	    debug(32, 2) ("this be aioCancel\n");
+	    debug(0, 0) ("this be aioCancel\n");
 	    if (cbdataValid(their_data))
 		done_handler(fd, their_data, -2, -2);
 	    cbdataUnlock(their_data);
@@ -203,7 +203,7 @@
 	if (ctrlp->fd == fd)
 	    break;
     if (ctrlp != NULL) {
-	debug(32, 2) ("aioWrite: EWOULDBLOCK\n");
+	debug(0, 0) ("aioWrite: EWOULDBLOCK\n");
 	errno = EWOULDBLOCK;
 	if (callback)
 	    (callback) (fd, callback_data, -1, errno);
Index: squid/src/authenticate.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/authenticate.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/authenticate.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: authenticate.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: authenticate.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/cache_cf.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_cf.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/cache_cf.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/cache_cf.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: cache_cf.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -55,8 +55,8 @@
 static const char *const B_GBYTES_STR = "GB";
 
 static const char *const list_sep = ", \t\n\r";
-static int http_header_first;
-static int http_header_allowed = 0;
+
+static int http_header_first = 0;
 
 static void configDoConfigure(void);
 static void parse_refreshpattern(refresh_t **);
@@ -188,7 +188,6 @@
 	cfg_filename = token + 1;
     memset(config_input_line, '\0', BUFSIZ);
     config_lineno = 0;
-    http_header_first = 0;
     while (fgets(config_input_line, BUFSIZ, fp)) {
 	config_lineno++;
 	if ((token = strchr(config_input_line, '\n')))
@@ -237,7 +236,6 @@
 	Config.Announce.period = 86400 * 365;	/* one year */
 	Config.onoff.announce = 0;
     }
-#if USE_DNSSERVER
     if (Config.dnsChildren < 1)
 	fatal("No dnsservers allocated");
     if (Config.dnsChildren > DefaultDnsChildrenMax) {
@@ -247,7 +245,6 @@
 	    DefaultDnsChildrenMax);
 	Config.dnsChildren = DefaultDnsChildrenMax;
     }
-#endif
     if (Config.Program.redirect) {
 	if (Config.redirectChildren < 1) {
 	    Config.redirectChildren = 0;
@@ -322,9 +319,7 @@
     }
 #endif
     requirePathnameExists("MIME Config Table", Config.mimeTablePathname);
-#if USE_DNSSERVER
     requirePathnameExists("cache_dns_program", Config.Program.dnsserver);
-#endif
     requirePathnameExists("unlinkd_program", Config.Program.unlinkd);
     if (Config.Program.redirect)
 	requirePathnameExists("redirect_program", Config.Program.redirect->key);
@@ -716,13 +711,7 @@
 static void
 dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header)
 {
-    int i;
-    for (i = 0; i < HDR_OTHER; i++) {
-	if (http_header_allowed && !CBIT_TEST(header, i))
-	    storeAppendPrintf(entry, "%s allow %s\n", name, httpHeaderNameById(i));
-	else if (!http_header_allowed && CBIT_TEST(header, i))
-	    storeAppendPrintf(entry, "%s deny %s\n", name, httpHeaderNameById(i));
-    }
+    storeAppendPrintf(entry, "%s\n", name);
 }
 
 static void
@@ -730,6 +719,7 @@
 {
     int allowed, id;
     char *t = NULL;
+
     if ((t = strtok(NULL, w_space)) == NULL) {
 	debug(3, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
@@ -746,20 +736,16 @@
 	debug(3, 0) ("parse_http_header: expecting 'allow' or 'deny', got '%s'.\n", t);
 	return;
     }
+
     if (!http_header_first) {
 	http_header_first = 1;
-	if (allowed) {
-	    http_header_allowed = 1;
+	if (allowed)
 	    httpHeaderMaskInit(header, 0xFF);
-	} else {
-	    http_header_allowed = 0;
-	    httpHeaderMaskInit(header, 0);
-	}
     }
     while ((t = strtok(NULL, w_space))) {
 	if ((id = httpHeaderIdByNameDef(t, strlen(t))) == -1)
-	    debug(3, 0) ("parse_http_header: Ignoring unknown header '%s'\n", t);
-	else if (allowed)
+	    id = HDR_OTHER;
+	if (allowed)
 	    CBIT_CLR(*header, id);
 	else
 	    CBIT_SET(*header, id);
@@ -833,6 +819,10 @@
     } else if (0 == strcasecmp(type_str, "asyncufs")) {
 	storeAufsDirParse(swap);
 #endif
+#if USE_DISKD
+    } else if (0 == strcasecmp(type_str, "diskd")) {
+	storeDiskdDirParse(swap);
+#endif
     } else {
 	fatalf("Unknown cache_dir type '%s'\n", type_str);
     }
@@ -1286,6 +1276,7 @@
 }
 
 #define free_onoff free_int
+#define free_httpanonymizer free_int
 #define dump_eol dump_string
 #define free_eol free_string
 
@@ -1638,32 +1629,30 @@
 {
     char *token;
     char *t;
-    char *host;
+    char *host = NULL;
     const struct hostent *hp;
-    unsigned short port;
+    int i;
     sockaddr_in_list *s;
     while ((token = strtok(NULL, w_space))) {
-	host = NULL;
-	port = 0;
 	if ((t = strchr(token, ':'))) {
 	    /* host:port */
 	    host = token;
 	    *t = '\0';
-	    port = (unsigned short) atoi(t + 1);
-	    if (0 == port)
+	    i = atoi(t + 1);
+	    if (i <= 0)
 		self_destruct();
-	} else if ((port = atoi(token)) > 0) {
+	} else if ((i = atoi(token)) > 0) {
 	    /* port */
 	} else {
 	    self_destruct();
 	}
 	s = xcalloc(1, sizeof(*s));
-	s->s.sin_port = htons(port);
+	s->s.sin_port = htons(i);
 	if (NULL == host)
 	    s->s.sin_addr = any_addr;
 	else if (1 == safe_inet_addr(host, &s->s.sin_addr))
 	    (void) 0;
-	else if ((hp = gethostbyname(host)))	/* dont use ipcache */
+	else if ((hp = gethostbyname(token)))	/* dont use ipcache */
 	    s->s.sin_addr = inaddrFromHostent(hp);
 	else
 	    self_destruct();
Index: squid/src/cache_diff.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_diff.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/cache_diff.c	20 Apr 2000 18:22:00 -0000	1.1.1.2
+++ squid/src/cache_diff.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_diff.c,v 1.1.1.2 2000/04/20 18:22:00 hno Exp $
+ * $Id: cache_diff.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/cache_manager.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_manager.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/cache_manager.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/cache_manager.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_manager.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: cache_manager.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 16    Cache Manager Objects
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/cachemgr.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/cachemgr.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/cachemgr.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/cachemgr.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cachemgr.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: cachemgr.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 0     CGI Cache Manager
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/carp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/carp.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/carp.c	20 Apr 2000 18:22:00 -0000	1.1.1.2
+++ squid/src/carp.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,5 +1,5 @@
 /*
- * $Id: carp.c,v 1.1.1.2 2000/04/20 18:22:00 hno Exp $
+ * $Id: carp.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 39    Cache Array Routing Protocol
  * AUTHOR: Eric Stern
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -97,10 +97,6 @@
 	url_hash += (url_hash << 19) + *c;
     /* select peer */
     for (tp = Config.peers; tp; tp = tp->next) {
-	if (0.0 == tp->carp.load_factor)
-	    continue;
-	if (tp->tcp_up != PEER_TCP_MAGIC_COUNT)
-	    continue;
 	assert(tp->type == PEER_PARENT);
 	combined_hash = (url_hash ^ tp->carp.hash);
 	combined_hash += combined_hash * 0x62531965;
Index: squid/src/cbdata.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cbdata.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/cbdata.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/cbdata.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cbdata.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: cbdata.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -167,7 +167,11 @@
 }
 
 void
+#if CBDATA_DEBUG
+cbdataLockDbg(const void *p, const char *file, int line)
+#else
 cbdataLock(const void *p)
+#endif
 {
     cbdata *c;
     if (p == NULL)
@@ -176,10 +180,18 @@
     debug(45, 3) ("cbdataLock: %p\n", p);
     assert(c != NULL);
     c->locks++;
+#if CBDATA_DEBUG
+    c->file = file;
+    c->line = line;
+#endif
 }
 
 void
+#if CBDATA_DEBUG
+cbdataUnlockDbg(const void *p, const char *file, int line)
+#else
 cbdataUnlock(const void *p)
+#endif
 {
     cbdata *c;
     if (p == NULL)
@@ -189,6 +201,10 @@
     assert(c != NULL);
     assert(c->locks > 0);
     c->locks--;
+#if CBDATA_DEBUG
+    c->file = file;
+    c->line = line;
+#endif
     if (c->valid || c->locks)
 	return;
     cbdataReallyFree(c);
Index: squid/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cf.data.pre,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/cf.data.pre	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/cf.data.pre	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+# $Id: cf.data.pre,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
 #
 #
 # SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
 #  Internet community.  Development is led by Duane Wessels of the
 #  National Laboratory for Applied Network Research and funded by the
 #  National Science Foundation.  Squid is Copyrighted (C) 1998 by
-#  the Regents of the University of California.  Please see the
-#  COPYRIGHT file for full details.  Squid incorporates software
-#  developed and/or copyrighted by other sources.  Please see the
-#  CREDITS file for full details.
+#  Duane Wessels and the University of California San Diego.  Please
+#  see the COPYRIGHT file for full details.  Squid incorporates
+#  software developed and/or copyrighted by other sources.  Please see
+#  the CREDITS file for full details.
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@
 	various options happen to be.  If you don't need to change the
 	default, you shouldn't uncomment the line.  Doing so may cause
 	run-time problems.  In some cases "none" refers to no default
-	setting at all, while in other cases it refers to a valid
+	setting at all, whilst in other cases it refers to a valid
 	option - the comments for that keyword indicate if this is the
 	case.
 
@@ -74,15 +74,13 @@
 
 	The default port number is 3128.
 
-	If you are running Squid in accelerator mode, then you
+	If you are running Squid in accelerateor mode, then you
 	probably want to listen on port 80 also, or instead.
 
 	The -a command line option will override the *first* port
 	number listed here.   That option will NOT override an IP
 	address, however.
 
-	You may specify multiple socket addresses on multiple lines.
-
 http_port 3128
 DOC_END
 
@@ -132,7 +130,10 @@
 	receive replies from multicast group members.
 
 	You must be very careful to NOT use a multicast address which
-	is already in use by another group of caches.
+	is already in use by another group of caches.  NLANR has been
+	assigned a block of multicast address space for use in Web
+	Caching.  Plese write to us at nlanr-cache@nlanr.net to receive
+	an address for your own use.
 
 	If you are unsure about multicast, please read the Multicast
 	chapter in the Squid FAQ (http://squid.nlanr.net/Squid/FAQ/).
@@ -172,7 +173,7 @@
 	udp_outgoing_address	is used for ICP packets sent out to other
 				caches.
 
-	The default behavior is to not bind to any specific address.
+	The default behaviour is to not bind to any specific address.
 
 	NOTE, udp_incoming_address and udp_outgoing_address can not
 	have the same value (unless it is 0.0.0.0) since they both use
@@ -374,15 +375,12 @@
 TYPE: int
 LOC: Config.Timeout.icp_query_max
 DOC_START
-	Normally the ICP query timeout is determined dynamically.  But
-	sometimes it can lead to very large values (say 5 seconds).
-	Use this option to put an upper limit on the dynamic timeout
-	value.  Do NOT use this option to always use a fixed (instead
-	of a dynamic) timeout value.
-
-	If 'icp_query_timeout' is set to zero, then this value is
-	ignored.
-maximum_icp_query_timeout 2000
+	When you use the dynamic ICP query timeout (by setting
+	'icp_query_timeout' to zero) you might want to place an
+	upper limit on the timeout value.
+
+	If 'icp_query_timeout' is set to zero, this value is ignored.
+icp_query_timeout 2000
 DOC_END
 
 NAME: mcast_icp_query_timeout
@@ -615,11 +613,8 @@
 	You can specify multiple cache_dir lines to spread the
 	cache among different disk partitions.
 
-	Type specifies the kind of storage system to use.  Most
-	everyone will want to use "ufs" as the type.  If you are using
-	Async I/O (--enable async-io) on Linux or Solaris, then you may
-	want to try "asyncufs" as the type.  Async IO support may be
-	buggy, however, so beware.
+	Type specifies the kind of storage system to use.  If you
+	don't know what to put here, then use "ufs".
 
 	'Directory' is a top-level directory where cache swap
 	files will be stored.  If you want to use an entire disk
@@ -663,7 +658,7 @@
 LOC: Config.Log.log
 DOC_START
 	Cache logging file. This is where general information about
-	your cache's behavior goes. You can increase the amount of data
+	your cache's behaviour goes. You can increase the amount of data
 	logged to this file with the "debug_options" tag below.
 
 cache_log @DEFAULT_CACHE_LOG@
@@ -678,7 +673,7 @@
 	Logs the activities of the storage manager.  Shows which
 	objects are ejected from the cache, and which objects are
 	saved and for how long.  To disable, enter "none". There are
-	not really utilities to analyze this data, so you can safely
+	not really utilities to analyse this data, so you can safely
 	disable it.
 
 cache_store_log @DEFAULT_STORE_LOG@
@@ -727,7 +722,7 @@
 	programs use.  To disable/enable this emulation, set
 	emulate_httpd_log to 'off' or 'on'.  The default
 	is to use the native log format since it includes useful
-	information that Squid-specific log analyzers use.
+	information that Squid-specific log analysers use.
 
 emulate_httpd_log off
 DOC_END
@@ -845,7 +840,7 @@
 DOC_START
 	If you want the anonymous login password to be more informative
 	(and enable the use of picky ftp servers), set this to something
-	reasonable for your domain, like wwwuser@somewhere.net
+	resonable for your domain, like wwwuser@somewhere.net
 
 	The reason why this is domainless by default is that the
 	request can be made on the behalf of a user in any domain,
@@ -870,7 +865,6 @@
 
 NAME: cache_dns_program
 TYPE: string
-IFDEF: USE_DNSSERVER
 DEFAULT: @DEFAULT_DNSSERVER@
 LOC: Config.Program.dnsserver
 DOC_START
@@ -881,7 +875,6 @@
 
 NAME: dns_children
 TYPE: int
-IFDEF: USE_DNSSERVER
 DEFAULT: 5
 LOC: Config.dnsChildren
 DOC_START
@@ -890,7 +883,9 @@
 	probably increase this value to at least 10.  The maximum
 	is 32.  The default is 5.
 
-	You must have at least one dnsserver process.
+	To disable dnsservers, set this to 0.  NOTE, this is very
+	strongly discouraged.  If you disable dnsservers your Squid
+	process will BLOCK on DNS lookups!
 
 dns_children 5
 DOC_END
@@ -898,7 +893,6 @@
 
 NAME: dns_defnames
 COMMENT: on|off
-IFDEF: USE_DNSSERVER
 TYPE: onoff
 DEFAULT: off
 LOC: Config.onoff.res_defnames
@@ -946,7 +940,7 @@
 LOC: Config.Program.pinger
 DOC_START
 	Specify the location of the executable for the pinger process.
-	This is only useful if you configured Squid (during compilation)
+	This is only useful if you configured Squid (during compliation)
 	with the '--enable-icmp' option.
 
 pinger_program @DEFAULT_PINGER@
@@ -1133,24 +1127,14 @@
 DEFAULT: 0
 LOC: Config.maxReplyBodySize
 DOC_START
-	This option specifies the maximum size of a reply body.  It
-	can be used to prevent users from downloading very large files,
-	such as MP3's and movies.   The reply size is checked twice.
-	First when we get the reply headers, we check the
-	content-length value.  If the content length value exists and
-	is larger than this parameter, the request is denied and the
-	user receives an error message that says "the request or reply
-	is too large." If there is no content-length, and the reply
-	size exceeds this limit, the client's connection is just closed
-	and they will receive a partial reply.
-
-	NOTE: downstream caches probably can not detect a partial reply
-	if there is no content-length header, so they will cache
-	partial responses and give them out as hits.  You should NOT
-	use this option if you have downstream caches.
-
-	If you set this parameter to zero (the default), there will be
-	no limit imposed.
+	This specifies the maximum size for an HTTP reply body.
+	This can be used to restrict users from downloading very
+	large files.  If the reply headers include a content-length
+	value, then we can recognize large reply bodies early and
+	avoid downloading any of it.  If not, we will download as
+	much data up to this limit and then ungraciously terminate
+	the transfer.  If you set this parameter to zero, there
+	will be no limit imposed.
 reply_body_max_size 0
 DOC_END
 
@@ -1168,17 +1152,17 @@
 	'Min' is the time (in minutes) an object without an explicit
 	expiry time should be considered fresh. The recommended
 	value is 0, any higher values may cause dynamic applications
-	to be erroneously cached unless the application designer
+	to be erronously cached unless the application designer
 	has taken the appropriate actions.
 
 	'Percent' is a percentage of the objects age (time since last
-	modification age) an object without explicit expiry time
+	modification age) an object without explicit exipry time
 	will be considered fresh.
 
 	'Max' is an upper limit on how long objects without an explicit
 	expiry time will be considered fresh.
 
-	options: override-expire
+	options: overrsde-expire
 		 override-lastmod
 		 reload-into-ims
 		 ignore-reload
@@ -1261,7 +1245,7 @@
 	to maximize the potential byte hit rate improvement of LFUDA.  
 
 	For more information about these cache replacement policies see
-	http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html and
+	http://www.hpl.hp.com/personal/John_Dilley/caching/wcw.html and
 	http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
 
 replacement_policy LFUDA
@@ -1490,7 +1474,7 @@
 DOC_START
 	The maximum amount of time that a client (browser) is allowed to
 	remain connected to the cache process.  This protects the Cache
-	from having a lot of sockets (and hence file descriptors) tied up
+	from having alot of sockets (and hence file descriptors) tied up
 	in a CLOSE_WAIT state from remote clients that go away without
 	properly shutting down (either because of a network failure or
 	because of a poor client implementation).  The default is one
@@ -1597,8 +1581,8 @@
 	acl aclname dst      ip-address/netmask ... (URL host's IP address)
 	acl aclname myip     ip-address/netmask ... (local socket IP address)
 
-	acl aclname srcdomain   .foo.com ...    # reverse lookup, client IP
-	acl aclname dstdomain   .foo.com ...    # Destination server from URL
+	acl aclname srcdomain   foo.com ...     # reverse lookup, client IP
+	acl aclname dstdomain   foo.com ...     # Destination server from URL
 	acl aclname srcdom_regex [-i] xxx ...   # regex matching client name
 	acl aclname dstdom_regex [-i] xxx ...   # regex matching server
 	  # For dstdomain and dstdom_regex  a reverse lookup is tried if a IP
@@ -1903,7 +1887,7 @@
 	create cache hierarchies.
 
 	An 'announcement' message is sent (via UDP) to the registration
-	service by Squid.  By default, the announcement message is NOT
+	service by Squid.  By default, the annoucement message is NOT
 	SENT unless you enable it with 'announce_period' below.
 
 	The announcement message includes your hostname, plus the
@@ -2306,14 +2290,14 @@
 
 NAME: store_objects_per_bucket
 TYPE: int
-DEFAULT: 50
+DEFAULT: 20
 LOC: Config.Store.objectsPerBucket
 DOC_START
 	Target number of objects per bucket in the store hash table.
 	Lowering this value increases the total number of buckets and
 	also the storage maintenance rate.  The default is 50.
 
-store_objects_per_bucket 50
+store_objects_per_bucket 20
 DOC_END
 
 NAME: client_db
@@ -2515,7 +2499,7 @@
 	allow specific headers (thus denying all others), or you
 	may deny specific headers (thus allowing all others).
 
-	For example, to achieve the same behavior as the old
+	For example, to achieve the same behaviour as the old
 	'http_anonymizer standard' option, you should use:
 
 		anonymize_headers deny From Referer Server
@@ -2528,7 +2512,7 @@
 		anonymize_headers allow Content-Encoding Content-Length
 		anonymize_headers allow Content-Type Date Expires Host
 		anonymize_headers allow If-Modified-Since Last-Modified
-		anonymize_headers allow Location Pragma Accept
+		anonymize_headers allow Location Pragma Accept Charset
 		anonymize_headers allow Accept-Encoding Accept-Language
 		anonymize_headers allow Content-Language Mime-Version
 		anonymize_headers allow Retry-After Title Connection
@@ -2573,8 +2557,8 @@
 DEFAULT: @DEFAULT_ERROR_DIR@
 DOC_START
 	If you wish to create your own versions of the default
-	(English) error files, either to customize them to suit your
-	language or company copy the template English files to another
+	(English) error files, either to customise them to suit your
+	language or company copy the template english files to another
 	directory and point this tag at them.
 DOC_END
 
@@ -2648,7 +2632,7 @@
 	snmp_access allow|deny [!]aclname ...
 
 Example:
-snmp_access allow snmppublic localhost
+snmp_access allow snmpppublic localhost
 snmp_access deny all
 DOC_END
 
@@ -2671,7 +2655,7 @@
 	snmp_outgoing_address	is used for SNMP packets returned to SNMP
 				agents.
 
-	The default behavior is to not bind to any specific address.
+	The default behaviour is to not bind to any specific address.
 
 	NOTE, snmp_incoming_address and snmp_outgoing_address can not have
 	the same value since they both use port 3130.
@@ -2696,10 +2680,10 @@
 DEFAULT: 0.0.0.0
 IFDEF: USE_WCCP
 DOC_START
-	Use this option to define your WCCP ``home'' router for
-	Squid.   Setting the 'wccp_router' to 0.0.0.0 (the default)
-	disables WCCP.
-wccp_router 0.0.0.0
+	Specifies the router that will manage WCCP for this
+	cache.
+
+wccp_router 10.0.0.1
 DOC_END
 
 NAME: wccp_incoming_address
@@ -2714,21 +2698,14 @@
 DEFAULT: 255.255.255.255
 IFDEF: USE_WCCP
 DOC_START
-        wccp_incoming_address   Use this option if you require WCCP
-				messages to be received on only one
-				interface.  Do NOT use this option if
-				you're unsure how many interfaces you
-				have, or if you know you have only one
-				interface.
-
-	wccp_outgoing_address	Use this option if you require WCCP
-				messages to be sent out on only one
-				interface.  Do NOT use this option if
-				you're unsure how many interfaces you
-				have, or if you know you have only one
-				interface.
+        Just like 'udp_incoming_address' above, but for the WCCP port.
 
-        The default behavior is to not bind to any specific address.
+        wccp_incoming_address   is used for the WCCP socket receiving
+                                messages from WCCP routers.
+        wccp_outgoing_address   is used for WCCP packets returned to WCCP
+                                routers.
+
+        The default behaviour is to not bind to any specific address.
 
         NOTE, wccp_incoming_address and wccp_outgoing_address can not have
         the same value since they both use port 2048.
@@ -2801,7 +2778,7 @@
 LOC: Config.Delay
 DOC_START
 	This is used to determine which delay pool a request falls into.
-	The first matched delay pool is always used, i.e., if a request falls
+	The first matched delay pool is always used, ie, if a request falls
 	into delay pool number one, no more delay are checked, otherwise the
 	rest are checked in order of their delay pool number until they have
 	all been checked.  For example, if you want some_big_clients in delay
@@ -3016,7 +2993,7 @@
 LOC: Config.mcast_miss.port
 DEFAULT: 3135
 DOC_START
-	This is the port number to be used in conjunction with
+	This is the port number to be used in conjuction with
 	'mcast_miss_addr'.
 DOC_END
 
@@ -3104,6 +3081,7 @@
 	This controls whether the server will generate a Cache Digest
 	of its contents.  By default, Cache Digest generation is
 	enabled if Squid is compiled with USE_CACHE_DIGESTS defined.
+
 digest_generation on
 DOC_END
 
@@ -3116,89 +3094,61 @@
 	This is the number of bits of the server's Cache Digest which
 	will be associated with the Digest entry for a given HTTP
 	Method and URL (public key) combination.  The default is 5.
+
 digest_bits_per_entry 5
 DOC_END
 
 NAME: digest_rebuild_period
 IFDEF: USE_CACHE_DIGESTS
-COMMENT: (seconds)
-TYPE: time_t
+TYPE: int
 LOC: Config.digest.rebuild_period
-DEFAULT: 1 hour
+DEFAULT: 3600
 DOC_START
 	This is the number of seconds between Cache Digest rebuilds.
-	By default the server's Digest is rebuilt every hour.
-digest_rebuild_period 1 hour
+	By default the server's Digest is rebuilt every hour - 60
+	minutes * 60 seconds per minute, 3600 seconds.
+
+digest_rebuild_period 3600
 DOC_END
 
 NAME: digest_rewrite_period
-COMMENT: (seconds)
 IFDEF: USE_CACHE_DIGESTS
-TYPE: time_t
+TYPE: int
 LOC: Config.digest.rewrite_period
-DEFAULT: 1 hour
+DEFAULT: 3600
 DOC_START
 	This is the number of seconds between Cache Digest writes to
 	disk.  By default the server's Digest is written to disk every
-	hour.
-digest_rewrite_period 1 hour
+	hour - 60 minutes * 60 seconds per minute, 3600 seconds.
+
+digest_rewrite_period 3600
 DOC_END
 
 NAME: digest_swapout_chunk_size
-COMMENT: (bytes)
-TYPE: b_size_t
 IFDEF: USE_CACHE_DIGESTS
+TYPE: int
 LOC: Config.digest.swapout_chunk_size
-DEFAULT: 4096 bytes
+DEFAULT: 4096
 DOC_START
 	This is the number of bytes of the Cache Digest to write to
-	disk at a time.  It defaults to 4096 bytes (4KB), the Squid
-	default swap page.
-digest_swapout_chunk_size 4096 bytes
+	disk at a time.  It defaults to 4096 (4KB), the Squid default
+	swap page.
+
+digest_swapout_chunk_size 4096
 DOC_END
 
 NAME: digest_rebuild_chunk_percentage
-COMMENT: (percent, 0-100)
 IFDEF: USE_CACHE_DIGESTS
 TYPE: int
 LOC: Config.digest.rebuild_chunk_percentage
 DEFAULT: 10
 DOC_START
-	This is the percentage of the Cache Digest to be scanned at a
-	time.  By default it is set to 10% of the Cache Digest.
+	This is the portion (where 0 < portion <= 100) of the Cache Digest
+	to be scanned at a time.  By default it is set to 10 (10%) of
+	the Cache Digest.
+
 digest_rebuild_chunk_percentage 10
 DOC_END
 
-NAME: chroot
-TYPE: string
-LOC: Config.chroot_dir
-DEFAULT: none
-DOC_START
-	Use this to have Squid do a chroot() while initializing.  This
-	also causes Squid to fully drop root privileges after
-	initializing.  This means, for example, that if you use a HTTP
-	port less than 1024 and try to reconfigure, you will get an
-	error.
-DOC_END
-EOF
-
-NAME: client_persistent_connections
-TYPE: onoff
-LOC: Config.onoff.client_pconns
-DEFAULT: on
-DOC_NONE
-
-NAME: server_persistent_connections
-TYPE: onoff
-LOC: Config.onoff.server_pconns
-DEFAULT: on
-DOC_START
-	Persistent connection support for clients and servers.  By
-	default, Squid uses persistent connections (when allowed)
-	with its clients and servers.  You can use these options to
-	disable persistent connections with clients and/or servers.
-client_persistent_connections on
-server_persistent_connections on
-DOC_END
 EOF
 
Index: squid/src/cf_gen.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cf_gen.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/cf_gen.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/cf_gen.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,5 +1,5 @@
 /*
- * $Id: cf_gen.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: cf_gen.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: none
  * AUTHOR: Max Okumoto
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/client.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/client.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/client.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/client.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: client.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/client_db.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/client_db.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/client_db.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/client_db.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_db.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: client_db.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 0     Client Database
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/client_side.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/client_side.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/client_side.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: client_side.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -105,7 +105,6 @@
 static int httpAcceptDefer(void);
 static log_type clientProcessRequest2(clientHttpRequest * http);
 static int clientReplyBodyTooLarge(int clen);
-static int clientRequestBodyTooLarge(int clen);
 
 static int
 checkAccelOnly(clientHttpRequest * http)
@@ -141,7 +140,7 @@
     clientHttpRequest *http = data;
     ConnStateData *conn = http->conn;
     if (checkAccelOnly(http)) {
-	clientAccessCheckDone(ACCESS_ALLOWED, http);
+	clientAccessCheckDone(0, http);
 	return;
     }
     http->acl_checklist = aclChecklistCreate(Config.accessList.http,
@@ -525,7 +524,7 @@
     StoreEntry *entry;
     ErrorState *err = NULL;
     HttpReply *r;
-    debug(33, 3) ("Config2.onoff.enable_purge = %d\n", Config2.onoff.enable_purge);
+    debug(33, 1) ("Config2.onoff.enable_purge = %d\n", Config2.onoff.enable_purge);
     if (!Config2.onoff.enable_purge) {
 	http->log_type = LOG_TCP_DENIED;
 	err = errorCon(ERR_ACCESS_DENIED, HTTP_FORBIDDEN);
@@ -576,6 +575,10 @@
     Counter.client_http.requests++;
     if (isTcpHit(http->log_type))
 	Counter.client_http.hits++;
+    if (http->log_type == LOG_TCP_HIT)
+	Counter.client_http.disk_hits++;
+    else if (http->log_type == LOG_TCP_MEM_HIT)
+	Counter.client_http.mem_hits++;
     if (http->request->err_type != ERR_NONE)
 	Counter.client_http.errors++;
     statHistCount(&Counter.client_http.all_svc_time, svc_time);
@@ -848,9 +851,11 @@
 	request->http_ver);
     debug(33, 3) ("clientSetKeepaliveFlag: method = %s\n",
 	RequestMethodStr[request->method]);
-    if (!Config.onoff.client_pconns)
-	request->flags.proxy_keepalive = 0;
-    else if (httpMsgIsPersistent(request->http_ver, req_hdr))
+    /*
+     * If we wanted to limit the number of client-side idle persistent
+     * connections, this is a good place to do it.
+     */
+    if (httpMsgIsPersistent(request->http_ver, req_hdr))
 	request->flags.proxy_keepalive = 1;
 }
 
@@ -1163,29 +1168,20 @@
     if (request->range)
 	clientBuildRangeHeader(http, rep);
     /*
-     * Add a estimated Age header on cache hits.
+     * Add Age header, not that our header must replace Age headers
+     * from other caches if any
      */
-    if (is_hit) {
-	/*
-	 * Remove any existing Age header sent by upstream caches
-	 * (note that the existing header is passed along unmodified
-	 * on cache misses)
-	 */
+    if (http->entry->timestamp > 0) {
 	httpHeaderDelById(hdr, HDR_AGE);
 	/*
-	 * This adds the calculated object age. Note that the details of the
-	 * age calculation is performed by adjusting the timestamp in
-	 * storeTimestampsSet(), not here.
-	 *
-	 * BROWSER WORKAROUND: IE sometimes hangs when receiving a 0 Age
-	 * header, so don't use it unless there is a age to report. Please
-	 * note that Age is only used to make a conservative estimation of
-	 * the objects age, so a Age: 0 header does not add any useful
-	 * information to the reply in any case.
-	 */
-	if (http->entry->timestamp < squid_curtime)
-	    httpHeaderPutInt(hdr, HDR_AGE,
-		squid_curtime - http->entry->timestamp);
+	 * we do not follow HTTP/1.1 precisely here becuase we rely
+	 * on Date header when computing entry->timestamp; we should
+	 * be using _request_ time if Date header is not available
+	 * or if it is out of sync
+	 */
+	httpHeaderPutInt(hdr, HDR_AGE,
+	    http->entry->timestamp <= squid_curtime ?
+	    squid_curtime - http->entry->timestamp : 0);
     }
     /* Append X-Cache */
     httpHeaderPutStrf(hdr, HDR_X_CACHE, "%s from %s",
@@ -1573,18 +1569,6 @@
     return 0;
 }
 
-static int
-clientRequestBodyTooLarge(int clen)
-{
-    if (0 == Config.maxRequestBodySize)
-	return 0;		/* disabled */
-    if (clen < 0)
-	return 0;		/* unknown, bug? */
-    if (clen > Config.maxRequestBodySize)
-	return 1;		/* too large */
-    return 0;
-}
-
 /*
  * accepts chunk of a http message in buf, parses prefix, filters headers and
  * such, writes processed message to the client's socket
@@ -1735,7 +1719,7 @@
 	/*
 	 * Set the timeout BEFORE calling clientReadRequest().
 	 */
-	commSetTimeout(conn->fd, 15, requestTimeout, conn);
+	commSetTimeout(conn->fd, Config.Timeout.pconn, requestTimeout, conn);
 	clientReadRequest(conn->fd, conn);	/* Read next request */
 	/*
 	 * Note, the FD may be closed at this point.
@@ -1789,7 +1773,7 @@
     } else if ((done = clientCheckTransferDone(http)) != 0 || size == 0) {
 	debug(33, 5) ("clientWriteComplete: FD %d transfer is DONE\n", fd);
 	/* We're finished case */
-	if (httpReplyBodySize(http->request->method, entry->mem_obj->reply) < 0) {
+	if (http->entry->mem_obj->reply->content_length < 0) {
 	    debug(33, 5) ("clientWriteComplete: closing, content_length < 0\n");
 	    comm_close(fd);
 	} else if (!done) {
@@ -1979,7 +1963,7 @@
 	    clientCacheHit,
 	    http);
     } else {
-	/* MISS CASE */
+	/* MISS CASE, http->log_type is already set! */
 	clientProcessMiss(http);
     }
 }
@@ -2026,9 +2010,6 @@
     http->entry = clientCreateStoreEntry(http, r->method, r->flags);
     if (http->redirect.status) {
 	HttpReply *rep = httpReplyCreate();
-#if LOG_TCP_REDIRECTS
-	http->log_type = LOG_TCP_REDIRECT;
-#endif
 	storeReleaseRequest(http->entry);
 	httpRedirectReply(rep, http->redirect.status, http->redirect.location);
 	httpReplySwapOut(rep, http->entry);
@@ -2498,7 +2479,7 @@
 		    commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
 		if (request->content_length < 0)
 		    (void) 0;
-		else if (clientRequestBodyTooLarge(request->content_length)) {
+		else if (request->content_length > Config.maxRequestBodySize) {
 		    err = errorCon(ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE);
 		    err->request = requestLink(request);
 		    http->entry = clientCreateStoreEntry(http,
@@ -2517,6 +2498,11 @@
 	    k = conn->in.size - 1 - conn->in.offset;
 	    if (k == 0) {
 		if (conn->in.offset >= Config.maxRequestHeaderSize) {
+		    int fd = open("/tmp/error:request-too-large", O_WRONLY | O_CREAT | O_TRUNC);
+		    if (fd >= 0) {
+			write(fd, conn->in.buf, conn->in.offset);
+			close(fd);
+		    }
 		    /* The request is too large to handle */
 		    debug(33, 1) ("Request header is too large (%d bytes)\n",
 			(int) conn->in.offset);
@@ -2623,7 +2609,7 @@
 	    break;
 	}
 	debug(33, 4) ("httpAccept: FD %d: accepted\n", fd);
-	connState = xcalloc(1, sizeof(ConnStateData));
+	connState = memAllocate(MEM_CONNSTATEDATA);
 	connState->peer = peer;
 	connState->log_addr = peer.sin_addr;
 	connState->log_addr.s_addr &= Config.Addrs.client_netmask.s_addr;
@@ -2631,7 +2617,7 @@
 	connState->fd = fd;
 	connState->in.size = REQUEST_BUF_SIZE;
 	connState->in.buf = xcalloc(connState->in.size, 1);
-	cbdataAdd(connState, cbdataXfree, 0);
+	cbdataAdd(connState, memFree, MEM_CONNSTATEDATA);
 	/* XXX account connState->in.buf */
 	comm_add_close_handler(fd, connStateFree, connState);
 	if (Config.onoff.log_fqdn)
@@ -2723,7 +2709,7 @@
 static int
 clientGotNotEnough(clientHttpRequest * http)
 {
-    int cl = httpReplyBodySize(http->request->method, http->entry->mem_obj->reply);
+    int cl = http->entry->mem_obj->reply->content_length;
     int hs = http->entry->mem_obj->reply->hdr_sz;
     assert(cl >= 0);
     if (http->out.offset < cl + hs)
Index: squid/src/comm.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/comm.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/comm.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/comm.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: comm.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/comm_select.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/comm_select.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/comm_select.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/comm_select.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_select.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: comm_select.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -36,6 +36,8 @@
 
 #if USE_ASYNC_IO
 #define MAX_POLL_TIME 10
+#elif USE_DISKD
+#define MAX_POLL_TIME 10
 #else
 #define MAX_POLL_TIME 1000
 #endif
@@ -333,6 +335,9 @@
 #if USE_ASYNC_IO
 	aioCheckCallbacks();
 #endif
+#if USE_DISKD
+	storeDiskdReadQueue();
+#endif
 #if DELAY_POOLS
 	FD_ZERO(&slowfds);
 #endif
@@ -664,6 +669,9 @@
 #if USE_ASYNC_IO
 	aioCheckCallbacks();
 #endif
+#if USE_DISKD
+	storeDiskdReadQueue();
+#endif
 #if DELAY_POOLS
 	FD_ZERO(&slowfds);
 #endif
Index: squid/src/debug.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/debug.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/debug.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/debug.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: debug.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: debug.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/defines.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/defines.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/defines.h	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/defines.h	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: defines.h,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: defines.h,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/delay_pools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/delay_pools.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/delay_pools.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/delay_pools.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: delay_pools.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: delay_pools.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: David Luyer <luyer@ucs.uwa.edu.au>
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -42,35 +42,30 @@
     int aggregate;
 };
 
-#define IND_MAP_SZ 256
-
 struct _class2DelayPool {
     int aggregate;
     /* OK: -1 is terminator.  individual[255] is always host 255. */
     /* 255 entries + 1 terminator byte */
-    unsigned char individual_map[IND_MAP_SZ];
+    unsigned char individual_map[256];
     unsigned char individual_255_used;
     /* 256 entries */
-    int individual[IND_MAP_SZ];
+    int individual[256];
 };
 
-#define NET_MAP_SZ 256
-#define C3_IND_SZ (NET_MAP_SZ*IND_MAP_SZ)
-
 struct _class3DelayPool {
     int aggregate;
     /* OK: -1 is terminator.  network[255] is always host 255. */
     /* 255 entries + 1 terminator byte */
-    unsigned char network_map[NET_MAP_SZ];
+    unsigned char network_map[256];
     unsigned char network_255_used;
     /* 256 entries */
     int network[256];
     /* 256 sets of (255 entries + 1 terminator byte) */
-    unsigned char individual_map[NET_MAP_SZ][IND_MAP_SZ];
+    unsigned char individual_map[256][256];
     /* Pack this into one bit per net */
     unsigned char individual_255_used[32];
     /* largest entry = (255<<8)+255 = 65535 */
-    int individual[C3_IND_SZ];
+    int individual[65536];
 };
 
 typedef struct _class1DelayPool class1DelayPool;
@@ -306,18 +301,17 @@
 	if (host == 255) {
 	    if (!delay_data[pool].class2->individual_255_used) {
 		delay_data[pool].class2->individual_255_used = 1;
-		delay_data[pool].class2->individual[IND_MAP_SZ - 1] =
+		delay_data[pool].class2->individual[255] =
 		    (Config.Delay.rates[pool]->individual.max_bytes *
 		    Config.Delay.initial) / 100;
 	    }
 	    return delayId(pool + 1, 255);
 	}
-	for (i = 0; i < IND_MAP_SZ; i++) {
+	for (i = 0;; i++) {
 	    if (delay_data[pool].class2->individual_map[i] == host)
 		break;
 	    if (delay_data[pool].class2->individual_map[i] == 255) {
 		delay_data[pool].class2->individual_map[i] = host;
-		assert(i < (IND_MAP_SZ - 1));
 		delay_data[pool].class2->individual_map[i + 1] = 255;
 		delay_data[pool].class2->individual[i] =
 		    (Config.Delay.rates[pool]->individual.max_bytes *
@@ -340,13 +334,12 @@
 		Config.Delay.initial) / 100;
 	}
     } else {
-	for (i = 0; i < NET_MAP_SZ; i++) {
+	for (i = 0;; i++) {
 	    if (delay_data[pool].class3->network_map[i] == net)
 		break;
 	    if (delay_data[pool].class3->network_map[i] == 255) {
 		delay_data[pool].class3->network_map[i] = net;
 		delay_data[pool].class3->individual_map[i][0] = 255;
-		assert(i < (NET_MAP_SZ - 1));
 		delay_data[pool].class3->network_map[i + 1] = 255;
 		delay_data[pool].class3->network[i] =
 		    (Config.Delay.rates[pool]->network.max_bytes *
@@ -360,26 +353,21 @@
 	position |= 255;
 	if (!(delay_data[pool].class3->individual_255_used[i / 8] & (1 << (i % 8)))) {
 	    delay_data[pool].class3->individual_255_used[i / 8] |= (1 << (i % 8));
-	    assert(position < C3_IND_SZ);
 	    delay_data[pool].class3->individual[position] =
 		(Config.Delay.rates[pool]->individual.max_bytes *
 		Config.Delay.initial) / 100;
 	}
 	return delayId(pool + 1, position);
     }
-    assert(i < NET_MAP_SZ);
-    for (j = 0; j < IND_MAP_SZ; j++) {
+    for (j = 0;; j++) {
 	if (delay_data[pool].class3->individual_map[i][j] == host) {
 	    position |= j;
 	    break;
 	}
 	if (delay_data[pool].class3->individual_map[i][j] == 255) {
 	    delay_data[pool].class3->individual_map[i][j] = host;
-	    assert(j < (IND_MAP_SZ - 1));
 	    delay_data[pool].class3->individual_map[i][j + 1] = 255;
-	    position |= j;
-	    assert(position < C3_IND_SZ);
-	    delay_data[pool].class3->individual[position] =
+	    delay_data[pool].class3->individual[position |= j] =
 		(Config.Delay.rates[pool]->individual.max_bytes *
 		Config.Delay.initial) / 100;
 	    break;
@@ -404,7 +392,7 @@
 delayUpdateClass2(class2DelayPool * class2, delaySpecSet * rates, int incr)
 {
     int restore_bytes;
-    unsigned int i;
+    unsigned char i;
     /* delaySetSpec may be pointer to partial structure so MUST pass by
      * reference.
      */
@@ -420,13 +408,12 @@
     else
 	i = 0;
     for (;;) {
-	assert(i < IND_MAP_SZ);
 	if (i != 255 && class2->individual_map[i] == 255)
 	    return;
 	if (class2->individual[i] != rates->individual.max_bytes &&
 	    (class2->individual[i] += restore_bytes) > rates->individual.max_bytes)
 	    class2->individual[i] = rates->individual.max_bytes;
-	if (++i == (IND_MAP_SZ - 1))
+	if (++i == 255)
 	    return;
     }
 }
@@ -436,7 +423,7 @@
 {
     int individual_restore_bytes, network_restore_bytes;
     int mpos;
-    unsigned int i, j;
+    unsigned char i, j;
     /* delaySetSpec may be pointer to partial structure so MUST pass by
      * reference.
      */
@@ -457,7 +444,6 @@
     else
 	i = 0;
     for (;;) {
-	assert(i < NET_MAP_SZ);
 	if (i != 255 && class3->network_map[i] == 255)
 	    return;
 	if (individual_restore_bytes != -incr) {
@@ -467,19 +453,16 @@
 	    else
 		j = 0;
 	    for (;;) {
-		assert(i < NET_MAP_SZ);
-		assert(j < IND_MAP_SZ);
 		if (j != 255 && class3->individual_map[i][j] == 255)
 		    break;
-		assert(mpos < C3_IND_SZ);
 		if (class3->individual[mpos] != rates->individual.max_bytes &&
 		    (class3->individual[mpos] += individual_restore_bytes) >
 		    rates->individual.max_bytes)
 		    class3->individual[mpos] = rates->individual.max_bytes;
 		mpos++;
-		if (j == (IND_MAP_SZ - 1))
+		if (j == 255)
 		    mpos -= 256;
-		if (++j == (IND_MAP_SZ - 1))
+		if (++j == 255)
 		    break;
 	    }
 	}
@@ -488,7 +471,7 @@
 	    (class3->network[i] += network_restore_bytes) >
 	    rates->network.max_bytes)
 	    class3->network[i] = rates->network.max_bytes;
-	if (++i == (NET_MAP_SZ - 1))
+	if (++i == 255)
 	    return;
     }
 }
@@ -680,8 +663,7 @@
     /* must be a reference only - partially malloc()d struct */
     delaySpecSet *rate = Config.Delay.rates[pool];
     class2DelayPool *class2 = delay_data[pool].class2;
-    unsigned char shown = 0;
-    unsigned int i;
+    unsigned char shown = 0, i;
 
     storeAppendPrintf(sentry, "Pool: %d\n\tClass: 2\n\n", pool + 1);
     delayPoolStatsAg(sentry, rate, class2->aggregate);
@@ -693,7 +675,7 @@
     storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->individual.max_bytes);
     storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->individual.restore_bps);
     storeAppendPrintf(sentry, "\t\tCurrent: ");
-    for (i = 0; i < IND_MAP_SZ; i++) {
+    for (i = 0;; i++) {
 	if (class2->individual_map[i] == 255)
 	    break;
 	storeAppendPrintf(sentry, "%d:%d ", class2->individual_map[i],
@@ -715,9 +697,7 @@
     /* fully malloc()d struct in this case only */
     delaySpecSet *rate = Config.Delay.rates[pool];
     class3DelayPool *class3 = delay_data[pool].class3;
-    unsigned char shown = 0;
-    unsigned int i;
-    unsigned int j;
+    unsigned char shown = 0, i, j;
 
     storeAppendPrintf(sentry, "Pool: %d\n\tClass: 3\n\n", pool + 1);
     delayPoolStatsAg(sentry, rate, class3->aggregate);
@@ -728,7 +708,7 @@
 	storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->network.max_bytes);
 	storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->network.restore_bps);
 	storeAppendPrintf(sentry, "\t\tCurrent: ");
-	for (i = 0; i < NET_MAP_SZ; i++) {
+	for (i = 0;; i++) {
 	    if (class3->network_map[i] == 255)
 		break;
 	    storeAppendPrintf(sentry, "%d:%d ", class3->network_map[i],
@@ -751,12 +731,12 @@
     storeAppendPrintf(sentry, "\tIndividual:\n");
     storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->individual.max_bytes);
     storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->individual.restore_bps);
-    for (i = 0; i < NET_MAP_SZ; i++) {
+    for (i = 0;; i++) {
 	if (class3->network_map[i] == 255)
 	    break;
 	storeAppendPrintf(sentry, "\t\tCurrent [Network %d]: ", class3->network_map[i]);
 	shown = 1;
-	for (j = 0; j < IND_MAP_SZ; j++) {
+	for (j = 0;; j++) {
 	    if (class3->individual_map[i][j] == 255)
 		break;
 	    storeAppendPrintf(sentry, "%d:%d ", class3->individual_map[i][j],
@@ -770,7 +750,7 @@
     if (class3->network_255_used) {
 	storeAppendPrintf(sentry, "\t\tCurrent [Network 255]: ");
 	shown = 1;
-	for (j = 0; j < IND_MAP_SZ; j++) {
+	for (j = 0;; j++) {
 	    if (class3->individual_map[255][j] == 255)
 		break;
 	    storeAppendPrintf(sentry, "%d:%d ", class3->individual_map[255][j],
Index: squid/src/disk.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/disk.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/disk.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/disk.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: disk.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: disk.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/dns.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dns.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/dns.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/dns.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: dns.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 34    Dnsserver interface
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/dns_internal.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dns_internal.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/dns_internal.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/dns_internal.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns_internal.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: dns_internal.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -76,7 +76,6 @@
 static OBJH idnsStats;
 static void idnsAddNameserver(const char *buf);
 static void idnsFreeNameservers(void);
-static void idnsParseNameservers(void);
 static void idnsParseResolvConf(void);
 static void idnsSendQuery(idns_query * q);
 static int idnsFromKnownNameserver(struct sockaddr_in *from);
@@ -84,7 +83,6 @@
 static void idnsGrokReply(const char *buf, size_t sz);
 static PF idnsRead;
 static EVH idnsCheckQueue;
-static void idnsTickleQueue(void);
 
 static void
 idnsAddNameserver(const char *buf)
@@ -106,7 +104,7 @@
     nameservers[nns].S.sin_family = AF_INET;
     nameservers[nns].S.sin_port = htons(DOMAIN_PORT);
     nameservers[nns].S.sin_addr.s_addr = inet_addr(buf);
-    debug(78, 3) ("idnsAddNameserver: Added nameserver #%d: %s\n",
+    debug(78, 1) ("idnsAddNameserver: Added nameserver #%d: %s\n",
 	nns, inet_ntoa(nameservers[nns].S.sin_addr));
     nns++;
 }
@@ -119,16 +117,6 @@
 }
 
 static void
-idnsParseNameservers(void)
-{
-    wordlist *w;
-    for (w = Config.dns_nameservers; w; w = w->next) {
-	debug(78, 1) ("Adding nameserver %s from squid.conf\n", w->key);
-	idnsAddNameserver(w->key);
-    }
-}
-
-static void
 idnsParseResolvConf(void)
 {
     FILE *fp;
@@ -139,16 +127,17 @@
 	debug(78, 1) ("%s: %s\n", _PATH_RESOLV_CONF, xstrerror());
 	return;
     }
+    idnsFreeNameservers();
     while (fgets(buf, 512, fp)) {
 	t = strtok(buf, w_space);
-	if (t == NULL)
-	    continue;;
+	if (NULL == t)
+	    continue;
 	if (strcasecmp(t, "nameserver"))
 	    continue;
 	t = strtok(NULL, w_space);
 	if (t == NULL)
 	    continue;;
-	debug(78, 1) ("Adding nameserver %s from %s\n", t, _PATH_RESOLV_CONF);
+	debug(78, 1) ("idnsParseResolvConf: nameserver %s\n", t);
 	idnsAddNameserver(t);
     }
     fclose(fp);
@@ -184,17 +173,6 @@
 }
 
 static void
-idnsTickleQueue(void)
-{
-    if (event_queued)
-	return;
-    if (NULL == lru_list.tail)
-	return;
-    eventAdd("idnsCheckQueue", idnsCheckQueue, NULL, 1.0, 1);
-    event_queued = 1;
-}
-
-static void
 idnsSendQuery(idns_query * q)
 {
     int x;
@@ -224,7 +202,10 @@
     q->sent_t = current_time;
     nameservers[ns].nqueries++;
     dlinkAdd(q, &q->lru, &lru_list);
-    idnsTickleQueue();
+    if (!event_queued) {
+	eventAdd("idnsCheckQueue", idnsCheckQueue, NULL, 1.0, 1);
+	event_queued = 1;
+    }
 }
 
 static int
@@ -372,7 +353,6 @@
 	    memFree(q, MEM_IDNS_QUERY);
 	}
     }
-    idnsTickleQueue();
 }
 
 /* ====================================================================== */
@@ -392,9 +372,7 @@
 	    fatal("Could not create a DNS socket");
 	debug(78, 1) ("DNS Socket created on FD %d\n", DnsSocket);
     }
-    assert(0 == nns);
-    idnsParseNameservers();
-    if (0 == nns)
+    if (nns == 0)
 	idnsParseResolvConf();
     if (!init) {
 	memDataInit(MEM_IDNS_QUERY, "idns_query", sizeof(idns_query), 0);
@@ -412,7 +390,6 @@
 	return;
     comm_close(DnsSocket);
     DnsSocket = -1;
-    idnsFreeNameservers();
 }
 
 void
Index: squid/src/dnsserver.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dnsserver.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/dnsserver.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/dnsserver.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dnsserver.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: dnsserver.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 0     DNS Resolver
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/enums.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/enums.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/enums.h	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/enums.h	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: enums.h,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -45,9 +45,6 @@
     LOG_TCP_MEM_HIT,
     LOG_TCP_DENIED,
     LOG_TCP_OFFLINE_HIT,
-#if LOG_TCP_REDIRECTS
-    LOG_TCP_REDIRECT,
-#endif
     LOG_UDP_HIT,
     LOG_UDP_MISS,
     LOG_UDP_DENIED,
@@ -200,7 +197,6 @@
     HDR_CONTENT_MD5,
     HDR_CONTENT_RANGE,
     HDR_CONTENT_TYPE,
-    HDR_COOKIE,
     HDR_DATE,
     HDR_ETAG,
     HDR_EXPIRES,
@@ -659,5 +655,8 @@
 typedef enum {
     SWAPDIR_UFS,
     SWAPDIR_ASYNCUFS,
+#if USE_DISKD
+    SWAPDIR_DISKD,
+#endif
     SWAPDIR_MAX
 } swapdir_t;
Index: squid/src/errorpage.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/errorpage.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/errorpage.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/errorpage.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: errorpage.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/event.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/event.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/event.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/event.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: event.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: event.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 41    Event Processing
  * AUTHOR: Henrik Nordstrom
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/fd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/fd.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/fd.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/fd.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fd.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: fd.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 51    Filedescriptor Functions
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/filemap.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/filemap.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/filemap.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/filemap.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: filemap.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: filemap.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 8     Swap File Bitmap
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -122,9 +122,8 @@
     int count;
     if (suggestion >= fm->max_n_files)
 	suggestion = 0;
-    if (!file_map_bit_test(fm, suggestion)) {
-	return file_map_bit_set(fm, suggestion);
-    }
+    if (!file_map_bit_test(fm, suggestion))
+	return suggestion;
     word = suggestion >> LONG_BIT_SHIFT;
     for (count = 0; count < fm->nwords; count++) {
 	if (fm->file_map[word] != ALL_ONES)
Index: squid/src/forward.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/forward.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/forward.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/forward.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: forward.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -68,6 +68,9 @@
     int sfd;
     debug(17, 3) ("fwdStateFree: %p\n", fwdState);
     assert(e->mem_obj);
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
     if (e->store_status == STORE_PENDING) {
 	if (e->mem_obj->inmem_hi == 0) {
 	    assert(fwdState->err);
@@ -108,7 +111,7 @@
 	return 0;
     if (fwdState->n_tries > 10)
 	return 0;
-    if (squid_curtime - fwdState->start > Config.Timeout.connect)
+    if (squid_curtime - fwdState->start > 120)
 	return 0;
     if (fwdState->flags.dont_retry)
 	return 0;
@@ -203,12 +206,6 @@
 	err->request = requestLink(fwdState->request);
 	err->xerrno = ETIMEDOUT;
 	fwdFail(fwdState, err);
-	/*
-	 * This marks the peer DOWN ... 
-	 */
-	if (fwdState->servers)
-	    if (fwdState->servers->peer)
-		peerCheckConnectStart(fwdState->servers->peer);
     }
     comm_close(fd);
 }
@@ -246,6 +243,9 @@
 	fwdConnectDone(fd, COMM_OK, fwdState);
 	return;
     }
+#if URL_CHECKSUM_DEBUG
+    assert(fwdState->entry->mem_obj->chksum == url_checksum(url));
+#endif
     fd = comm_open(SOCK_STREAM,
 	0,
 	Config.Addrs.tcp_outgoing,
@@ -375,6 +375,9 @@
     http_status s;
     assert(e->store_status == STORE_PENDING);
     assert(e->mem_obj);
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
     debug(17, 3) ("fwdReforward: %s?\n", storeUrl(e));
     if (!EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT)) {
 	debug(17, 3) ("fwdReforward: No, ENTRY_FWD_HDR_WAIT isn't set\n");
@@ -442,6 +445,9 @@
     debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e));
     e->mem_obj->request = requestLink(r);
     e->mem_obj->fd = fd;
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
     if (shutting_down) {
 	/* more yuck */
 	err = errorCon(ERR_SHUTTING_DOWN, HTTP_SERVICE_UNAVAILABLE);
@@ -486,6 +492,9 @@
     int rc = 0;
     if (mem == NULL)
 	return 0;
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
 #if DELAY_POOLS
     if (fd < 0)
 	(void) 0;
@@ -559,6 +568,9 @@
     assert(e->store_status == STORE_PENDING);
     debug(17, 3) ("fwdComplete: %s\n\tstatus %d\n", storeUrl(e),
 	e->mem_obj->reply->sline.status);
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
     fwdLogReplyStatus(fwdState->n_tries, e->mem_obj->reply->sline.status);
     if (fwdReforward(fwdState)) {
 	debug(17, 3) ("fwdComplete: re-forwarding %d %s\n",
Index: squid/src/fqdncache.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/fqdncache.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/fqdncache.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/fqdncache.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: fqdncache.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: fqdncache.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/ftp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ftp.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/ftp.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/ftp.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: ftp.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -568,8 +568,6 @@
 	ct = buf + 1;
 	p->type = 0;
 	while (ct && *ct) {
-	    long lt;
-	    time_t t;
 	    switch (*ct) {
 	    case '\t':
 		sscanf(ct + 1, "%[^,]", sbuf);
@@ -579,10 +577,8 @@
 		sscanf(ct + 1, "%d", &(p->size));
 		break;
 	    case 'm':
-		if (1 != sscanf(ct + 1, "%ld", &lt))
-		    break;
-		t = lt;
-		p->date = xstrdup(ctime(&t));
+		sscanf(ct + 1, "%d", &i);
+		p->date = xstrdup(ctime((time_t *) & i));
 		*(strstr(p->date, "\n")) = '\0';
 		break;
 	    case '/':
Index: squid/src/globals.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/globals.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/globals.h	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/globals.h	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: globals.h,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/gopher.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/gopher.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/gopher.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/gopher.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: gopher.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: gopher.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/htcp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/htcp.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/htcp.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/htcp.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: htcp.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: htcp.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 31    Hypertext Caching Protocol
  * AUTHOR: Duane Wesssels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -805,7 +805,7 @@
     debug(31, 3) ("htcpHandle: htcpHdr.major = %d\n", (int) htcpHdr.major);
     debug(31, 3) ("htcpHandle: htcpHdr.minor = %d\n", (int) htcpHdr.minor);
     if (sz != htcpHdr.length) {
-	debug(31, 1) ("htcpHandle: sz != htcpHdr.length\n");
+	debug(31, 0) ("htcpHandle: sz != htcpHdr.length\n");
 	return;
     }
     buf += sizeof(htcpHeader);
Index: squid/src/http.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/http.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/http.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/http.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: http.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -587,6 +587,9 @@
     ErrorState *err;
     debug(11, 5) ("httpSendComplete: FD %d: size %d: errflag %d.\n",
 	fd, size, errflag);
+#if URL_CHECKSUM_DEBUG
+    assert(entry->mem_obj->chksum == url_checksum(entry->mem_obj->url));
+#endif
     if (size > 0) {
 	fd_bytes(fd, size, FD_WRITE);
 	kb_incr(&Counter.server.all.kbytes_out, size);
@@ -851,9 +854,7 @@
     /*
      * Is keep-alive okay for all request methods?
      */
-    if (!Config.onoff.server_pconns)
-	httpState->flags.keepalive = 0;
-    else if (p == NULL)
+    if (p == NULL)
 	httpState->flags.keepalive = 1;
     else if (p->stats.n_keepalives_sent < 10)
 	httpState->flags.keepalive = 1;
Index: squid/src/icmp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icmp.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/icmp.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/icmp.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icmp.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: icmp.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/icp_v2.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icp_v2.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/icp_v2.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/icp_v2.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v2.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: icp_v2.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/icp_v3.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icp_v3.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/icp_v3.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/icp_v3.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v3.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: icp_v3.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/ident.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ident.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/ident.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/ident.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ident.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: ident.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 30    Ident (RFC 931)
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/internal.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/internal.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/internal.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/internal.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: internal.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: internal.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 76    Internal Squid Object handling
  * AUTHOR: Duane, Alex, Henrik
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/ipc.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ipc.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/ipc.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/ipc.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipc.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: ipc.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 54    Interprocess Communication
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/ipcache.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ipcache.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/ipcache.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/ipcache.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: ipcache.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/leakfinder.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/leakfinder.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/leakfinder.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/leakfinder.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: leakfinder.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: leakfinder.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -98,7 +98,7 @@
 }
 
 void *
-leakFree(void *p)
+leakFreeFL(void *p, const char *file, int line)
 {
     ptr *c = (ptr *) hash_lookup(htable, p);
     assert(p);
Index: squid/src/main.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/main.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/main.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/main.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: main.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -71,7 +71,8 @@
 #endif
 static EVH SquidShutdown;
 static void mainSetCwd(void);
-static int checkRunningPid(void);
+
+static const char *squid_start_script = "squid_start";
 
 #if TEST_ACCESS
 #include "test_access.c"
@@ -430,10 +431,6 @@
 static void
 mainInitialize(void)
 {
-    /* chroot if configured to run inside chroot */
-    if (Config.chroot_dir && chroot(Config.chroot_dir)) {
-	fatal("failed to chroot");
-    }
     if (opt_catch_signals) {
 	squid_signal(SIGSEGV, death, SA_NODEFER | SA_RESETHAND);
 	squid_signal(SIGBUS, death, SA_NODEFER | SA_RESETHAND);
@@ -514,8 +511,6 @@
 	else
 	    debug(1, 1) ("ICP port disabled in httpd_accelerator mode\n");
     }
-    if (Config.chroot_dir)
-	no_suid();
     if (!configured_once)
 	writePidFile();		/* write PID file */
 
@@ -615,9 +610,6 @@
 	if (opt_parse_cfg_only)
 	    return parse_err;
     }
-    if (-1 == opt_send_signal)
-	if (checkRunningPid())
-	    exit(1);
 
 #if TEST_ACCESS
     comm_init();
@@ -629,18 +621,10 @@
 
     /* send signal to running copy and exit */
     if (opt_send_signal != -1) {
-	/* chroot if configured to run inside chroot */
-	if (Config.chroot_dir && chroot(Config.chroot_dir)) {
-	    fatal("failed to chroot");
-	}
 	sendSignal();
 	/* NOTREACHED */
     }
     if (opt_create_swap_dirs) {
-	/* chroot if configured to run inside chroot */
-	if (Config.chroot_dir && chroot(Config.chroot_dir)) {
-	    fatal("failed to chroot");
-	}
 	setEffectiveUser();
 	debug(0, 0) ("Creating Swap Directories\n");
 	storeCreateSwapDirectories();
@@ -745,18 +729,41 @@
     exit(0);
 }
 
-static int
-checkRunningPid(void)
+/*
+ * This function is run when Squid is in daemon mode, just
+ * before the parent forks and starts up the child process.
+ * It can be used for admin-specific tasks, such as notifying
+ * someone that Squid is (re)started.
+ */
+static void
+mainStartScript(const char *prog)
 {
-    pid_t pid;
-    debug_log = stderr;
-    pid = readPidFile();
-    if (pid < 2)
-	return 0;
-    if (kill(pid, 0) < 0)
-	return 0;
-    debug(0, 0) ("Squid is already running!  Process ID %d\n", pid);
-    return 1;
+    char script[SQUID_MAXPATHLEN];
+    char *t;
+    size_t sl = 0;
+    pid_t cpid;
+    pid_t rpid;
+    xstrncpy(script, prog, MAXPATHLEN);
+    if ((t = strrchr(script, '/'))) {
+	*(++t) = '\0';
+	sl = strlen(script);
+    }
+    xstrncpy(&script[sl], squid_start_script, MAXPATHLEN - sl);
+    if ((cpid = fork()) == 0) {
+	/* child */
+	execl(script, squid_start_script, 0);
+	_exit(0);
+    } else {
+	do {
+#ifdef _SQUID_NEXT_
+	    union wait status;
+	    rpid = wait3(&status, 0, NULL);
+#else
+	    int status;
+	    rpid = waitpid(-1, &status, 0);
+#endif
+	} while (rpid != cpid);
+    }
 }
 
 static void
@@ -782,7 +789,6 @@
 	exit(0);
     if (setsid() < 0)
 	syslog(LOG_ALERT, "setsid failed: %s", xstrerror());
-    closelog();
 #ifdef TIOCNOTTY
     if ((i = open("/dev/tty", O_RDWR)) >= 0) {
 	ioctl(i, TIOCNOTTY, NULL);
@@ -792,16 +798,15 @@
     for (i = 0; i < Squid_MaxFD; i++)
 	close(i);
     for (;;) {
+	mainStartScript(argv[0]);
 	if ((pid = fork()) == 0) {
 	    /* child */
-	    openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
 	    prog = xstrdup(argv[0]);
 	    argv[0] = xstrdup("(squid)");
 	    execvp(prog, argv);
 	    syslog(LOG_ALERT, "execvp failed: %s", xstrerror());
 	}
 	/* parent */
-	openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
 	syslog(LOG_NOTICE, "Squid Parent: child process %d started", pid);
 	time(&start);
 	squid_signal(SIGINT, SIG_IGN, SA_RESTART);
Index: squid/src/mem.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/mem.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/mem.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/mem.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: mem.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 13    High Level Memory Pool Management
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/mime.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/mime.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/mime.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/mime.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mime.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: mime.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/multicast.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/multicast.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/multicast.c	20 Apr 2000 18:22:00 -0000	1.1.1.2
+++ squid/src/multicast.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: multicast.c,v 1.1.1.2 2000/04/20 18:22:00 hno Exp $
+ * $Id: multicast.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 7     Multicast
  * AUTHOR: Martin Hamilton
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/neighbors.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/neighbors.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/neighbors.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/neighbors.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: neighbors.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/net_db.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/net_db.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/net_db.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/net_db.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: net_db.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/pconn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/pconn.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/pconn.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/pconn.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pconn.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: pconn.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 48    Persistent Connections
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/peer_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/peer_digest.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/peer_digest.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/peer_digest.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_digest.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: peer_digest.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 72    Peer Digest Routines
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/peer_select.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/peer_select.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/peer_select.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/peer_select.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: peer_select.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -357,11 +357,10 @@
 static void
 peerGetSomeNeighborReplies(ps_state * ps)
 {
-    StoreEntry *entry = ps->entry;
     request_t *request = ps->request;
     peer *p = NULL;
     hier_code code = HIER_NONE;
-    assert(entry->ping_status == PING_WAITING);
+    assert(ps->entry->ping_status == PING_WAITING);
     assert(ps->direct != DIRECT_YES);
     if (peerCheckNetdbDirect(ps)) {
 	code = CLOSEST_DIRECT;
Index: squid/src/pinger.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/pinger.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/pinger.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/pinger.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pinger.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: pinger.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 42    ICMP Pinger program
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/protos.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/protos.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/protos.h	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/protos.h	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: protos.h,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -111,12 +111,14 @@
 extern void cbdataInit(void);
 #if CBDATA_DEBUG
 extern void cbdataAddDbg(const void *p, CBDUNL *, int, const char *, int);
+extern void cbdataLockDbg(const void *p, const char *, int);
+extern void cbdataUnlockDbg(const void *p, const char *, int);
 #else
 extern void cbdataAdd(const void *p, CBDUNL *, int);
-#endif
-extern void cbdataFree(void *p);
 extern void cbdataLock(const void *p);
 extern void cbdataUnlock(const void *p);
+#endif
+extern void cbdataFree(void *p);
 extern int cbdataValid(const void *p);
 extern CBDUNL cbdataXfree;
 
@@ -372,7 +374,6 @@
 extern void httpHeaderDestroyFieldsInfo(HttpHeaderFieldInfo * info, int count);
 extern int httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * attrs, int end);
 extern int httpHeaderIdByNameDef(const char *name, int name_len);
-extern const char *httpHeaderNameById(int id);
 extern void httpHeaderMaskInit(HttpHeaderMask * mask, int value);
 extern void httpHeaderCalcMask(HttpHeaderMask * mask, const int *enums, int count);
 extern int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
@@ -727,6 +728,8 @@
 extern double stat5minCPUUsage(void);
 extern const char *storeEntryFlags(const StoreEntry *);
 extern double statRequestHitRatio(int minutes);
+extern double statRequestHitMemoryRatio(int minutes);
+extern double statRequestHitDiskRatio(int minutes);
 extern double statByteHitRatio(int minutes);
 
 
@@ -859,6 +862,7 @@
 extern int storeTooManyDiskFilesOpen(void);
 extern void storeEntryReset(StoreEntry *);
 extern void storeHeapPositionUpdate(StoreEntry *);
+extern void storeSwapFileNumberSet(StoreEntry * e, sfileno filn);
 
 /* store_io.c */
 extern STOBJOPEN storeOpen;
@@ -888,6 +892,19 @@
 extern void storeAufsUnlink(int fileno);
 #endif
 
+#if USE_DISKD
+/*
+ * diskd.c
+ */
+extern storeIOState *storeDiskdOpen(sfileno, mode_t, STIOCB *, void *);
+extern void storeDiskdClose(storeIOState * sio);
+extern void storeDiskdRead(storeIOState *, char *, size_t, off_t, STRCB *, void *);
+extern void storeDiskdWrite(storeIOState *, char *, size_t, off_t, FREE *);
+extern void storeDiskdUnlink(int fileno);
+extern STINIT storeDiskdInit;
+extern void storeDiskdReadQueue(void);
+#endif
+
 /*
  * store_log.c
  */
@@ -950,6 +967,8 @@
 extern void storeDirOpenSwapLogs(void);
 extern void storeDirSwapLog(const StoreEntry *, int op);
 extern void storeDirUpdateSwapSize(int fn, size_t size, int sign);
+extern void storeDirLRUDelete(StoreEntry *);
+extern void storeDirLRUAdd(StoreEntry *);
 
 /*
  * store_dir_ufs.c
@@ -959,9 +978,13 @@
 extern void storeUfsDirDump(StoreEntry * entry, const char *name, SwapDir * s);
 extern void storeUfsDirFree(SwapDir *);
 extern char *storeUfsFullPath(sfileno fn, char *fullpath);
+extern STINIT storeUfsDirInit;
 #if USE_ASYNC_IO
 extern void storeAufsDirParse(cacheSwap * swap);
 #endif
+#if USE_DISKD
+extern void storeDiskdDirParse(cacheSwap *);
+#endif
 
 
 /*
@@ -1202,7 +1225,7 @@
 extern void leakInit(void);
 extern void *leakAddFL(void *, const char *, int);
 extern void *leakTouchFL(void *, const char *, int);
-extern void *leakFree(void *);
+extern void *leakFreeFL(void *, const char *, int);
 #endif
 
 /*
@@ -1214,3 +1237,7 @@
 extern int getpagesize(void);
 extern int gethostname(char *, int);
 #endif
+
+#if URL_CHECKSUM_DEBUG
+extern unsigned int url_checksum(const char *url);
+#endif
Index: squid/src/pump.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/pump.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/pump.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/pump.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: pump.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: pump.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 61    PUMP handler
  * AUTHOR: Kostas Anagnostakis
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/recv-announce.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/recv-announce.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/recv-announce.c	20 Apr 2000 18:22:00 -0000	1.1.1.2
+++ squid/src/recv-announce.c	20 Apr 2000 21:57:34 -0000	1.1.1.3
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: recv-announce.c,v 1.1.1.2 2000/04/20 18:22:00 hno Exp $
+ * $Id: recv-announce.c,v 1.1.1.3 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 0     Announcement Server
  * AUTHOR: Harvest Derived
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/redirect.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/redirect.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/redirect.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/redirect.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: redirect.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: redirect.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 29    Redirector
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -108,7 +108,6 @@
 	memset(&ch, '\0', sizeof(ch));
 	ch.src_addr = http->conn->peer.sin_addr;
 	ch.my_addr = http->conn->me.sin_addr;
-	ch.my_port = ntohs(http->conn->me.sin_port);
 	ch.request = http->request;
 	if (!aclCheckFast(Config.accessList.redirector, &ch)) {
 	    /* denied -- bypass redirector */
Index: squid/src/refresh.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/refresh.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/refresh.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/refresh.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: refresh.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: refresh.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/send-announce.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/send-announce.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/send-announce.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/send-announce.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: send-announce.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: send-announce.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 27    Cache Announcer
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/snmp_agent.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/snmp_agent.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/snmp_agent.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/snmp_agent.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_agent.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: snmp_agent.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 49     SNMP Interface
  * AUTHOR: Kostas Anagnostakis
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/snmp_core.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/snmp_core.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/snmp_core.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/snmp_core.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_core.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: snmp_core.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 49    SNMP support
  * AUTHOR: Glenn Chisholm
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/squid.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/squid.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/squid.h	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/squid.h	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: squid.h,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -81,6 +81,8 @@
 
 #if PURIFY
 #define assert(EX) ((void)0)
+#elif defined(NODEBUG)
+#define assert(EX) ((void)0)
 #elif STDC_HEADERS
 #define assert(EX)  ((EX)?((void)0):xassert( # EX , __FILE__, __LINE__))
 #else
@@ -314,11 +316,14 @@
 
 #if CBDATA_DEBUG
 #define cbdataAdd(a,b,c)	cbdataAddDbg(a,b,c,__FILE__,__LINE__)
+#define cbdataLock(a)		cbdataLockDbg(a,__FILE__,__LINE__)
+#define cbdataUnlock(a)		cbdataUnlockDbg(a,__FILE__,__LINE__)
 #endif
 
 #if USE_LEAKFINDER
 #define leakAdd(p) leakAddFL(p,__FILE__,__LINE__)
 #define leakTouch(p) leakTouchFL(p,__FILE__,__LINE__)
+#define leakFree(p) leakFreeFL(p,__FILE__,__LINE__)
 #else
 #define leakAdd(p) p
 #define leakTouch(p) p
Index: squid/src/ssl.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ssl.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/ssl.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/ssl.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ssl.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: ssl.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/stat.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/stat.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/stat.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/stat.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: stat.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -485,6 +485,12 @@
     storeAppendPrintf(sentry, "\tByte Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
 	statByteHitRatio(5),
 	statByteHitRatio(60));
+    storeAppendPrintf(sentry, "\tRequest Memory Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
+	statRequestHitMemoryRatio(5),
+	statRequestHitMemoryRatio(60));
+    storeAppendPrintf(sentry, "\tRequest Disk Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
+	statRequestHitDiskRatio(5),
+	statRequestHitDiskRatio(60));
     storeAppendPrintf(sentry, "\tStorage Swap size:\t%d KB\n",
 	store_swap_size);
     storeAppendPrintf(sentry, "\tStorage Mem size:\t%d KB\n",
@@ -1290,6 +1296,26 @@
 }
 
 extern double
+statRequestHitMemoryRatio(int minutes)
+{
+    assert(minutes < N_COUNT_HIST);
+    return dpercent(CountHist[0].client_http.mem_hits -
+	CountHist[minutes].client_http.mem_hits,
+	CountHist[0].client_http.hits -
+	CountHist[minutes].client_http.hits);
+}
+
+extern double
+statRequestHitDiskRatio(int minutes)
+{
+    assert(minutes < N_COUNT_HIST);
+    return dpercent(CountHist[0].client_http.disk_hits -
+	CountHist[minutes].client_http.disk_hits,
+	CountHist[0].client_http.hits -
+	CountHist[minutes].client_http.hits);
+}
+
+extern double
 statByteHitRatio(int minutes)
 {
     size_t s;
Index: squid/src/stmem.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/stmem.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/stmem.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/stmem.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stmem.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: stmem.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 19    Store Memory Primitives
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/store.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/store.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/store.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: store.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -109,12 +109,30 @@
 static int store_swap_low = 0;
 static Stack LateReleaseStack;
 
+#if URL_CHECKSUM_DEBUG
+unsigned int
+url_checksum(const char *url)
+{
+    unsigned int ck;
+    MD5_CTX M;
+    static unsigned char digest[16];
+    MD5Init(&M);
+    MD5Update(&M, (unsigned char *) url, strlen(url));
+    MD5Final(digest, &M);
+    xmemcpy(&ck, digest, sizeof(ck));
+    return ck;
+}
+#endif
+
 static MemObject *
 new_MemObject(const char *url, const char *log_url)
 {
     MemObject *mem = memAllocate(MEM_MEMOBJECT);
     mem->reply = httpReplyCreate();
     mem->url = xstrdup(url);
+#if URL_CHECKSUM_DEBUG
+    mem->chksum = url_checksum(mem->url);
+#endif
     mem->log_url = xstrdup(log_url);
     mem->object_sz = -1;
     mem->fd = -1;
@@ -132,6 +150,7 @@
 	e->mem_obj = new_MemObject(url, log_url);
     debug(20, 3) ("new_StoreEntry: returning %p\n", e);
     e->expires = e->lastmod = e->lastref = e->timestamp = -1;
+    e->swap_file_number = -1;
     return e;
 }
 
@@ -141,6 +160,9 @@
     MemObject *mem = e->mem_obj;
     const Ctx ctx = ctx_enter(mem->url);
     debug(20, 3) ("destroy_MemObject: destroying %p\n", mem);
+#if URL_CHECKSUM_DEBUG
+    assert(mem->chksum == url_checksum(mem->url));
+#endif
     e->mem_obj = NULL;
     if (!shutting_down)
 	assert(mem->swapout.sio == NULL);
@@ -189,8 +211,6 @@
 	e->node = heap_insert(store_heap, e);
 	debug(20, 4) ("storeHashInsert: inserted node %p\n", e->node);
     }
-#else
-    dlinkAdd(e, &e->lru, &store_list);
 #endif
 }
 
@@ -204,8 +224,6 @@
 	heap_delete(store_heap, e->node);
 	e->node = NULL;
     }
-#else
-    dlinkDelete(&e->lru, &store_list);
 #endif
     storeKeyFree(e->key);
     e->key = NULL;
@@ -243,8 +261,8 @@
 	 */
 	debug(20, 4) ("storeLockObject: just locked node %p\n", e->node);
 #else
-	dlinkDelete(&e->lru, &store_list);
-	dlinkAdd(e, &e->lru, &store_list);
+	storeDirLRUDelete(e);
+	storeDirLRUAdd(e);
 #endif
     }
     debug(20, 3) ("storeLockObject: key '%s' count=%d\n",
@@ -283,6 +301,9 @@
     assert(storePendingNClients(e) == 0);
 #if HEAP_REPLACEMENT
     storeHeapPositionUpdate(e);
+#else
+    storeDirLRUDelete(e);
+    storeDirLRUAdd(e);
 #endif
     if (EBIT_TEST(e->flags, RELEASE_REQUEST))
 	storeRelease(e);
@@ -292,19 +313,8 @@
 	e->mem_obj->request = NULL;
     } else {
 	storePurgeMem(e);
-	if (EBIT_TEST(e->flags, KEY_PRIVATE)) {
-#if HEAP_REPLACEMENT
-	    /*
-	     * Squid/LRU is moving things around in the linked list in order
-	     * to keep from bumping into them when purging from the LRU list.
-	     */
-	    debug(20, 4) ("storeUnlockObject: purged private node %p\n",
-		e->node);
-#else
-	    dlinkDelete(&e->lru, &store_list);
-	    dlinkAddTail(e, &e->lru, &store_list);
-#endif
-	}
+	if (EBIT_TEST(e->flags, KEY_PRIVATE))
+	    debug(20, 1) ("WARNING: %s:%d: found KEY_PRIVATE\n", __FILE__, __LINE__);
     }
     return 0;
 }
@@ -504,7 +514,6 @@
 	int private_key;
 	int too_many_open_files;
 	int too_many_open_fds;
-	int lru_age_too_low;
     } no;
     struct {
 	int Default;
@@ -565,18 +574,6 @@
     } else if (fdNFree() < RESERVED_FD) {
 	debug(20, 2) ("storeCheckCachable: NO: too many FD's open\n");
 	store_check_cachable_hist.no.too_many_open_fds++;
-#if HEAP_REPLACEMENT
-	/*
-	 * With the HEAP-based replacement policies a low reference
-	 * age should not prevent cacheability of an object.  We
-	 * do not use LRU age at all.
-	 */
-#else
-    } else if (storeExpiredReferenceAge() < 300) {
-	debug(20, 2) ("storeCheckCachable: NO: LRU Age = %d\n",
-	    storeExpiredReferenceAge());
-	store_check_cachable_hist.no.lru_age_too_low++;
-#endif
     } else {
 	store_check_cachable_hist.yes.Default++;
 	return 1;
@@ -609,8 +606,6 @@
 	store_check_cachable_hist.no.too_many_open_files);
     storeAppendPrintf(sentry, "no.too_many_open_fds\t%d\n",
 	store_check_cachable_hist.no.too_many_open_fds);
-    storeAppendPrintf(sentry, "no.lru_age_too_low\t%d\n",
-	store_check_cachable_hist.no.lru_age_too_low);
     storeAppendPrintf(sentry, "yes.default\t%d\n",
 	store_check_cachable_hist.yes.Default);
 }
@@ -711,8 +706,6 @@
     pages_needed = (size / SM_PAGE_SIZE) + 1;
     if (memInUse(MEM_STMEM_BUF) + pages_needed < store_pages_max)
 	return;
-    if (store_dirs_rebuilding)
-	return;
     debug(20, 2) ("storeGetMemSpace: Starting, need %d pages\n", pages_needed);
 #if HEAP_REPLACEMENT
     while (heap_nodes(inmem_heap) > 0) {
@@ -790,11 +783,13 @@
     int expired = 0;
     int max_scan;
     int max_remove;
+    int i;
+    int j;
+    static int ndir = 0;
     double f;
     static time_t last_warn_time = 0;
 #if !HEAP_REPLACEMENT
-    dlink_node *m;
-    dlink_node *prev = NULL;
+    SwapDir *sd;
 #else
     heap_key age;
     heap_key min_age = 0.0;
@@ -813,7 +808,8 @@
 	f = (double) (store_swap_size - store_swap_low) / (store_swap_high - store_swap_low);
 	f = f < 0.0 ? 0.0 : f > 1.0 ? 1.0 : f;
 	max_scan = (int) (f * 400.0 + 100.0);
-	max_remove = (int) (f * 70.0 + 10.0);
+	if ((max_remove = stat5minClientRequests()) < 10)
+	    max_remove = 10;
 	eventAdd("MaintainSwapSpace", storeMaintainSwapSpace, NULL, 1.0 - f, 1);
     }
     debug(20, 3) ("storeMaintainSwapSpace: f=%f, max_scan=%d, max_remove=%d\n",
@@ -884,32 +880,50 @@
     while ((e = linklistShift(&locked_entries)))
 	e->node = heap_insert(store_heap, e);
 #else
-    for (m = store_list.tail; m; m = prev) {
-	prev = m->prev;
-	e = m->data;
-	scanned++;
-	if (storeEntryLocked(e)) {
-	    /*
-	     * If there is a locked entry at the tail of the LRU list,
-	     * move it to the beginning to get it out of the way.
-	     * Theoretically, we might have all locked objects at the
-	     * tail, and then we'll never remove anything here and the
-	     * LRU age will go to zero.
-	     */
-	    if (memInUse(MEM_STOREENTRY) > max_scan) {
-		dlinkDelete(&e->lru, &store_list);
-		dlinkAdd(e, &e->lru, &store_list);
+    for (i = 0; i < Config.cacheSwap.n_configured; i++) {
+	sd = &Config.cacheSwap.swapDirs[i];
+	sd->lru_walker = sd->lru_list.tail;
+    }
+    do {
+	j = 0;
+	for (i = 0; i < Config.cacheSwap.n_configured; i++) {
+	    if (ndir >= Config.cacheSwap.n_configured)
+		ndir = ndir % Config.cacheSwap.n_configured;
+	    sd = &Config.cacheSwap.swapDirs[ndir++];
+	    if (sd->cur_size < sd->high_size)
+		continue;
+	    if (NULL == sd->lru_walker)
+		continue;
+	    e = sd->lru_walker->data;
+	    sd->lru_walker = sd->lru_walker->prev;
+	    j++;
+	    scanned++;
+	    sd->scanned++;
+	    if (storeEntryLocked(e)) {
+		/*
+		 * If there is a locked entry at the tail of the LRU list,
+		 * move it to the beginning to get it out of the way.
+		 * Theoretically, we might have all locked objects at the
+		 * tail, and then we'll never remove anything here and the
+		 * LRU age will go to zero.
+		 */
+		if (memInUse(MEM_STOREENTRY) > max_scan) {
+		    storeDirLRUDelete(e);
+		    if (!EBIT_TEST(e->flags, ENTRY_SPECIAL))
+			storeDirLRUAdd(e);
+		}
+		locked++;
+	    } else if (storeCheckExpired(e)) {
+		expired++;
+		sd->removals++;
+		storeRelease(e);
 	    }
-	    locked++;
-	} else if (storeCheckExpired(e)) {
-	    expired++;
-	    storeRelease(e);
+	    if (expired >= max_remove)
+		break;
+	    if (scanned >= max_scan)
+		break;
 	}
-	if (expired >= max_remove)
-	    break;
-	if (scanned >= max_scan)
-	    break;
-    }
+    } while (j > 0 && expired < max_remove && scanned < max_scan);
 #endif
     debug(20, (expired ? 2 : 3)) ("storeMaintainSwapSpace: scanned %d/%d removed %d/%d locked %d f=%.03f\n",
 	scanned, max_scan, expired, max_remove, locked, f);
@@ -953,18 +967,19 @@
 	 * we'll just call storeUnlockObject() on these.
 	 */
 	e->lock_count++;
+	EBIT_SET(e->flags, RELEASE_REQUEST);
 	stackPush(&LateReleaseStack, e);
 	return;
     }
     storeLog(STORE_LOG_RELEASE, e);
     if (e->swap_file_number > -1) {
 	storeUnlink(e->swap_file_number);
-	storeDirMapBitReset(e->swap_file_number);
 	if (e->swap_status == SWAPOUT_DONE)
 	    if (EBIT_TEST(e->flags, ENTRY_VALIDATED))
 		storeDirUpdateSwapSize(e->swap_file_number, e->swap_file_sz, -1);
 	if (!EBIT_TEST(e->flags, KEY_PRIVATE))
 	    storeDirSwapLog(e, SWAP_LOG_DEL);
+	storeSwapFileNumberSet(e, -1);
     }
     storeSetMemStatus(e, NOT_IN_MEMORY);
     destroy_StoreEntry(e);
@@ -1116,7 +1131,6 @@
 	store_heap = new_heap(10000, HeapKeyGen_StoreEntry_GDSF);
     }
 #else
-    store_list.head = store_list.tail = NULL;
     inmem_list.head = inmem_list.tail = NULL;
 #endif
     stackInit(&LateReleaseStack);
@@ -1161,17 +1175,7 @@
 	return 1;
     if (EBIT_TEST(e->flags, ENTRY_NEGCACHED) && squid_curtime >= e->expires)
 	return 1;
-#if HEAP_REPLACEMENT
-    /*
-     * With HEAP_REPLACEMENT we are not using the LRU reference age, the heap
-     * controls the replacement of objects.
-     */
     return 1;
-#else
-    if (squid_curtime - e->lastref > storeExpiredReferenceAge())
-	return 1;
-    return 0;
-#endif
 }
 
 #if !HEAP_REPLACEMENT
@@ -1250,24 +1254,9 @@
 {
     const HttpReply *reply = entry->mem_obj->reply;
     time_t served_date = reply->date;
-    int age = httpHeaderGetInt(&reply->header, HDR_AGE);
-    /*
-     * The timestamp calculations below tries to mimic the properties
-     * of the age calculation in RFC2616 section 13.2.3. The implementaion
-     * isn't complete, and the most notable exception from the RFC is that
-     * this does not account for response_delay, but it probably does
-     * not matter much as this is calculated immediately when the headers
-     * are received, not when the whole response has been received.
-     */
     /* make sure that 0 <= served_date <= squid_curtime */
     if (served_date < 0 || served_date > squid_curtime)
 	served_date = squid_curtime;
-    /*
-     * Compensate with Age header if origin server clock is ahead of us
-     * and there is a cache in between us and the origin server
-     */
-    if (age > squid_curtime - served_date)
-	served_date = squid_curtime - age;
     entry->expires = reply->expires;
     entry->lastmod = reply->last_modified;
     entry->timestamp = served_date;
@@ -1470,3 +1459,20 @@
 	heap_update(inmem_heap, e->mem_obj->node, e);
 }
 #endif
+
+void
+storeSwapFileNumberSet(StoreEntry * e, sfileno filn)
+{
+    if (e->swap_file_number == filn)
+	return;
+    if (filn < 0) {
+	assert(-1 == filn);
+	storeDirMapBitReset(e->swap_file_number);
+	storeDirLRUDelete(e);
+	e->swap_file_number = -1;
+    } else {
+	assert(-1 == e->swap_file_number);
+	storeDirMapBitSet(e->swap_file_number = filn);
+	storeDirLRUAdd(e);
+    }
+}
Index: squid/src/store_client.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_client.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/store_client.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/store_client.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_client.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -43,6 +43,7 @@
 static STRCB storeClientReadBody;
 static STRCB storeClientReadHeader;
 static void storeClientCopy2(StoreEntry * e, store_client * sc);
+static void storeClientCopy3(StoreEntry * e, store_client * sc);
 static void storeClientFileRead(store_client * sc);
 static EVH storeClientCopyEvent;
 static store_client_t storeClientType(StoreEntry *);
@@ -146,6 +147,19 @@
 }
 
 static void
+storeClientCallback(store_client * sc, ssize_t sz)
+{
+    STCB *callback = sc->callback;
+    char *buf = sc->copy_buf;
+    assert(sc->callback);
+    assert(sc->copy_buf);
+    sc->callback = NULL;
+    sc->copy_buf = NULL;
+    if (cbdataValid(sc->callback_data))
+	callback(sc->callback_data, buf, sz);
+}
+
+static void
 storeClientCopyEvent(void *data)
 {
     store_client *sc = data;
@@ -212,9 +226,6 @@
 static void
 storeClientCopy2(StoreEntry * e, store_client * sc)
 {
-    STCB *callback = sc->callback;
-    MemObject *mem = e->mem_obj;
-    size_t sz;
     if (sc->flags.copy_event_pending)
 	return;
     if (EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT)) {
@@ -230,7 +241,7 @@
     cbdataLock(sc);		/* ick, prevent sc from getting freed */
     sc->flags.store_copying = 1;
     debug(20, 3) ("storeClientCopy2: %s\n", storeKeyText(e->key));
-    assert(callback != NULL);
+    assert(sc->callback != NULL);
     /*
      * We used to check for ENTRY_ABORTED here.  But there were some
      * problems.  For example, we might have a slow client (or two) and
@@ -238,54 +249,75 @@
      * if the server-side aborts, we want to give the client(s)
      * everything we got before the abort condition occurred.
      */
+    storeClientCopy3(e, sc);
+    sc->flags.store_copying = 0;
+    cbdataUnlock(sc);		/* ick, allow sc to be freed */
+}
+
+static void
+storeClientCopy3(StoreEntry * e, store_client * sc)
+{
+    MemObject *mem = e->mem_obj;
+    size_t sz;
     if (storeClientNoMoreToSend(e, sc)) {
 	/* There is no more to send! */
-	sc->flags.disk_io_pending = 0;
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, 0);
-    } else if (e->store_status == STORE_PENDING && sc->seen_offset >= mem->inmem_hi) {
+	storeClientCallback(sc, 0);
+	return;
+    }
+    if (e->store_status == STORE_PENDING && sc->seen_offset >= mem->inmem_hi) {
 	/* client has already seen this, wait for more */
-	debug(20, 3) ("storeClientCopy2: Waiting for more\n");
-    } else if (sc->copy_offset >= mem->inmem_lo && sc->copy_offset < mem->inmem_hi) {
-	/* What the client wants is in memory */
-	debug(20, 3) ("storeClientCopy2: Copying from memory\n");
-	sz = stmemCopy(&mem->data_hdr, sc->copy_offset, sc->copy_buf, sc->copy_size);
-	sc->flags.disk_io_pending = 0;
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, sz);
-    } else if (sc->swapin_sio == NULL) {
-	debug(20, 3) ("storeClientCopy2: Need to open swap in file\n");
-	assert(sc->type == STORE_DISK_CLIENT);
+	debug(20, 3) ("storeClientCopy3: Waiting for more\n");
+	return;
+    }
+    /*
+     * Slight weirdness here.  We open a swapin file for any
+     * STORE_DISK_CLIENT, even if we can copy the requested chunk
+     * from memory in the next block.  We must try to open the
+     * swapin file before sending any data to the client side.  If
+     * we postpone the open, and then can not open the file later
+     * on, the client loses big time.  Its transfer just gets cut
+     * off.  Better to open it early (while the client side handler
+     * is clientCacheHit) so that we can fall back to a cache miss
+     * if needed.
+     */
+    if (STORE_DISK_CLIENT == sc->type && NULL == sc->swapin_sio) {
+	debug(20, 3) ("storeClientCopy3: Need to open swap in file\n");
 	/* gotta open the swapin file */
 	if (storeTooManyDiskFilesOpen()) {
 	    /* yuck -- this causes a TCP_SWAPFAIL_MISS on the client side */
-	    sc->callback = NULL;
-	    callback(sc->callback_data, sc->copy_buf, -1);
-	} else if (!sc->flags.disk_io_pending) {
-	    sc->flags.disk_io_pending = 1;
+	    storeClientCallback(sc, -1);
+	    return;
+	}
+	if (!sc->flags.disk_io_pending) {
 	    storeSwapInStart(sc);
 	    if (NULL == sc->swapin_sio) {
-		sc->flags.disk_io_pending = 0;
-		sc->callback = NULL;
-		callback(sc->callback_data, sc->copy_buf, -1);
-	    } else {
-		storeClientFileRead(sc);
+		storeClientCallback(sc, -1);
+		return;
 	    }
+	    /*
+	     * If the open succeeds we either copy from memory, or
+	     * schedule a disk read in the next block.
+	     */
 	} else {
-	    debug(20, 2) ("storeClientCopy2: Averted multiple fd operation\n");
-	}
-    } else {
-	debug(20, 3) ("storeClientCopy: reading from STORE\n");
-	assert(sc->type == STORE_DISK_CLIENT);
-	if (!sc->flags.disk_io_pending) {
-	    sc->flags.disk_io_pending = 1;
-	    storeClientFileRead(sc);
-	} else {
-	    debug(20, 2) ("storeClientCopy2: Averted multiple fd operation\n");
+	    debug(20, 1) ("WARNING: Averted multiple fd operation (1)\n");
+	    return;
 	}
     }
-    sc->flags.store_copying = 0;
-    cbdataUnlock(sc);		/* ick, allow sc to be freed */
+    if (sc->copy_offset >= mem->inmem_lo && sc->copy_offset < mem->inmem_hi) {
+	/* What the client wants is in memory */
+	debug(20, 3) ("storeClientCopy3: Copying from memory\n");
+	sz = stmemCopy(&mem->data_hdr,
+	    sc->copy_offset, sc->copy_buf, sc->copy_size);
+	storeClientCallback(sc, sz);
+	return;
+    }
+    assert(STORE_DISK_CLIENT == sc->type);
+    if (sc->flags.disk_io_pending) {
+	debug(20, 1) ("WARNING: Averted multiple fd operation (2)\n");
+	return;
+    }
+    debug(20, 3) ("storeClientCopy3: reading from STORE\n");
+    storeClientFileRead(sc);
 }
 
 static void
@@ -293,6 +325,8 @@
 {
     MemObject *mem = sc->entry->mem_obj;
     assert(sc->callback != NULL);
+    assert(!sc->flags.disk_io_pending);
+    sc->flags.disk_io_pending = 1;
     if (mem->swap_hdr_sz == 0) {
 	storeRead(sc->swapin_sio,
 	    sc->copy_buf,
@@ -317,15 +351,13 @@
 {
     store_client *sc = data;
     MemObject *mem = sc->entry->mem_obj;
-    STCB *callback = sc->callback;
     assert(sc->flags.disk_io_pending);
     sc->flags.disk_io_pending = 0;
     assert(sc->callback != NULL);
     debug(20, 3) ("storeClientReadBody: len %d\n", len);
     if (sc->copy_offset == 0 && len > 0 && mem->reply->sline.status == 0)
 	httpReplyParse(mem->reply, sc->copy_buf, headersEnd(sc->copy_buf, len));
-    sc->callback = NULL;
-    callback(sc->callback_data, sc->copy_buf, len);
+    storeClientCallback(sc, len);
 }
 
 static void
@@ -334,7 +366,6 @@
     store_client *sc = data;
     StoreEntry *e = sc->entry;
     MemObject *mem = e->mem_obj;
-    STCB *callback = sc->callback;
     int swap_hdr_sz = 0;
     size_t body_sz;
     size_t copy_sz;
@@ -347,22 +378,19 @@
     debug(20, 3) ("storeClientReadHeader: len %d\n", len);
     if (len < 0) {
 	debug(20, 3) ("storeClientReadHeader: %s\n", xstrerror());
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, len);
+	storeClientCallback(sc, len);
 	return;
     }
     tlv_list = storeSwapMetaUnpack(buf, &swap_hdr_sz);
     if (swap_hdr_sz > len) {
 	/* oops, bad disk file? */
-	debug(20, 1) ("WARNING: swapfile header too small\n");
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, -1);
+	debug(20, 1) ("storeClientReadHeader: header too small\n");
+	storeClientCallback(sc, -1);
 	return;
     }
     if (tlv_list == NULL) {
-	debug(20, 1) ("WARNING: failed to unpack swapfile meta data\n");
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, -1);
+	debug(20, 1) ("storeClientReadHeader: failed to unpack meta data\n");
+	storeClientCallback(sc, -1);
 	return;
     }
     /*
@@ -372,8 +400,11 @@
 	switch (t->type) {
 	case STORE_META_KEY:
 	    assert(t->length == MD5_DIGEST_CHARS);
-	    if (memcmp(t->value, e->key, MD5_DIGEST_CHARS))
+	    if (memcmp(t->value, e->key, MD5_DIGEST_CHARS)) {
 		debug(20, 1) ("WARNING: swapin MD5 mismatch\n");
+		debug(20, 1) ("\t%s\n", storeKeyText(t->value));
+		debug(20, 1) ("\t%s\n", storeKeyText(e->key));
+	    }
 	    break;
 	case STORE_META_URL:
 	    if (NULL == mem->url)
@@ -396,8 +427,7 @@
     }
     storeSwapTLVFree(tlv_list);
     if (!swap_object_ok) {
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, -1);
+	storeClientCallback(sc, -1);
 	return;
     }
     mem->swap_hdr_sz = swap_hdr_sz;
@@ -418,8 +448,7 @@
 	if (sc->copy_offset == 0 && len > 0 && mem->reply->sline.status == 0)
 	    httpReplyParse(mem->reply, sc->copy_buf,
 		headersEnd(sc->copy_buf, copy_sz));
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, copy_sz);
+	storeClientCallback(sc, copy_sz);
 	return;
     }
     /*
@@ -447,7 +476,6 @@
     MemObject *mem = e->mem_obj;
     store_client *sc;
     store_client **S;
-    STCB *callback;
     if (mem == NULL)
 	return 0;
     debug(20, 3) ("storeUnregister: called for '%s'\n", storeKeyText(e->key));
@@ -466,25 +494,24 @@
     }
     *S = sc->next;
     mem->nclients--;
-    sc->flags.disk_io_pending = 0;
     if (e->store_status == STORE_OK && e->swap_status != SWAPOUT_DONE)
 	storeSwapOut(e);
     if (sc->swapin_sio) {
 	storeClose(sc->swapin_sio);
+	cbdataUnlock(sc->swapin_sio);
 	sc->swapin_sio = NULL;
     }
-    if ((callback = sc->callback) != NULL) {
+    if (NULL != sc->callback) {
 	/* callback with ssize = -1 to indicate unexpected termination */
 	debug(20, 3) ("storeUnregister: store_client for %s has a callback\n",
 	    mem->url);
-	sc->callback = NULL;
-	if (cbdataValid(sc->callback_data))
-	    callback(sc->callback_data, sc->copy_buf, -1);
+	storeClientCallback(sc, -1);
     }
 #if DELAY_POOLS
     delayUnregisterDelayIdPtr(&sc->delay_id);
 #endif
     cbdataUnlock(sc->callback_data);	/* we're done with it now */
+    /*assert(!sc->flags.disk_io_pending);*/
     cbdataFree(sc);
     assert(e->lock_count > 0);
     if (mem->nclients == 0)
@@ -503,8 +530,9 @@
 	nx = sc->next;
 	if (sc->callback_data == NULL)	/* open slot */
 	    continue;
-	if (sc->type != STORE_MEM_CLIENT)
-	    continue;
+	if (sc->type == STORE_DISK_CLIENT)
+	    if (NULL != sc->swapin_sio)
+		continue;
 	if (sc->copy_offset < lowest)
 	    lowest = sc->copy_offset;
     }
Index: squid/src/store_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_digest.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/store_digest.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/store_digest.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: store_digest.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_digest.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 71    Store Digest Manager
  * AUTHOR: Alex Rousskov
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -221,9 +221,19 @@
 	    Config.digest.rebuild_period);
 	return 0;
     }
-    /* idea: how about also skipping very fresh (thus, potentially unstable) 
-     * entries? Should be configurable through cd_refresh_pattern, of course */
-
+    /*
+     * idea: how about also skipping very fresh (thus, potentially
+     * unstable) entries? Should be configurable through
+     * cd_refresh_pattern, of course.
+     */
+    /*
+     * idea: skip objects that are going to be purged before the next
+     * update.
+     */
+#if !HEAP_REPLACEMENT
+    if ((squid_curtime + Config.digest.rebuild_period) - e->lastref > storeExpiredReferenceAge())
+	return 0;
+#endif
     return 1;
 }
 
Index: squid/src/store_dir.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_dir.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/store_dir.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/store_dir.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_dir.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -35,6 +35,9 @@
 
 #include "squid.h"
 
+static void storeDirLRUWalkInitHead(SwapDir * sd);
+static void *storeDirLRUWalkNext(SwapDir * sd);
+
 const char *SwapDirType[] =
 {
     "ufs",
@@ -76,7 +79,72 @@
 }
 
 /*
- *Spread load across least 3/4 of the store directories
+ * This new selection scheme simply does round-robin on all SwapDirs.
+ * A SwapDir is skipped if it is over the max_size (100%) limit.  If
+ * all SwapDir's are above the limit, then the first dirn that we
+ * checked is returned.  Note that 'dirn' is guaranteed to advance even
+ * if all SwapDirs are full.
+ * 
+ * XXX This function does NOT account for the read_only flag!
+ */
+static int
+storeDirSelectSwapDir(void)
+{
+    static int dirn = 0;
+    int i;
+    SwapDir *sd;
+    /*
+     * yes, the '<=' is intentional.  If all dirs are full we want to
+     * make sure 'dirn' advances every time this gets called, otherwise
+     * we get stuck on one dir.
+     */
+    for (i = 0; i <= Config.cacheSwap.n_configured; i++) {
+	if (++dirn >= Config.cacheSwap.n_configured)
+	    dirn = 0;
+	sd = &Config.cacheSwap.swapDirs[dirn];
+	if (sd->cur_size > sd->max_size)
+	    continue;
+	return dirn;
+    }
+    return dirn;
+}
+
+#if USE_DISKD && EXPERIMENTAL
+/*
+ * This fileno selection function returns a fileno on the least
+ * busy SwapDir.  Ties are broken by selecting the SwapDir with
+ * the most free space.
+ */
+static int
+storeDirSelectSwapDir(void)
+{
+    SwapDir *SD;
+    int min_away = 10000;
+    int min_size = 1 << 30;
+    int dirn = 0;
+    int i;
+    for (i = 0; i < Config.cacheSwap.n_configured; i++) {
+	SD = &Config.cacheSwap.swapDirs[i];
+	if (SD->cur_size > SD->max_size)
+	    continue;
+	if (SD->u.diskd.away > min_away)
+	    continue;
+	if (SD->cur_size > min_size)
+	    continue;
+	if (SD->flags.read_only)
+	    continue;
+	min_away = SD->u.diskd.away;
+	min_size = SD->cur_size;
+	dirn = i;
+    }
+    return dirn;
+}
+#endif
+
+#if OLD
+/*
+ * This is Stew Forster's selection algorithm.
+ * Spread load across least 3/4 of the store directories
  */
 static int
 storeDirSelectSwapDir(void)
@@ -165,6 +233,7 @@
     dirq[0] = -1;
     return dirn;
 }
+#endif
 
 int
 storeDirValidFileno(int fn, int flag)
@@ -321,6 +390,8 @@
 	Config.Swap.maxSize += SD->max_size;
 	if (NULL == SD->map)
 	    SD->map = file_map_create();
+	SD->high_size = (int) (((float) SD->max_size *
+		(float) Config.Swap.highWaterMark) / 100.0);
     }
 }
 
@@ -372,11 +443,10 @@
     double dt;
     SwapDir *sd;
     int dirn;
-    int N = Config.cacheSwap.n_configured;
 #if HEAP_REPLACEMENT
     int node;
 #else
-    dlink_node *m;
+    int j;
 #endif
     if (store_dirs_rebuilding) {
 	debug(20, 1) ("Not currently OK to rewrite swap log.\n");
@@ -392,20 +462,15 @@
 	    debug(20, 1) ("log.clean.open() failed for dir #%d\n", sd->index);
 	    continue;
 	}
+#if !HEAP_REPLACEMENT
+	storeDirLRUWalkInitHead(sd);
+#endif
     }
 #if HEAP_REPLACEMENT
     if (NULL == store_heap)
 	return 0;
-    for (node = 0; node < heap_nodes(store_heap); node++)
-#else
-    for (m = store_list.tail; m; m = m->prev)
-#endif
-    {
-#if HEAP_REPLACEMENT
+    for (node = 0; node < heap_nodes(store_heap); node++) {
 	e = (StoreEntry *) heap_peep(store_heap, node);
-#else
-	e = m->data;
-#endif
 	if (e->swap_file_number < 0)
 	    continue;
 	if (e->swap_status != SWAPOUT_DONE)
@@ -435,6 +500,39 @@
 	    continue;
 	sd->log.clean.write(NULL, sd);
     }
+#else
+    do {
+	j = 0;
+	for (dirn = 0; dirn < Config.cacheSwap.n_configured; dirn++) {
+	    sd = &Config.cacheSwap.swapDirs[dirn];
+	    if (NULL == sd->log.clean.write)
+		continue;
+	    e = storeDirLRUWalkNext(sd);
+	    if (NULL == e) {
+		sd->log.clean.write(NULL, sd);
+		continue;
+	    }
+	    j++;
+	    if (e->swap_file_number < 0)
+		continue;
+	    if (e->swap_status != SWAPOUT_DONE)
+		continue;
+	    if (e->swap_file_sz <= 0)
+		continue;
+	    if (EBIT_TEST(e->flags, RELEASE_REQUEST))
+		continue;
+	    if (EBIT_TEST(e->flags, KEY_PRIVATE))
+		continue;
+	    if (EBIT_TEST(e->flags, ENTRY_SPECIAL))
+		continue;
+	    sd->log.clean.write(e, sd);
+	    if ((++n & 0xFFFF) == 0) {
+		getCurrentTime();
+		debug(20, 1) ("  %7d entries written so far.\n", n);
+	    }
+	}
+    } while (j > 0);
+#endif
     if (reopen)
 	storeDirOpenSwapLogs();
     getCurrentTime();
@@ -445,3 +543,40 @@
     return n;
 }
 #undef CLEAN_BUF_SZ
+
+void
+storeDirLRUDelete(StoreEntry * e)
+{
+    SwapDir *sd;
+    if (e->swap_file_number < 0)
+	return;
+    sd = &Config.cacheSwap.swapDirs[e->swap_file_number >> SWAP_DIR_SHIFT];
+    dlinkDelete(&e->lru, &sd->lru_list);
+}
+
+void
+storeDirLRUAdd(StoreEntry * e)
+{
+    SwapDir *sd;
+    if (e->swap_file_number < 0)
+	return;
+    sd = &Config.cacheSwap.swapDirs[e->swap_file_number >> SWAP_DIR_SHIFT];
+    dlinkAdd(e, &e->lru, &sd->lru_list);
+}
+
+static void
+storeDirLRUWalkInitHead(SwapDir * sd)
+{
+    sd->lru_walker = sd->lru_list.head;
+}
+
+static void *
+storeDirLRUWalkNext(SwapDir * sd)
+{
+    void *p;
+    if (NULL == sd->lru_walker)
+	return NULL;
+    p = sd->lru_walker->data;
+    sd->lru_walker = sd->lru_walker->next;
+    return p;
+}
Index: squid/src/store_dir_ufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_dir_ufs.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/store_dir_ufs.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/store_dir_ufs.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_dir_ufs.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -93,7 +93,6 @@
 static void storeUfsDirCloseTmpSwapLog(SwapDir * sd);
 static FILE *storeUfsDirOpenTmpSwapLog(SwapDir *, int *, int *);
 static STLOGOPEN storeUfsDirOpenSwapLog;
-static STINIT storeUfsDirInit;
 static STLOGCLEANOPEN storeUfsDirWriteCleanOpen;
 static void storeUfsDirWriteCleanClose(SwapDir * sd);
 static STLOGCLEANWRITE storeUfsDirWriteCleanEntry;
@@ -245,7 +244,7 @@
 	safe_free(ufs_dir_index);
 }
 
-static void
+void
 storeUfsDirInit(SwapDir * sd)
 {
     static int started_clean_event = 0;
@@ -280,8 +279,6 @@
     tlv *tlv_list;
     tlv *t;
     assert(rb != NULL);
-    if (opt_foreground_rebuild)
-	getCurrentTime();
     debug(20, 3) ("storeRebuildFromDirectory: DIR #%d\n", rb->sd->index);
     for (count = 0; count < rb->speed; count++) {
 	assert(fd == -1);
@@ -307,8 +304,8 @@
 	    fd = -1;
 	    continue;
 	}
-	if ((++rb->counts.scancount & 0xFFFF) == 0)
-	    debug(20, 3) ("  %s %7d files opened so far.\n",
+	if ((++rb->counts.scancount & 0x3FFF) == 0)
+	    debug(20, 1) ("  %s %7d files opened so far.\n",
 		rb->sd->path, rb->counts.scancount);
 	debug(20, 9) ("file_in: fd=%d %08X\n", fd, sfileno);
 	Counter.syscalls.disk.reads++;
@@ -400,7 +397,7 @@
 	    tmpe.flags,		/* flags */
 	    (int) rb->flags.clean);
     }
-    eventAdd("storeRebuild", storeRebuildFromDirectory, rb, 0.0, 1);
+    eventAdd("storeRebuild", storeRebuildFromDirectory, rb, 0.0, 0);
 }
 
 static void
@@ -451,10 +448,7 @@
 		 */
 		storeExpireNow(e);
 		storeReleaseRequest(e);
-		if (e->swap_file_number > -1) {
-		    storeDirMapBitReset(e->swap_file_number);
-		    e->swap_file_number = -1;
-		}
+		storeSwapFileNumberSet(e, -1);
 		rb->counts.objcount--;
 		rb->counts.cancelcount++;
 	    }
@@ -467,8 +461,8 @@
 	    rb->counts.invalid++;
 	    continue;
 	}
-	if ((++rb->counts.scancount & 0xFFFF) == 0)
-	    debug(20, 3) ("  %7d %s Entries read so far.\n",
+	if ((++rb->counts.scancount & 0x3FFF) == 0)
+	    debug(20, 1) ("  %7d %s Entries read so far.\n",
 		rb->counts.scancount, rb->sd->path);
 	if (!storeDirValidFileno(s.swap_file_number, 0)) {
 	    rb->counts.invalid++;
@@ -535,10 +529,7 @@
 	    /* junk old, load new */
 	    storeExpireNow(e);
 	    storeReleaseRequest(e);
-	    if (e->swap_file_number > -1) {
-		storeDirMapBitReset(e->swap_file_number);
-		e->swap_file_number = -1;
-	    }
+	    storeSwapFileNumberSet(e, -1);
 	    rb->counts.dupcount++;
 	} else {
 	    /* URL doesnt exist, swapfile not in use */
@@ -559,7 +550,7 @@
 	    (int) rb->flags.clean);
 	storeDirSwapLog(e, SWAP_LOG_ADD);
     }
-    eventAdd("storeRebuild", storeRebuildFromSwapLog, rb, 0.0, 1);
+    eventAdd("storeRebuild", storeRebuildFromSwapLog, rb, 0.0, 0);
 }
 
 static int
@@ -670,7 +661,7 @@
     e->store_status = STORE_OK;
     storeSetMemStatus(e, NOT_IN_MEMORY);
     e->swap_status = SWAPOUT_DONE;
-    e->swap_file_number = file_number;
+    storeSwapFileNumberSet(e, file_number);
     e->swap_file_sz = swap_file_sz;
     e->lock_count = 0;
 #if !HEAP_REPLACEMENT
@@ -687,7 +678,6 @@
     EBIT_CLR(e->flags, KEY_PRIVATE);
     e->ping_status = PING_NONE;
     EBIT_CLR(e->flags, ENTRY_VALIDATED);
-    storeDirMapBitSet(e->swap_file_number);
     storeHashInsert(e, key);	/* do it after we clear KEY_PRIVATE */
     return e;
 }
@@ -724,7 +714,7 @@
 	sd->path, clean ? "CLEAN" : "DIRTY");
     store_dirs_rebuilding++;
     cbdataAdd(rb, cbdataXfree, 0);
-    eventAdd("storeRebuild", func, rb, 0.0, 1);
+    eventAdd("storeRebuild", func, rb, 0.0, 0);
 }
 
 static void
@@ -788,6 +778,7 @@
 	debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror());
 	fatal("Failed to open swap log for reading");
     }
+    commSetCloseOnExec(fileno(fp));
     memset(&clean_sb, '\0', sizeof(struct stat));
     if (stat(clean_path, &clean_sb) < 0)
 	*clean_flag = 0;
@@ -883,8 +874,9 @@
 	    safe_free(state);
 	    sd->log.clean.state = NULL;
 	    sd->log.clean.write = NULL;
+	} else {
+	    state->outbuf_offset = 0;
 	}
-	state->outbuf_offset = 0;
     }
 }
 
@@ -1099,6 +1091,10 @@
 	return 1;
     if (sd->type == SWAPDIR_ASYNCUFS)
 	return 1;
+#if USE_DISKD
+    if (sd->type == SWAPDIR_DISKD)
+	return 1;
+#endif
     return 0;
 }
 
@@ -1144,12 +1140,15 @@
 	storeAppendPrintf(sentry, "First level subdirectories: %d\n", SD->u.ufs.l1);
 	storeAppendPrintf(sentry, "Second level subdirectories: %d\n", SD->u.ufs.l2);
 	storeAppendPrintf(sentry, "Maximum Size: %d KB\n", SD->max_size);
+	storeAppendPrintf(sentry, "HiWater Size: %d KB\n", SD->high_size);
 	storeAppendPrintf(sentry, "Current Size: %d KB\n", SD->cur_size);
 	storeAppendPrintf(sentry, "Percent Used: %0.2f%%\n",
 	    100.0 * SD->cur_size / SD->max_size);
 	storeAppendPrintf(sentry, "Filemap bits in use: %d of %d (%d%%)\n",
 	    SD->map->n_files_in_map, SD->map->max_n_files,
 	    percent(SD->map->n_files_in_map, SD->map->max_n_files));
+	storeAppendPrintf(sentry, "Removals: %d\n", SD->removals);
+	storeAppendPrintf(sentry, " Scanned: %d\n", SD->scanned);
 #if HAVE_STATVFS
 #define fsbtoblk(num, fsbs, bs) \
         (((fsbs) != 0 && (fsbs) < (bs)) ? \
@@ -1315,6 +1314,78 @@
 }
 #endif
 
+#if USE_DISKD
+void
+storeDiskdDirParse(cacheSwap * swap)
+{
+    char *token;
+    char *path;
+    int i;
+    int size;
+    int l1;
+    int l2;
+    unsigned int read_only = 0;
+    SwapDir *sd = NULL;
+    if ((path = strtok(NULL, w_space)) == NULL)
+	self_destruct();
+    i = GetInteger();
+    size = i << 10;		/* Mbytes to kbytes */
+    if (size <= 0)
+	fatal("storeUfsDirParse: invalid size value");
+    i = GetInteger();
+    l1 = i;
+    if (l1 <= 0)
+	fatal("storeUfsDirParse: invalid level 1 directories value");
+    i = GetInteger();
+    l2 = i;
+    if (l2 <= 0)
+	fatal("storeUfsDirParse: invalid level 2 directories value");
+    if ((token = strtok(NULL, w_space)))
+	if (!strcasecmp(token, "read-only"))
+	    read_only = 1;
+    for (i = 0; i < swap->n_configured; i++) {
+	sd = swap->swapDirs + i;
+	if (!strcmp(path, sd->path)) {
+	    /* just reconfigure it */
+	    if (size == sd->max_size)
+		debug(3, 1) ("Cache dir '%s' size remains unchanged at %d KB\n",
+		    path, size);
+	    else
+		debug(3, 1) ("Cache dir '%s' size changed to %d KB\n",
+		    path, size);
+	    sd->max_size = size;
+	    if (sd->flags.read_only != read_only)
+		debug(3, 1) ("Cache dir '%s' now %s\n",
+		    path, read_only ? "Read-Only" : "Read-Write");
+	    sd->flags.read_only = read_only;
+	    return;
+	}
+    }
+    allocate_new_swapdir(swap);
+    sd = swap->swapDirs + swap->n_configured;
+    sd->type = SWAPDIR_DISKD;
+    sd->index = swap->n_configured;
+    sd->path = xstrdup(path);
+    sd->max_size = size;
+    sd->u.ufs.l1 = l1;
+    sd->u.ufs.l2 = l2;
+    sd->u.ufs.swaplog_fd = -1;
+    sd->flags.read_only = read_only;
+    sd->init = storeDiskdInit;
+    sd->newfs = storeUfsDirNewfs;
+    sd->obj.open = storeDiskdOpen;
+    sd->obj.close = storeDiskdClose;
+    sd->obj.read = storeDiskdRead;
+    sd->obj.write = storeDiskdWrite;
+    sd->obj.unlink = storeDiskdUnlink;
+    sd->log.open = storeUfsDirOpenSwapLog;
+    sd->log.close = storeUfsDirCloseSwapLog;
+    sd->log.write = storeUfsDirSwapLog;
+    sd->log.clean.open = storeUfsDirWriteCleanOpen;
+    swap->n_configured++;
+}
+#endif
+
 void
 storeUfsDirDump(StoreEntry * entry, const char *name, SwapDir * s)
 {
Index: squid/src/store_heap_replacement.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_heap_replacement.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/store_heap_replacement.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/store_heap_replacement.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_heap_replacement.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_heap_replacement.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Heap-based replacement
  * AUTHOR: John Dilley
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/store_io_asyncufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_io_asyncufs.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/store_io_asyncufs.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/store_io_asyncufs.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -44,8 +44,6 @@
      * we should detect some 'too many files open' condition and return
      * NULL here.
      */
-    while (aioQueueSize() > MAGIC1)
-	return NULL;
     sio = memAllocate(MEM_STORE_IO);
     cbdataAdd(sio, memFree, MEM_STORE_IO);
     sio->type.aufs.fd = -1;
@@ -72,7 +70,7 @@
 	sio->type.aufs.flags.close_request = 1;
 	return;
     }
-    storeAufsIOCallback(sio, DISK_OK);
+    storeAufsIOCallback(sio, 0);
 }
 
 void
@@ -195,7 +193,7 @@
 	errno = errflag;
 	debug(78, 0) ("storeAufsOpenDone: %s\n", xstrerror());
 	debug(78, 1) ("\t%s\n", storeUfsFullPath(sio->swap_file_number, NULL));
-	storeAufsIOCallback(sio, DISK_ERROR);
+	storeAufsIOCallback(sio, errflag);
 	return;
     }
     sio->type.aufs.fd = fd;
@@ -250,8 +248,8 @@
     assert(++loop_detect < 10);
     sio->type.aufs.flags.writing = 0;
     if (errflag) {
-	debug(78, 3) ("storeAufsWriteDone: got failure (%d)\n", errflag);
-	storeAufsIOCallback(sio, DISK_ERROR);
+	debug(78, 0) ("storeAufsWriteDone: got failure (%d)\n", errflag);
+	storeAufsIOCallback(sio, errflag);
 	loop_detect--;
 	return;
     }
@@ -259,7 +257,7 @@
     if (storeAufsKickWriteQueue(sio))
 	(void) 0;
     else if (sio->type.aufs.flags.close_request)
-	storeAufsIOCallback(sio, DISK_OK);
+	storeAufsIOCallback(sio, errflag);
     loop_detect--;
 }
 
@@ -272,17 +270,21 @@
     debug(78, 3) ("storeAufsIOCallback: errflag=%d\n", errflag);
     sio->callback = NULL;
     sio->callback_data = NULL;
+    debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
     if (callback)
 	if (NULL == their_data || cbdataValid(their_data))
 	    callback(their_data, errflag, sio);
+    debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
     cbdataUnlock(their_data);
     sio->type.aufs.fd = -1;
     cbdataFree(sio);
     if (fd < 0)
 	return;
+    debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
     aioClose(fd);
     fd_close(fd);
     store_open_disk_fd--;
+    debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
 }
 
 
Index: squid/src/store_io_ufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_io_ufs.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/store_io_ufs.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/store_io_ufs.c	20 Apr 2000 21:57:34 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_ufs.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_io_ufs.c,v 1.1.1.4 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 79    Storage Manager UFS Interface
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/store_key_md5.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_key_md5.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/store_key_md5.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/store_key_md5.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_key_md5.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_key_md5.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 20    Storage Manager MD5 Cache Keys
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/store_log.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_log.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/store_log.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/store_log.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_log.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_log.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Logging Functions
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/store_rebuild.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_rebuild.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/store_rebuild.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/store_rebuild.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_rebuild.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_rebuild.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 20    Store Rebuild Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -83,7 +83,7 @@
     hash_link *link_ptr = NULL;
     hash_link *link_next = NULL;
     validnum_start = validnum;
-    while (validnum - validnum_start < 50) {
+    while (validnum - validnum_start < 500) {
 	if (++bucketnum >= store_hash_buckets) {
 	    debug(20, 1) ("  Completed Validation Procedure\n");
 	    debug(20, 1) ("  Validated %d Entries\n", validnum);
Index: squid/src/store_swapin.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapin.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/store_swapin.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/store_swapin.c	20 Apr 2000 21:57:34 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapin.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_swapin.c,v 1.1.1.6 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapin Functions
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/store_swapmeta.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapmeta.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -r1.1.1.4 -r1.1.1.5
--- squid/src/store_swapmeta.c	20 Apr 2000 18:22:00 -0000	1.1.1.4
+++ squid/src/store_swapmeta.c	20 Apr 2000 21:57:34 -0000	1.1.1.5
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapmeta.c,v 1.1.1.4 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_swapmeta.c,v 1.1.1.5 2000/04/20 21:57:34 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -64,11 +64,10 @@
 tlv *
 storeSwapMetaBuild(StoreEntry * e)
 {
-    MemObject *mem = e->mem_obj;
     tlv *TLV = NULL;		/* we'll return this */
     tlv **T = &TLV;
     const char *url;
-    assert(mem != NULL);
+    assert(e->mem_obj != NULL);
     assert(e->swap_status == SWAPOUT_WRITING);
     url = storeUrl(e);
     debug(20, 3) ("storeSwapMetaBuild: %s\n", url);
Index: squid/src/store_swapout.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapout.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/store_swapout.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/store_swapout.c	20 Apr 2000 21:57:35 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapout.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: store_swapout.c,v 1.1.1.6 2000/04/20 21:57:35 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@
     char *buf;
     assert(mem);
     storeLockObject(e);
-    e->swap_file_number = storeDirMapAllocate();
+    storeSwapFileNumberSet(e, storeDirMapAllocate());
     c = xcalloc(1, sizeof(*c));
     c->data = e;
     cbdataAdd(c, cbdataXfree, 0);
@@ -58,8 +58,7 @@
 	O_WRONLY, storeSwapOutFileClosed, c);
     if (NULL == mem->swapout.sio) {
 	e->swap_status = SWAPOUT_NONE;
-	storeDirMapBitReset(e->swap_file_number);
-	e->swap_file_number = -1;
+	storeSwapFileNumberSet(e, -1);
 	cbdataFree(c);
 	storeUnlockObject(e);
 	return;
@@ -109,7 +108,10 @@
     lowest_offset = storeLowestMemReaderOffset(e);
     debug(20, 7) ("storeSwapOut: lowest_offset = %d\n",
 	(int) lowest_offset);
-    new_mem_lo = lowest_offset;
+    if (mem->inmem_hi - lowest_offset > DISK_PAGE_SIZE)
+        new_mem_lo = lowest_offset;
+    else
+        new_mem_lo = mem->inmem_lo;
     assert(new_mem_lo >= mem->inmem_lo);
     if (storeSwapOutAble(e)) {
 	/*
@@ -120,11 +122,11 @@
 	 */
 	if ((on_disk = storeSwapOutObjectBytesOnDisk(mem)) < new_mem_lo)
 	    new_mem_lo = on_disk;
-    } else {
+    } else if (new_mem_lo > 0) {
 	/*
-	 * Its not swap-able, so we must make it PRIVATE.  Even if
-	 * be only one MEM client and all others must read from
-	 * disk.
+	 * Its not swap-able, and we're about to delete a chunk,
+	 * so we must make it PRIVATE.  This is tricky/ugly because
+	 * for the most part, we treat swapable == cachable here.
 	 */
 	storeReleaseRequest(e);
     }
@@ -176,8 +178,7 @@
 	if (swap_buf_len < 0) {
 	    debug(20, 1) ("stmemCopy returned %d for '%s'\n", swap_buf_len, storeKeyText(e->key));
 	    storeUnlink(e->swap_file_number);
-	    storeDirMapBitReset(e->swap_file_number);
-	    e->swap_file_number = -1;
+	    storeSwapFileNumberSet(e, -1);
 	    e->swap_status = SWAPOUT_NONE;
 	    memFree(swap_buf, MEM_DISK_BUF);
 	    storeReleaseRequest(e);
@@ -233,21 +234,22 @@
     assert(e->swap_status == SWAPOUT_WRITING);
     cbdataFree(c);
     if (errflag) {
-	debug(20, 3) ("storeSwapOutFileClosed: swapfile %08X, errflag=%d\n\t%s\n",
-	    e->swap_file_number, errflag, xstrerror());
+	sfileno bad = e->swap_file_number;
+	debug(20, 1) ("storeSwapOutFileClosed: swapfile %08X, errflag=%d\n\t%s\n",
+	    bad, errflag, xstrerror());
+	storeSwapFileNumberSet(e, -1);
 	/*
-	 * yuck.  don't clear the filemap bit for some errors so that
+	 * yuck.  re-set the filemap bit for some errors so that
 	 * we don't try re-using it over and over
 	 */
-	if (errno != EPERM)
-	    storeDirMapBitReset(e->swap_file_number);
+	if (errno == EPERM)
+	    storeDirMapBitSet(bad);
 	if (errflag == DISK_NO_SPACE_LEFT) {
 	    storeDirDiskFull(e->swap_file_number);
 	    storeDirConfigure();
 	    storeConfigure();
 	}
 	storeReleaseRequest(e);
-	e->swap_file_number = -1;
 	e->swap_status = SWAPOUT_NONE;
     } else {
 	/* swapping complete */
Index: squid/src/structs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/structs.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/structs.h	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/structs.h	20 Apr 2000 21:57:35 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: structs.h,v 1.1.1.6 2000/04/20 21:57:35 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -308,17 +308,13 @@
     char *effectiveUser;
     char *effectiveGroup;
     struct {
-#if USE_DNSSERVER
 	char *dnsserver;
-#endif
 	wordlist *redirect;
 	wordlist *authenticate;
 	char *pinger;
 	char *unlinkd;
     } Program;
-#if USE_DNSSERVER
     int dnsChildren;
-#endif
     int redirectChildren;
     int authenticateChildren;
     int authenticateTTL;
@@ -382,9 +378,7 @@
     } Netdb;
     struct {
 	int log_udp;
-#if USE_DNSSERVER
 	int res_defnames;
-#endif
 	int anonymizer;
 	int client_db;
 	int query_icmp;
@@ -410,8 +404,6 @@
 	int strip_query_terms;
 	int redirector_bypass;
 	int ignore_unknown_nameservers;
-	int client_pconns;
-	int server_pconns;
 #if USE_CACHE_DIGESTS
 	int digest_generation;
 #endif
@@ -483,13 +475,12 @@
 #endif
     HttpHeaderMask anonymize_headers;
     char *coredump_dir;
-    char *chroot_dir;
 #if USE_CACHE_DIGESTS
     struct {
 	int bits_per_entry;
-	time_t rebuild_period;
-	time_t rewrite_period;
-	size_t swapout_chunk_size;
+	int rebuild_period;
+	int rewrite_period;
+	int swapout_chunk_size;
 	int rebuild_chunk_percentage;
     } digest;
 #endif
@@ -1287,6 +1278,9 @@
     int id;
     ssize_t object_sz;
     size_t swap_hdr_sz;
+#if URL_CHECKSUM_DEBUG
+    unsigned int chksum;
+#endif
 };
 
 struct _StoreEntry {
@@ -1318,10 +1312,13 @@
     swapdir_t type;
     fileMap *map;
     int cur_size;
+    int high_size;
     int max_size;
     char *path;
     int index;			/* This entry's index into the swapDirs array */
-    int suggest;
+    sfileno suggest;
+    int removals;
+    int scanned;
     struct {
 	unsigned int selected:1;
 	unsigned int read_only:1;
@@ -1345,12 +1342,32 @@
 	    void *state;
 	} clean;
     } log;
+#if !HEAP_REPLACEMENT
+    dlink_list lru_list;
+    dlink_node *lru_walker;
+#endif
     union {
 	struct {
 	    int l1;
 	    int l2;
 	    int swaplog_fd;
 	} ufs;
+#if USE_DISKD
+	struct {
+	    int l1;
+	    int l2;
+	    int swaplog_fd;
+	    int smsgid;
+	    int rmsgid;
+	    int wfd;
+	    int away;
+	    struct {
+		char *buf;
+		link_list *stack;
+		int id;
+	    } shm;
+	} diskd;
+#endif
     } u;
 };
 
@@ -1415,6 +1432,16 @@
 	    link_list *pending_writes;
 	    link_list *pending_reads;
 	} aufs;
+#if USE_DISKD
+	struct {
+	    int id;
+	    struct {
+		unsigned int reading:1;
+		unsigned int writing:1;
+	    } flags;
+	    char *read_buf;
+	} diskd;
+#endif
     } type;
 };
 
@@ -1531,6 +1558,8 @@
 	int clients;
 	int requests;
 	int hits;
+	int mem_hits;
+	int disk_hits;
 	int errors;
 	kb_t kbytes_in;
 	kb_t kbytes_out;
Index: squid/src/test_cache_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/test_cache_digest.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.3
diff -u -r1.1.1.2 -r1.1.1.3
--- squid/src/test_cache_digest.c	20 Apr 2000 18:22:00 -0000	1.1.1.2
+++ squid/src/test_cache_digest.c	20 Apr 2000 21:57:35 -0000	1.1.1.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: test_cache_digest.c,v 1.1.1.2 2000/04/20 18:22:00 hno Exp $
+ * $Id: test_cache_digest.c,v 1.1.1.3 2000/04/20 21:57:35 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/tools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/tools.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/tools.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/tools.c	20 Apr 2000 21:57:35 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: tools.c,v 1.1.1.6 2000/04/20 21:57:35 hno Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -482,7 +482,6 @@
 {
     struct passwd *pwd = NULL;
     struct group *grp = NULL;
-    gid_t gid;
     debug(21, 3) ("leave_suid: PID %d called\n", getpid());
     if (geteuid() != 0)
 	return;
@@ -492,15 +491,12 @@
     if ((pwd = getpwnam(Config.effectiveUser)) == NULL)
 	return;
     if (Config.effectiveGroup && (grp = getgrnam(Config.effectiveGroup))) {
-	gid = grp->gr_gid;
+	if (setgid(grp->gr_gid) < 0)
+	    debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror());
     } else {
-	gid = pwd->pw_gid;
+	if (setgid(pwd->pw_gid) < 0)
+	    debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror());
     }
-#if HAVE_SETGROUPS
-    setgroups(1, &gid);
-#endif
-    if (setgid(gid) < 0)
-	debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror());
     debug(21, 3) ("leave_suid: PID %d giving up root, becoming '%s'\n",
 	getpid(), pwd->pw_name);
 #if HAVE_SETRESUID
@@ -876,7 +872,6 @@
     return p;
 }
 
-
 /*
  * Same as rename(2) but complains if something goes wrong;
  * the caller is responsible for handing and explaining the 
Index: squid/src/typedefs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/typedefs.h,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/typedefs.h	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/typedefs.h	20 Apr 2000 21:57:35 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: typedefs.h,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: typedefs.h,v 1.1.1.6 2000/04/20 21:57:35 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -31,6 +31,9 @@
  *
  */
 
+#ifndef _TYPEDEFS_H_
+#define _TYPEDEFS_H_
+
 typedef unsigned int store_status_t;
 typedef unsigned int mem_status_t;
 typedef unsigned int ping_status_t;
@@ -265,3 +268,5 @@
 #if USE_HTCP
 typedef struct _htcpReplyData htcpReplyData;
 #endif
+
+#endif /* _TYPEDEFS_H_ */
Index: squid/src/unlinkd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/unlinkd.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/unlinkd.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/unlinkd.c	20 Apr 2000 21:57:35 -0000	1.1.1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: unlinkd.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: unlinkd.c,v 1.1.1.6 2000/04/20 21:57:35 hno Exp $
  *
  * DEBUG: section 12    Unlink Daemon
  * AUTHOR: Duane Wessels
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/url.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/url.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/url.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/url.c	20 Apr 2000 21:57:35 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: url.c,v 1.1.1.6 2000/04/20 21:57:35 hno Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/urn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/urn.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/urn.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/urn.c	20 Apr 2000 21:57:35 -0000	1.1.1.6
@@ -1,7 +1,7 @@
 
 /*
  *
- * $Id: urn.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: urn.c,v 1.1.1.6 2000/04/20 21:57:35 hno Exp $
  *
  * DEBUG: section 52    URN Parsing
  * AUTHOR: Kostas Anagnostakis
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/useragent.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/useragent.c,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.6
diff -u -r1.1.1.5 -r1.1.1.6
--- squid/src/useragent.c	20 Apr 2000 18:22:00 -0000	1.1.1.5
+++ squid/src/useragent.c	20 Apr 2000 21:57:35 -0000	1.1.1.6
@@ -1,6 +1,6 @@
 
 /*
- * $Id: useragent.c,v 1.1.1.5 2000/04/20 18:22:00 hno Exp $
+ * $Id: useragent.c,v 1.1.1.6 2000/04/20 21:57:35 hno Exp $
  *
  * DEBUG: section 40    User-Agent logging
  * AUTHOR: Joe Ramey <ramey@csc.ti.com>
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/wais.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/wais.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/wais.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/wais.c	20 Apr 2000 21:57:35 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: wais.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: wais.c,v 1.1.1.4 2000/04/20 21:57:35 hno Exp $
  *
  * DEBUG: section 24    WAIS Relay
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
Index: squid/src/wccp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/wccp.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/wccp.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/wccp.c	20 Apr 2000 21:57:35 -0000	1.1.1.4
@@ -1,8 +1,8 @@
 
 /*
- * $Id: wccp.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: wccp.c,v 1.1.1.4 2000/04/20 21:57:35 hno Exp $
  *
- * DEBUG: section 80     WCCP Support
+ * DEBUG: section 80    WCCP Support
  * AUTHOR: Glenn Chisholm
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -211,7 +211,7 @@
 {
     struct sockaddr_in from;
     socklen_t from_len;
-    int len;
+    size_t len;
 
     debug(80, 6) ("wccpHandleUdp: Called.\n");
 
@@ -223,7 +223,7 @@
     Counter.syscalls.sock.recvfroms++;
 
     len = recvfrom(sock,
-	&wccp_i_see_you,
+	(void *) &wccp_i_see_you,
 	WCCP_RESPONSE_SIZE,
 	0,
 	(struct sockaddr *) &from,
@@ -265,7 +265,7 @@
 
     wccp_here_i_am.id = wccp_i_see_you.id;
     send(theOutWccpConnection,
-	&wccp_here_i_am,
+	(void *) &wccp_here_i_am,
 	sizeof(wccp_here_i_am),
 	0);
 
Index: squid/src/whois.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/whois.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.4
diff -u -r1.1.1.3 -r1.1.1.4
--- squid/src/whois.c	20 Apr 2000 18:22:00 -0000	1.1.1.3
+++ squid/src/whois.c	20 Apr 2000 21:57:35 -0000	1.1.1.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: whois.c,v 1.1.1.3 2000/04/20 18:22:00 hno Exp $
+ * $Id: whois.c,v 1.1.1.4 2000/04/20 21:57:35 hno Exp $
  *
  * DEBUG: section 75    WHOIS protocol
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  the Regents of the University of California.  Please see the
- *  COPYRIGHT file for full details.  Squid incorporates software
- *  developed and/or copyrighted by other sources.  Please see the
- *  CREDITS file for full details.
+ *  Duane Wessels and the University of California San Diego.  Please
+ *  see the COPYRIGHT file for full details.  Squid incorporates
+ *  software developed and/or copyrighted by other sources.  Please see
+ *  the CREDITS file for full details.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
