]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
protos.h refactoring, part one.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 28 Aug 2012 19:12:13 +0000 (21:12 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 28 Aug 2012 19:12:13 +0000 (21:12 +0200)
Refactor many function prototypes from protos.h to more specific header files.
Change linkage for moved prototypes to c++.

165 files changed:
src/CacheDigest.cc
src/CacheDigest.h [new file with mode: 0644]
src/ConfigParser.cc
src/DelaySpec.cc
src/DiskIO/AIO/AIODiskFile.cc
src/DiskIO/Blocking/BlockingFile.cc
src/DiskIO/DiskDaemon/DiskdIOStrategy.cc
src/DiskIO/DiskThreads/CommIO.cc
src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc
src/DiskIO/IpcIo/IpcIoFile.cc
src/DiskIO/Mmapped/MmappedFile.cc
src/ExternalACL.h
src/HelperChildConfig.cc
src/HttpHdrCc.cc
src/HttpHdrCc.h
src/HttpHdrContRange.cc
src/HttpHdrSc.cc
src/HttpHeader.cc
src/HttpHeader.h
src/HttpHeaderTools.h
src/HttpMsg.cc
src/HttpRequest.cc
src/Makefile.am
src/Mem.h
src/MemBuf.cc
src/Parsing.cc
src/PeerDigest.h
src/Server.cc
src/String.cc
src/SwapDir.cc
src/URL.h
src/acl/CertificateData.cc
src/acl/DestinationDomain.cc
src/acl/DomainData.cc
src/acl/Gadgets.cc
src/acl/HttpHeaderData.cc
src/acl/IntRange.cc
src/acl/Ip.cc
src/acl/MaxConnection.cc
src/acl/Random.cc
src/acl/RegexData.cc
src/acl/SourceDomain.cc
src/acl/TimeData.cc
src/acl/Url.cc
src/adaptation/ecap/MessageRep.cc
src/adaptation/icap/ModXact.cc
src/adaptation/icap/OptXact.cc
src/adaptation/icap/Xaction.cc
src/auth/AclMaxUserIp.cc
src/auth/basic/auth_basic.cc
src/auth/digest/UserRequest.cc
src/auth/digest/auth_digest.cc
src/auth/negotiate/UserRequest.cc
src/auth/negotiate/auth_negotiate.cc
src/auth/ntlm/auth_ntlm.cc
src/cache_cf.cc
src/cache_cf.h [new file with mode: 0644]
src/carp.cc
src/carp.h [new file with mode: 0644]
src/client_db.cc
src/client_db.h [new file with mode: 0644]
src/client_side.cc
src/client_side.h
src/client_side_reply.cc
src/client_side_request.cc
src/client_side_request.h
src/comm.cc
src/comm/ConnOpener.cc
src/comm/ModPoll.cc
src/comm/TcpAcceptor.cc
src/comm/Write.cc
src/disk.cc
src/disk.h [new file with mode: 0644]
src/dns_internal.cc
src/errorpage.cc
src/esi/Esi.cc
src/esi/Include.cc
src/esi/VarState.cc
src/external_acl.cc
src/fd.cc
src/fd.h [new file with mode: 0644]
src/format/Config.cc
src/format/Format.cc
src/forward.cc
src/fqdncache.cc
src/fqdncache.h [new file with mode: 0644]
src/fs/coss/store_dir_coss.cc
src/fs/rock/RockRebuild.cc
src/fs/rock/RockSwapDir.cc
src/fs/ufs/RebuildState.cc
src/fs/ufs/UFSSwapDir.cc
src/ftp.cc
src/ftp.h [new file with mode: 0644]
src/gopher.cc
src/gopher.h [new file with mode: 0644]
src/helper.cc
src/htcp.cc
src/http.cc
src/http.h
src/icmp/IcmpSquid.cc
src/icmp/net_db.cc
src/icp_v2.cc
src/internal.cc
src/internal.h [new file with mode: 0644]
src/ip/QosConfig.cc
src/ipc.cc
src/ipc/StoreMap.cc
src/ipc_win32.cc
src/ipcache.cc
src/list.cc
src/log/Config.cc
src/log/FormatSquidIcap.cc
src/log/Makefile.am
src/log/ModStdio.cc
src/log/ModTcp.cc
src/log/ModUdp.cc
src/log/access_log.cc
src/log/access_log.h [new file with mode: 0644]
src/main.cc
src/mem.cc
src/mime.cc
src/neighbors.cc
src/neighbors.h [new file with mode: 0644]
src/pconn.cc
src/peer_digest.cc
src/peer_select.cc
src/peer_sourcehash.cc
src/peer_sourcehash.h [new file with mode: 0644]
src/peer_userhash.cc
src/peer_userhash.h [new file with mode: 0644]
src/protos.h
src/redirect.cc
src/refresh.cc
src/refresh.h [new file with mode: 0644]
src/send-announce.cc
src/snmp_agent.cc
src/ssl/ServerBump.cc
src/ssl/helper.cc
src/ssl/support.cc
src/stat.cc
src/stat.h [new file with mode: 0644]
src/store.cc
src/store_digest.cc
src/store_dir.cc
src/store_key_md5.cc
src/store_key_md5.h [new file with mode: 0644]
src/store_rebuild.cc
src/test_cache_digest.cc
src/tests/stub_mem.cc
src/tests/testEvent.cc
src/tests/testEventLoop.cc
src/tests/testHttpReply.cc
src/tests/testHttpRequest.cc
src/tools.cc
src/tools.h [new file with mode: 0644]
src/tunnel.cc
src/ufsdump.cc
src/unlinkd.cc
src/urn.cc
src/wccp.h [new file with mode: 0644]
src/wccp2.cc
src/wccp2.h [new file with mode: 0644]
src/whois.cc
src/whois.h [new file with mode: 0644]
src/wordlist.h

index 47b6788d7e21c66790f95f35bc531805992093a2..7f401b01bed1292d7ace47984f855f6f1fb8c787 100644 (file)
 
 #include "squid.h"
 #include "md5.h"
+#include "Mem.h"
 #include "protos.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "store_key_md5.h"
 
 #if USE_CACHE_DIGESTS
 
+#include "CacheDigest.h"
+#include "structs.h"
+
 /* local types */
 
 typedef struct {
diff --git a/src/CacheDigest.h b/src/CacheDigest.h
new file mode 100644 (file)
index 0000000..b9f1304
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * DEBUG: section 70    Cache Digest
+ * AUTHOR: Alex Rousskov
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ * 
+ */
+
+#ifndef SQUID_CACHEDIGEST_H_
+#define SQUID_CACHEDIGEST_H_
+
+#include "typedefs.h"
+class CacheDigestGuessStats;
+class StoreEntry;
+
+extern CacheDigest *cacheDigestCreate(int capacity, int bpe);
+extern void cacheDigestDestroy(CacheDigest * cd);
+extern CacheDigest *cacheDigestClone(const CacheDigest * cd);
+extern void cacheDigestClear(CacheDigest * cd);
+extern void cacheDigestChangeCap(CacheDigest * cd, int new_cap);
+extern int cacheDigestTest(const CacheDigest * cd, const cache_key * key);
+extern void cacheDigestAdd(CacheDigest * cd, const cache_key * key);
+extern void cacheDigestDel(CacheDigest * cd, const cache_key * key);
+extern size_t cacheDigestCalcMaskSize(int cap, int bpe);
+extern int cacheDigestBitUtil(const CacheDigest * cd);
+extern void cacheDigestGuessStatsUpdate(CacheDigestGuessStats * stats, int real_hit, int guess_hit);
+extern void cacheDigestGuessStatsReport(const CacheDigestGuessStats * stats, StoreEntry * sentry, const char *label);
+extern void cacheDigestReport(CacheDigest * cd, const char *label, StoreEntry * e);
+
+
+#endif /* SQUID_CACHEDIGEST_H_ */
index 9548eb7b7da7134d0b0318a722cbb3bb6363a04f..2ba9baaa4d21dcf5301194aa94eac9b9ec9c39e7 100644 (file)
@@ -34,6 +34,7 @@
  */
 
 #include "squid.h"
+#include "cache_cf.h"
 #include "ConfigParser.h"
 #include "Debug.h"
 #include "globals.h"
index b11b113b5e9c9001d52a4108b15639cf0644edca..fee83035eedcbb19dc8eef573bd94a5d97075c1c 100644 (file)
@@ -40,6 +40,7 @@
 #include "squid.h"
 
 #if USE_DELAY_POOLS
+#include "cache_cf.h"
 #include "DelaySpec.h"
 #include "Parsing.h"
 #include "protos.h"
index fa2132f8ed5cc052e90cb5214d4a604ad1409df3..1d51d5bd352a373d460a2f1665aeae5cb73ed9d4 100644 (file)
@@ -50,6 +50,7 @@
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
+#include "disk.h"
 #include "protos.h"
 
 #if HAVE_ERRNO_H
index 6744a1ef4189f5976e7a8097167c506ec9ecdcbf..2cb215a81d8ac7723700c6fb6872acb9605d23dd 100644 (file)
@@ -38,6 +38,7 @@
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
+#include "disk.h"
 #include "protos.h"
 
 #if HAVE_ERRNO_H
index d7e3c26326d7665d032485087ecac85a22aaf017..10b71cb41cb3c9c72c7091e34b1bb6d367005fed 100644 (file)
@@ -40,6 +40,7 @@
 #include "DiskIO/DiskFile.h"
 #include "DiskdFile.h"
 #include "diomsg.h"
+#include "fd.h"
 #include "protos.h"
 #include "Store.h"
 #include "StatCounters.h"
index 9de30912b0f39201a4403cb81b752dd214444bd7..d975942c6dd65c22f96f613b21c72f6012548ed2 100644 (file)
@@ -35,6 +35,7 @@
 #include "squid.h"
 #include "comm/Loops.h"
 #include "DiskIO/DiskThreads/CommIO.h"
+#include "fd.h"
 #include "globals.h"
 #include "protos.h"
 
index 4ee13011a011b40f5d596a005f5bcd5b9c9a978e..173c276a21caaf210ad40fb3af1e9e611847b38e 100644 (file)
  */
 
 #include "squid.h"
+#include "disk.h"
 #include "DiskThreadsDiskFile.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
+#include "fd.h"
 #include "Generic.h"
 #include "globals.h"
 #include "StatCounters.h"
index 1f39c1ec378e80efe03796857abfb01d387a25af..0c6f5d4ad042355a0f057ddbb7e7c3302d0a59e8 100644 (file)
@@ -11,6 +11,8 @@
 #include "DiskIO/IpcIo/IpcIoFile.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
+#include "disk.h"
+#include "fd.h"
 #include "globals.h"
 #include "ipc/mem/Pages.h"
 #include "ipc/Messages.h"
index b4a70d9359a7c393b6631b015b176cbd7bbd1589..fe36ee2322626695da4d0739c48ed6d7f230a04b 100644 (file)
@@ -10,6 +10,7 @@
 #include "DiskIO/Mmapped/MmappedFile.h"
 #include "DiskIO/ReadRequest.h"
 #include "DiskIO/WriteRequest.h"
+#include "disk.h"
 #include "globals.h"
 #include "protos.h"
 
index 071c7a94939cf71bf7cfd27d53e6809055396937..125c3535a798a4981eabc2c31c35f5e06c55b301 100644 (file)
@@ -93,4 +93,16 @@ protected:
 
 MEMPROXY_CLASS_INLINE(ACLExternal);
 
+class ACLChecklist;
+class StoreEntry;
+
+extern void parse_externalAclHelper(external_acl **);
+extern void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *);
+extern void free_externalAclHelper(external_acl **);
+typedef void EAH(void *data, void *result);
+extern void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data);
+extern void externalAclInit(void);
+extern void externalAclShutdown(void);
+
+
 #endif /* SQUID_EXTERNALACL_H */
index b75e3252a242ffeb96797549d8f2bb6a0de605e4..002bdda81e4d141aab6bb060e6f07f4d96606ee6 100644 (file)
@@ -1,4 +1,5 @@
 #include "squid.h"
+#include "cache_cf.h"
 #include "Debug.h"
 #include "HelperChildConfig.h"
 #include "globals.h"
index 6971752a49a96e59bdccbd524b923196974b7194..ffc59fe4b6976d2c1b5888064f8f35d9074f1961 100644 (file)
@@ -34,6 +34,7 @@
 #include "base/StringArea.h"
 #include "HttpHeader.h"
 #include "HttpHeaderStat.h"
+#include "HttpHeaderTools.h"
 #include "HttpHdrCc.h"
 #include "StatHist.h"
 #include "Store.h"
index 32d4115bb83f03a3b37819f1c342949a4ed4d964..b539181dc6b94cb5c27adf5643e7a733aed9f81a 100644 (file)
@@ -178,6 +178,14 @@ public:
 
 MEMPROXY_CLASS_INLINE(HttpHdrCc);
 
+class StatHist;
+class StoreEntry;
+
+extern void httpHdrCcInitModule(void);
+extern void httpHdrCcCleanModule(void);
+extern void httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist);
+extern void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
+
 #if _USE_INLINE_
 #include "HttpHdrCc.cci"
 #endif
index 730a8a9b2e587d4b6dedf6cfc3f4475eefb57015..c9c01af051ab995600aedad2f021bd822c454484 100644 (file)
@@ -38,6 +38,7 @@
 #include "enums.h"
 #include "HttpHdrContRange.h"
 #include "HttpHeaderTools.h"
+#include "Mem.h"
 #include "protos.h"
 
 /*
index 133a092184e23e41d520886362652103ecc059d2..057e5330b3a970738c3350dc3e62d73358e6ad6b 100644 (file)
@@ -40,6 +40,7 @@
 #include "HttpHdrSc.h"
 #include "HttpHeader.h"
 #include "HttpHeaderStat.h"
+#include "HttpHeaderTools.h"
 #include "Store.h"
 #include "protos.h"
 
index 36e60b6c57e76e5f7baea2ddb7289144f6c29a3d..3d2539d0ee2d2ea3233420f265a10a9ed7ba3a08 100644 (file)
@@ -40,6 +40,7 @@
 #include "HttpHdrSc.h"
 #include "HttpHeader.h"
 #include "HttpHeaderStat.h"
+#include "HttpHeaderTools.h"
 #include "MemBuf.h"
 #include "mgr/Registration.h"
 #include "profiler/Profiler.h"
index 53e884bc6422c2d436ad6c7adff0a28009b7e677..9f4c5f5618a03287729a494178fbee1fd982a553 100644 (file)
@@ -291,9 +291,9 @@ private:
 };
 
 extern int httpHeaderParseQuotedString(const char *start, const int len, String *val);
-SQUIDCEXTERN int httpHeaderHasByNameListMember(const HttpHeader * hdr, const char *name, const char *member, const char separator);
-SQUIDCEXTERN void httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask * denied_mask);
-SQUIDCEXTERN void httpHeaderCalcMask(HttpHeaderMask * mask, http_hdr_type http_hdr_type_enums[], size_t count);
+extern int httpHeaderHasByNameListMember(const HttpHeader * hdr, const char *name, const char *member, const char separator);
+extern void httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask * denied_mask);
+extern void httpHeaderCalcMask(HttpHeaderMask * mask, http_hdr_type http_hdr_type_enums[], size_t count);
 
 inline bool
 HttpHeader::chunked() const
@@ -302,4 +302,7 @@ HttpHeader::chunked() const
            hasListMember(HDR_TRANSFER_ENCODING, "chunked", ',');
 }
 
+extern void httpHeaderInitModule(void);
+extern void httpHeaderCleanModule(void);
+
 #endif /* SQUID_HTTPHEADER_H */
index a954607ce047c94780c39b884f19980002068e24..1da330e32bfa1381918a171e3f86a9919b7f31ce 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "format/Format.h"
 #include "HttpHeader.h"
+#include "typedefs.h"
 
 #if HAVE_LIST
 #include <list>
@@ -91,6 +92,19 @@ public:
     bool quoted;
 };
 
-SQUIDCEXTERN int httpHeaderParseOffset(const char *start, int64_t * off);
+extern int httpHeaderParseOffset(const char *start, int64_t * off);
+
+class HttpHeaderFieldInfo;
+class String;
+
+extern HttpHeaderFieldInfo *httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs * attrs, int count);
+extern void httpHeaderDestroyFieldsInfo(HttpHeaderFieldInfo * info, int count);
+extern http_hdr_type httpHeaderIdByName(const char *name, size_t name_len, const HttpHeaderFieldInfo * attrs, int end);
+extern http_hdr_type httpHeaderIdByNameDef(const char *name, int name_len);
+extern const char *httpHeaderNameById(int id);
+extern int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
+extern int httpHeaderParseInt(const char *start, int *val);
+extern void httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...) PRINTF_FORMAT_ARG3;
+
 
 #endif
index 772d35f2f315dd9dc611cd2befca567123dd25f1..2922089ddd392af6aee2ad6127d3a0c039a4c1eb 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "squid.h"
 #include "Debug.h"
+#include "HttpHeaderTools.h"
 #include "HttpMsg.h"
 #include "MemBuf.h"
 #include "profiler/Profiler.h"
index 38a67382c7a6b6d8023c0b8b8dd9fb28f682012a..b1a8128a33365131e12f26b5dc473c7a06424c3a 100644 (file)
@@ -40,6 +40,8 @@
 #include "client_side.h"
 #include "DnsLookupDetails.h"
 #include "err_detail_type.h"
+#include "gopher.h"
+#include "http.h"
 #include "HttpHdrCc.h"
 #include "HttpHeaderRange.h"
 #include "HttpRequest.h"
@@ -47,6 +49,7 @@
 #include "MemBuf.h"
 #include "protos.h"
 #include "Store.h"
+#include "URL.h"
 
 #if USE_AUTH
 #include "auth/UserRequest.h"
index 56a2de0f6bf5609b1d98d9ed75dbd98f5c38ac57..9fc7b86757102e38664b720135f6d154fa737a49 100644 (file)
@@ -263,16 +263,21 @@ squid_SOURCES = \
        AccessLogEntry.h \
        AsyncEngine.cc \
        AsyncEngine.h \
+       cache_cf.h \
        cache_cf.cc \
+       CacheDigest.h \
        CacheDigest.cc \
        cache_manager.cc \
        CacheManager.h \
+       carp.h \
        carp.cc \
        cbdata.cc \
        cbdata.h \
        ChunkedCodingParser.cc \
        ChunkedCodingParser.h \
+       client_db.h \
        client_db.cc \
+       client_side.h \
        client_side.cc \
        client_side.h \
        client_side_reply.cc \
@@ -302,6 +307,7 @@ squid_SOURCES = \
        Debug.h \
        defines.h \
        $(DELAY_POOL_SOURCE) \
+       disk.h \
        disk.cc \
        $(DISKIO_SOURCE) \
        dlink.h \
@@ -324,6 +330,7 @@ squid_SOURCES = \
        ExternalACLEntry.h \
        FadingCounter.h \
        FadingCounter.cc \
+       fd.h \
        fd.cc \
        fde.cc \
        fde.h \
@@ -331,10 +338,13 @@ squid_SOURCES = \
        filemap.cc \
        forward.cc \
        forward.h \
+       fqdncache.h \
        fqdncache.cc \
+       ftp.h \
        ftp.cc \
        Generic.h \
        globals.h \
+       gopher.h \
        gopher.cc \
        helper.cc \
        helper.h \
@@ -359,8 +369,8 @@ squid_SOURCES = \
        HttpHdrContRange.cc \
        HttpHdrContRange.h \
        HttpHeaderStat.h \
-       HttpHeader.cc \
        HttpHeader.h \
+       HttpHeader.cc \
        HttpHeaderMask.h \
        HttpHeaderRange.h \
        HttpHeaderTools.h \
@@ -384,6 +394,7 @@ squid_SOURCES = \
        icp_v2.cc \
        icp_v3.cc \
        int.cc \
+       internal.h \
        internal.cc \
        $(IPC_SOURCE) \
        ipcache.cc \
@@ -392,6 +403,7 @@ squid_SOURCES = \
        list.cc \
        lookup_t.h \
        main.cc \
+       Mem.h \
        mem.cc \
        mem_node.cc \
        mem_node.h \
@@ -402,6 +414,7 @@ squid_SOURCES = \
        mime.cc \
        mime_header.cc \
        multicast.cc \
+       neighbors.h \
        neighbors.cc \
        Packer.cc \
        Packer.h \
@@ -414,12 +427,15 @@ squid_SOURCES = \
        peer_digest.cc \
        peer_proxy_negotiate_auth.cc \
        peer_select.cc \
+       peer_sourcehash.h \
        peer_sourcehash.cc \
+       peer_userhash.h \
        peer_userhash.cc \
        PeerSelectState.h \
        PingData.h \
        protos.h \
        redirect.cc \
+       refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        RemovalPolicy.h \
@@ -429,6 +445,7 @@ squid_SOURCES = \
        SquidMath.h \
        SquidMath.cc \
        SquidNew.cc \
+       stat.h \
        stat.cc \
        StatCounters.h \
        StatCounters.cc \
@@ -450,6 +467,7 @@ squid_SOURCES = \
        StoreClient.h \
        store_digest.cc \
        store_dir.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_log.cc \
        store_rebuild.cc \
@@ -486,6 +504,7 @@ squid_SOURCES = \
        MemStore.h \
        time.cc \
        TimeOrTag.h \
+       tools.h \
        tools.cc \
        tunnel.cc \
        typedefs.h \
@@ -495,11 +514,14 @@ squid_SOURCES = \
        URLScheme.cc \
        URLScheme.h \
        urn.cc \
+       wccp.h \
        wccp.cc \
+       wccp2.h \
        wccp2.cc \
+       whois.h \
        whois.cc \
-       wordlist.cc \
        wordlist.h \
+       wordlist.cc \
        $(WIN32_SOURCE) \
        $(WINSVC_SOURCE)
 
@@ -669,11 +691,13 @@ ufsdump_SOURCES = \
        cbdata.cc \
        debug.cc \
        int.cc \
+       Mem.h \
        mem.cc \
        MemBuf.cc \
        MemBuf.cci \
        MemBuf.h \
        Parsing.h \
+       store_key_md5.h \
        store_key_md5.cc \
        StoreMeta.cc \
        StoreMetaMD5.cc \
@@ -693,6 +717,7 @@ ufsdump_SOURCES = \
        HttpRequestMethod.cc \
        RemovalPolicy.cc \
        $(WIN32_SOURCE) \
+       fd.h \
        tests/stub_fd.cc
 ufsdump_LDADD = \
        $(AUTH_ACL_LIBS) \
@@ -1070,9 +1095,10 @@ tests_testHttpReply_SOURCES=\
        HttpHdrSc.h \
        HttpHdrScTarget.cc \
        HttpHdrScTarget.h \
-       HttpHeader.cc \
        HttpHeader.h \
+       HttpHeader.cc \
        HttpHeaderMask.h \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpControlMsg.h \
        HttpMsg.cc \
@@ -1082,6 +1108,7 @@ tests_testHttpReply_SOURCES=\
        HttpStatusCode.h \
        HttpStatusLine.cc \
        HttpStatusLine.h \
+       Mem.h \
        mem.cc \
        MemBuf.cc \
        MemBuf.h \
@@ -1091,7 +1118,9 @@ tests_testHttpReply_SOURCES=\
        SquidString.h \
        SquidTime.h \
        String.cc \
+       log/access_log.h \
        tests/stub_access_log.cc \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
        tests/stub_debug.cc \
@@ -1104,6 +1133,7 @@ tests_testHttpReply_SOURCES=\
        tests/stub_StatHist.cc \
        tests/stub_store.cc \
        tests/stub_store_stats.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/stub_HttpRequest.cc \
        tests/testHttpReply.cc \
@@ -1112,6 +1142,7 @@ tests_testHttpReply_SOURCES=\
        time.cc \
        url.cc \
        URLScheme.cc \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testHttpReply_SOURCES=\
        $(TESTSOURCES)
@@ -1150,7 +1181,9 @@ tests_testACLMaxUserIP_SOURCES= \
        HelperChildConfig.h \
        HelperChildConfig.cc \
        HttpBody.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpHdrContRange.cc \
        HttpHdrRange.cc \
@@ -1183,17 +1216,21 @@ tests_testACLMaxUserIP_SOURCES= \
        StoreMetaURL.cc \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        swap_log_op.cc \
        swap_log_op.h \
        SwapDir.cc \
        SwapDir.h \
+       log/access_log.h \
        tests/stub_access_log.cc \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_debug.cc \
        tests/stub_DelayId.cc \
        tests/stub_DiskIOModule.cc \
        tests/stub_errorpage.cc \
+       fd.h \
        tests/stub_fd.cc \
        tests/stub_HttpRequest.cc \
        tests/stub_HttpReply.cc \
@@ -1210,6 +1247,7 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
        tests/stub_store_swapout.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/stub_cache_manager.cc \
        tests/stub_UdsOp.cc \
@@ -1221,8 +1259,10 @@ tests_testACLMaxUserIP_SOURCES= \
        URL.h \
        URLScheme.cc \
        URLScheme.h \
+       Mem.h \
        mem.cc \
        MemBuf.cc \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testACLMaxUserIP_SOURCES= \
        $(TESTSOURCES)
@@ -1280,6 +1320,7 @@ tests_testCacheManager_SOURCES = \
        HttpParser.h \
        HttpRequest.cc \
        HttpRequestMethod.cc \
+       Mem.h \
        mem.cc \
        String.cc \
        tests/testCacheManager.cc \
@@ -1291,12 +1332,17 @@ tests_testCacheManager_SOURCES = \
        time.cc \
        BodyPipe.cc \
        cache_manager.cc \
+       cache_cf.h \
        cache_cf.cc \
+       CacheDigest.h \
        CacheDigest.cc \
+       carp.h \
        carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
+       client_db.h \
        client_db.cc \
+       client_side.h \
        client_side.cc \
        client_side_reply.cc \
        client_side_request.cc \
@@ -1310,6 +1356,7 @@ tests_testCacheManager_SOURCES = \
        CpuAffinitySet.h \
        $(DELAY_POOL_SOURCE) \
        $(DISKIO_SOURCE) \
+       disk.h \
        disk.cc \
        dlink.h \
        dlink.cc \
@@ -1319,13 +1366,17 @@ tests_testCacheManager_SOURCES = \
        event.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
+       fd.h \
        fd.cc \
        fde.cc \
        FileMap.h \
        filemap.cc \
        forward.cc \
+       fqdncache.h \
        fqdncache.cc \
+       ftp.h \
        ftp.cc \
+       gopher.h \
        gopher.cc \
        hier_code.h \
        helper.cc \
@@ -1335,7 +1386,9 @@ tests_testCacheManager_SOURCES = \
        http.cc \
        HttpBody.h \
        HttpBody.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpHdrCc.h \
        HttpHdrCc.cc \
@@ -1352,6 +1405,7 @@ tests_testCacheManager_SOURCES = \
        $(IPC_SOURCE) \
        ipcache.cc \
        int.cc \
+       internal.h \
        internal.cc \
        list.cc \
        multicast.cc \
@@ -1360,6 +1414,7 @@ tests_testCacheManager_SOURCES = \
        MemObject.cc \
        mime.cc \
        mime_header.cc \
+       neighbors.h \
        neighbors.cc \
        Packer.cc \
        Parsing.cc \
@@ -1367,15 +1422,19 @@ tests_testCacheManager_SOURCES = \
        peer_digest.cc \
        peer_proxy_negotiate_auth.cc \
        peer_select.cc \
+       peer_sourcehash.h \
        peer_sourcehash.cc \
+       peer_userhash.h \
        peer_userhash.cc \
        redirect.cc \
+       refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
+       stat.h \
        stat.cc \
        StatCounters.h \
        StatCounters.cc \
@@ -1387,6 +1446,7 @@ tests_testCacheManager_SOURCES = \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_log.cc \
        store_rebuild.cc \
@@ -1403,6 +1463,7 @@ tests_testCacheManager_SOURCES = \
        StoreMetaURL.cc \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
+       tools.h \
        tools.cc \
        tunnel.cc \
        SwapDir.cc \
@@ -1411,10 +1472,13 @@ tests_testCacheManager_SOURCES = \
        url.cc \
        URLScheme.cc \
        urn.cc \
+       wccp2.h \
        wccp2.cc \
+       whois.h \
        whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testCacheManager_SOURCES = \
        $(BUILT_SOURCES) \
@@ -1462,17 +1526,21 @@ tests_testCacheManager_DEPENDENCIES = \
        $(SQUID_CPPUNIT_LA)
 
 tests_testDiskIO_SOURCES = \
+       CacheDigest.h \
        CacheDigest.cc \
        cbdata.cc \
+       client_db.h \
        ClientInfo.h \
        ConfigOption.cc \
        ConfigParser.cc \
        $(DELAY_POOL_SOURCE) \
        $(DISKIO_SOURCE) \
+       disk.h \
        disk.cc \
        ETag.cc \
        EventLoop.cc \
        event.cc \
+       fd.h \
        fd.cc \
        FileMap.h \
        filemap.cc \
@@ -1485,7 +1553,9 @@ tests_testDiskIO_SOURCES = \
        HttpHdrSc.cc \
        HttpHdrScTarget.cc \
        HttpHdrRange.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
+       HttpHeader.h \
        HttpHeader.cc \
        HttpMsg.cc \
        HttpReply.cc \
@@ -1496,9 +1566,11 @@ tests_testDiskIO_SOURCES = \
        MemBuf.cc \
        MemObject.cc \
        mem_node.cc \
+       Mem.h \
        mem.cc \
        Packer.cc \
        Parsing.cc \
+       refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        StatCounters.h \
@@ -1518,14 +1590,17 @@ tests_testDiskIO_SOURCES = \
        StoreSwapLogData.cc \
        store_dir.cc \
        store_io.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_swapout.cc \
        store_swapmeta.cc \
        store.cc \
        String.cc \
        SwapDir.cc \
+       log/access_log.h \
        tests/stub_access_log.cc \
        tests/stub_acl.cc \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
        tests/stub_client_db.cc \
@@ -1537,6 +1612,7 @@ tests_testDiskIO_SOURCES = \
        tests/stub_HttpRequest.cc \
        tests/stub_http.cc \
        tests/stub_icp.cc \
+       internal.h \
        tests/stub_internal.cc \
        tests/stub_ipc.cc \
        tests/stub_ipcache.cc \
@@ -1549,6 +1625,7 @@ tests_testDiskIO_SOURCES = \
        tests/stub_store_client.cc \
        tests/stub_store_stats.cc \
        tests/stub_store_rebuild.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/stub_UdsOp.cc \
        tests/testDiskIO.cc \
@@ -1561,6 +1638,7 @@ tests_testDiskIO_SOURCES = \
        url.cc \
        URLScheme.cc \
        $(WIN32_SOURCE) \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testDiskIO_SOURCES= \
        $(TESTSOURCES) \
@@ -1612,13 +1690,18 @@ tests_testEvent_SOURCES = \
        AccessLogEntry.cc \
        $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
+       CacheDigest.h \
        CacheDigest.cc \
+       cache_cf.h \
        cache_cf.cc \
        cache_manager.cc \
+       carp.h \
        carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
+       client_db.h \
        client_db.cc \
+       client_side.h \
        client_side.cc \
        client_side_reply.cc \
        client_side_request.cc \
@@ -1633,6 +1716,7 @@ tests_testEvent_SOURCES = \
        debug.cc \
        $(DELAY_POOL_SOURCE) \
        $(DISKIO_SOURCE) \
+       disk.h \
        disk.cc \
        dlink.h \
        dlink.cc \
@@ -1645,13 +1729,17 @@ tests_testEvent_SOURCES = \
        external_acl.cc \
        ExternalACLEntry.cc \
        FadingCounter.cc \
+       fd.h \
        fd.cc \
        fde.cc \
        FileMap.h \
        filemap.cc \
        forward.cc \
+       fqdncache.h \
        fqdncache.cc \
+       ftp.h \
        ftp.cc \
+       gopher.h \
        gopher.cc \
        helper.cc \
        HelperChildConfig.h \
@@ -1661,7 +1749,9 @@ tests_testEvent_SOURCES = \
        http.cc \
        HttpBody.h \
        HttpBody.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpHdrCc.h \
        HttpHdrCc.cc \
@@ -1682,8 +1772,10 @@ tests_testEvent_SOURCES = \
        $(IPC_SOURCE) \
        ipcache.cc \
        int.cc \
+       internal.h \
        internal.cc \
        list.cc \
+       Mem.h \
        mem.cc \
        mem_node.cc \
        MemBuf.cc \
@@ -1691,6 +1783,7 @@ tests_testEvent_SOURCES = \
        mime.cc \
        mime_header.cc \
        multicast.cc \
+       neighbors.h \
        neighbors.cc \
        Packer.cc \
        Parsing.cc \
@@ -1698,15 +1791,19 @@ tests_testEvent_SOURCES = \
        peer_digest.cc \
        peer_proxy_negotiate_auth.cc \
        peer_select.cc \
+       peer_sourcehash.h \
        peer_sourcehash.cc \
+       peer_userhash.h \
        peer_userhash.cc \
        redirect.cc \
+       refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
        $(SNMP_SOURCE) \
        SquidMath.cc \
        SquidMath.h \
+       stat.h \
        stat.cc \
        StatCounters.h \
        StatCounters.cc \
@@ -1718,6 +1815,7 @@ tests_testEvent_SOURCES = \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_log.cc \
        store_rebuild.cc \
@@ -1744,6 +1842,7 @@ tests_testEvent_SOURCES = \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_store_stats.cc \
        time.cc \
+       tools.h \
        tools.cc \
        tunnel.cc \
        MemStore.cc \
@@ -1751,9 +1850,12 @@ tests_testEvent_SOURCES = \
        url.cc \
        URLScheme.cc \
        urn.cc \
+       wccp2.h \
        wccp2.cc \
+       whois.h \
        whois.cc \
        $(WIN32_SOURCE) \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testEvent_SOURCES = \
        $(BUILT_SOURCES) \
@@ -1804,13 +1906,18 @@ tests_testEventLoop_SOURCES = \
        AccessLogEntry.cc \
        $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
+       CacheDigest.h \
        CacheDigest.cc \
        cache_manager.cc \
+       cache_cf.h \
        cache_cf.cc \
+       carp.h \
        carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
+       client_db.h \
        client_db.cc \
+       client_side.h \
        client_side.cc \
        client_side_reply.cc \
        client_side_request.cc \
@@ -1825,6 +1932,7 @@ tests_testEventLoop_SOURCES = \
        debug.cc \
        $(DELAY_POOL_SOURCE) \
        $(DISKIO_SOURCE) \
+       disk.h \
        disk.cc \
        dlink.h \
        dlink.cc \
@@ -1837,13 +1945,17 @@ tests_testEventLoop_SOURCES = \
        external_acl.cc \
        ExternalACLEntry.cc \
        FadingCounter.cc \
+       fd.h \
        fd.cc \
        fde.cc \
        FileMap.h \
        filemap.cc \
        forward.cc \
+       fqdncache.h \
        fqdncache.cc \
+       ftp.h \
        ftp.cc \
+       gopher.h \
        gopher.cc \
        helper.cc \
        HelperChildConfig.h \
@@ -1853,7 +1965,9 @@ tests_testEventLoop_SOURCES = \
        http.cc \
        HttpBody.h \
        HttpBody.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpHdrCc.h \
        HttpHdrCc.cc \
@@ -1874,15 +1988,18 @@ tests_testEventLoop_SOURCES = \
        $(IPC_SOURCE) \
        ipcache.cc \
        int.cc \
+       internal.h \
        internal.cc \
        list.cc \
        MemBuf.cc \
        MemObject.cc \
+       Mem.h \
        mem.cc \
        mem_node.cc \
        mime.cc \
        mime_header.cc \
        multicast.cc \
+       neighbors.h \
        neighbors.cc \
        Packer.cc \
        Parsing.cc \
@@ -1890,26 +2007,32 @@ tests_testEventLoop_SOURCES = \
        peer_digest.cc \
        peer_proxy_negotiate_auth.cc \
        peer_select.cc \
+       peer_sourcehash.h \
        peer_sourcehash.cc \
+       peer_userhash.h \
        peer_userhash.cc \
        RemovalPolicy.cc \
        redirect.cc \
+       refresh.h \
        refresh.cc \
        Server.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
+       stat.h \
        stat.cc \
        StatCounters.h \
        StatCounters.cc \
        StatHist.h \
        StatHist.cc \
+       Mem.h \
        stmem.cc \
        store.cc \
        store_client.cc \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_log.cc \
        store_rebuild.cc \
@@ -1935,6 +2058,7 @@ tests_testEventLoop_SOURCES = \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_store_stats.cc \
        time.cc \
+       tools.h \
        tools.cc \
        tunnel.cc \
        MemStore.cc \
@@ -1942,9 +2066,12 @@ tests_testEventLoop_SOURCES = \
        url.cc \
        URLScheme.cc \
        urn.cc \
+       wccp2.h \
        wccp2.cc \
+       whois.h \
        whois.cc \
        $(WIN32_SOURCE) \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testEventLoop_SOURCES = \
        $(BUILT_SOURCES) \
@@ -1994,13 +2121,18 @@ tests_test_http_range_SOURCES = \
        AccessLogEntry.cc \
        $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
+       cache_cf.h \
        cache_cf.cc \
        cache_manager.cc \
+       CacheDigest.h \
        CacheDigest.cc \
+       carp.h \
        carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
+       client_db.h \
        client_db.cc \
+       client_side.h \
        client_side.cc \
        client_side_reply.cc \
        client_side_request.cc \
@@ -2015,6 +2147,7 @@ tests_test_http_range_SOURCES = \
        debug.cc \
        $(DELAY_POOL_SOURCE) \
        $(DISKIO_SOURCE) \
+       disk.h \
        disk.cc \
        dlink.h \
        dlink.cc \
@@ -2025,13 +2158,17 @@ tests_test_http_range_SOURCES = \
        external_acl.cc \
        ExternalACLEntry.cc \
        FadingCounter.cc \
+       fd.h \
        fd.cc \
        fde.cc \
        FileMap.h \
        filemap.cc \
        forward.cc \
+       fqdncache.h \
        fqdncache.cc \
+       ftp.h \
        ftp.cc \
+       gopher.h \
        gopher.cc \
        helper.cc \
        HelperChildConfig.h \
@@ -2048,7 +2185,9 @@ tests_test_http_range_SOURCES = \
        HttpHdrRange.cc \
        HttpHdrSc.cc \
        HttpHdrScTarget.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpMsg.cc \
        HttpParser.cc \
@@ -2060,33 +2199,40 @@ tests_test_http_range_SOURCES = \
        icp_v2.cc \
        icp_v3.cc \
        int.cc \
+       internal.h \
        internal.cc \
        $(IPC_SOURCE) \
        ipcache.cc \
        list.cc \
        MemBuf.cc \
        MemObject.cc \
+       Mem.h \
        mem.cc \
        mem_node.cc \
        mime.cc \
        mime_header.cc \
        multicast.cc \
+       neighbors.h \
        neighbors.cc \
        Packer.cc \
        Parsing.cc \
        peer_digest.cc \
        peer_proxy_negotiate_auth.cc \
        peer_select.cc \
+       peer_sourcehash.h \
        peer_sourcehash.cc \
+       peer_userhash.h \
        peer_userhash.cc \
        pconn.cc \
        redirect.cc \
+       refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
+       stat.h \
        stat.cc \
        StatCounters.h \
        StatCounters.cc \
@@ -2097,6 +2243,7 @@ tests_test_http_range_SOURCES = \
        store_client.cc \
        store_digest.cc \
        store_dir.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_io.cc \
        store_log.cc \
@@ -2122,15 +2269,19 @@ tests_test_http_range_SOURCES = \
        tests/stub_MemStore.cc \
        tests/stub_store_stats.cc \
        time.cc \
+       tools.h \
        tools.cc \
        tunnel.cc \
        $(UNLINKDSOURCE) \
        url.cc \
        URLScheme.cc \
        urn.cc \
+       wccp2.h \
        wccp2.cc \
+       whois.h \
        whois.cc \
        $(WIN32_SOURCE) \
+       wordlist.h \
        wordlist.cc
 nodist_tests_test_http_range_SOURCES = \
        $(BUILT_SOURCES) \
@@ -2182,19 +2333,23 @@ tests_testHttpParser_SOURCES = \
        HttpParser.h \
        MemBuf.cc \
        MemBuf.h \
+       Mem.h \
        mem.cc \
        String.cc \
        structs.h \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
        tests/stub_debug.cc \
        tests/stub_event.cc \
        tests/stub_HelperChildConfig.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/testHttpParser.cc \
        tests/testHttpParser.h \
        tests/testMain.cc \
        time.cc \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testHttpParser_SOURCES = \
        $(TESTSOURCES)
@@ -2218,6 +2373,7 @@ tests_testHttpRequest_SOURCES = \
        HttpParser.h \
        HttpRequest.cc \
        HttpRequestMethod.cc \
+       Mem.h \
        mem.cc \
        String.cc \
        tests/testHttpRequest.h \
@@ -2232,13 +2388,18 @@ tests_testHttpRequest_SOURCES = \
        time.cc \
        BodyPipe.cc \
        cache_manager.cc \
+       cache_cf.h \
        cache_cf.cc \
        debug.cc \
+       CacheDigest.h \
        CacheDigest.cc \
+       carp.h \
        carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
+       client_db.h \
        client_db.cc \
+       client_side.h \
        client_side.cc \
        client_side_reply.cc \
        client_side_request.cc \
@@ -2251,6 +2412,7 @@ tests_testHttpRequest_SOURCES = \
        CpuAffinitySet.cc \
        CpuAffinitySet.h \
        $(DELAY_POOL_SOURCE) \
+       disk.h \
        disk.cc \
        dlink.h \
        dlink.cc \
@@ -2259,11 +2421,15 @@ tests_testHttpRequest_SOURCES = \
        ETag.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
+       fd.h \
        fd.cc \
        fde.cc \
        forward.cc \
+       fqdncache.h \
        fqdncache.cc \
+       ftp.h \
        ftp.cc \
+       gopher.h \
        gopher.cc \
        helper.cc \
        HelperChildConfig.h \
@@ -2273,7 +2439,9 @@ tests_testHttpRequest_SOURCES = \
        http.cc \
        HttpBody.h \
        HttpBody.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpHdrCc.h \
        HttpHdrCc.cc \
@@ -2290,6 +2458,7 @@ tests_testHttpRequest_SOURCES = \
        $(IPC_SOURCE) \
        ipcache.cc \
        int.cc \
+       internal.h \
        internal.cc \
        list.cc \
        multicast.cc \
@@ -2298,6 +2467,7 @@ tests_testHttpRequest_SOURCES = \
        MemObject.cc \
        mime.cc \
        mime_header.cc \
+       neighbors.h \
        neighbors.cc \
        Packer.cc \
        Parsing.cc \
@@ -2305,15 +2475,19 @@ tests_testHttpRequest_SOURCES = \
        peer_digest.cc \
        peer_proxy_negotiate_auth.cc \
        peer_select.cc \
+       peer_sourcehash.h \
        peer_sourcehash.cc \
+       peer_userhash.h \
        peer_userhash.cc \
        redirect.cc \
+       refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
+       stat.h \
        stat.cc \
        StatCounters.h \
        StatCounters.cc \
@@ -2325,6 +2499,7 @@ tests_testHttpRequest_SOURCES = \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_log.cc \
        store_rebuild.cc \
@@ -2342,6 +2517,7 @@ tests_testHttpRequest_SOURCES = \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
        event.cc \
+       tools.h \
        tools.cc \
        tunnel.cc \
        SwapDir.cc \
@@ -2349,10 +2525,13 @@ tests_testHttpRequest_SOURCES = \
        url.cc \
        URLScheme.cc \
        urn.cc \
+       wccp2.h \
        wccp2.cc \
+       whois.h \
        whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testHttpRequest_SOURCES = \
        $(BUILT_SOURCES)
@@ -2399,12 +2578,14 @@ tests_testHttpRequest_DEPENDENCIES = \
 ## why so many sources? well httpHeaderTools requites ACLChecklist & friends.
 ## first line - what we are testing.
 tests_testStore_SOURCES= \
+       CacheDigest.h \
        CacheDigest.cc \
        cbdata.cc \
        ClientInfo.h \
        ConfigOption.cc \
        ConfigParser.cc \
        $(DELAY_POOL_SOURCE) \
+       disk.h \
        disk.cc \
        DiskIO/ReadRequest.cc \
        DiskIO/WriteRequest.cc \
@@ -2420,12 +2601,15 @@ tests_testStore_SOURCES= \
        HttpHdrRange.cc \
        HttpHdrSc.cc \
        HttpHdrScTarget.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
+       HttpHeader.h \
        HttpHeader.cc \
        HttpMsg.cc \
        HttpRequestMethod.cc \
        int.cc \
        list.cc \
+       Mem.h \
        mem.cc \
        mem_node.cc \
        MemBuf.cc \
@@ -2433,6 +2617,7 @@ tests_testStore_SOURCES= \
        Packer.cc \
        Parsing.cc \
        RemovalPolicy.cc \
+       refresh.h \
        refresh.cc \
        StatCounters.h \
        StatCounters.cc \
@@ -2452,12 +2637,15 @@ tests_testStore_SOURCES= \
        StoreMetaURL.cc \
        StoreMetaVary.cc \
        StoreSwapLogData.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        String.cc \
        SwapDir.cc \
        tests/CapturingStoreEntry.h \
+       log/access_log.h \
        tests/stub_access_log.cc \
        tests/stub_acl.cc \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
        tests/stub_client_side_request.cc \
@@ -2465,6 +2653,7 @@ tests_testStore_SOURCES= \
        tests/stub_debug.cc \
        tests/stub_DiskIOModule.cc \
        tests/stub_errorpage.cc \
+       fd.h \
        tests/stub_fd.cc \
        tests/stub_helper.cc \
        tests/stub_HelperChildConfig.cc \
@@ -2482,6 +2671,7 @@ tests_testStore_SOURCES= \
        tests/stub_store_stats.cc \
        tests/stub_store_rebuild.cc \
        tests/stub_store_swapout.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/stub_UdsOp.cc \
        tests/testMain.cc \
@@ -2500,6 +2690,7 @@ tests_testStore_SOURCES= \
        time.cc \
        url.cc \
        URLScheme.cc \
+       wordlist.h \
        wordlist.cc
 
 nodist_tests_testStore_SOURCES= \
@@ -2543,18 +2734,22 @@ tests_testStore_DEPENDENCIES = \
 ## libsquid pulls in SquidConfig and children. stub them.
 tests_testString_SOURCES = \
        ClientInfo.h \
+       Mem.h \
        mem.cc \
        MemBuf.cc \
        String.cc \
        tests/testMain.cc \
        tests/testString.cc \
        tests/testString.h \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
        tests/stub_debug.cc \
        tests/stub_HelperChildConfig.cc \
+       tools.h \
        tests/stub_tools.cc \
        time.cc \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testString_SOURCES = \
        $(TESTSOURCES)
@@ -2604,11 +2799,15 @@ tests_testUfs_SOURCES = \
        tests/stub_pconn.cc \
        tests/stub_Port.cc \
        tests/stub_UdsOp.cc \
+       internal.h \
        tests/stub_internal.cc \
        tests/stub_libformat.cc \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
+       fd.h \
        fd.cc \
+       client_db.h \
+       disk.h \
        disk.cc \
        FileMap.h \
        filemap.cc \
@@ -2636,6 +2835,7 @@ tests_testUfs_SOURCES = \
        $(WIN32_SOURCE) \
        event.cc \
        $(DELAY_POOL_SOURCE) \
+       CacheDigest.h \
        CacheDigest.cc \
        ConfigParser.cc \
        EventLoop.cc \
@@ -2644,11 +2844,13 @@ tests_testUfs_SOURCES = \
        store_dir.cc \
        store.cc \
        HttpRequestMethod.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        Parsing.cc \
        ConfigOption.cc \
        SwapDir.cc \
        tests/stub_acl.cc \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_helper.cc \
        cbdata.cc \
@@ -2659,8 +2861,11 @@ tests_testUfs_SOURCES = \
        mem_node.cc \
        stmem.cc \
        tests/stub_mime.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       Mem.h \
        mem.cc \
        ClientInfo.h \
        MemBuf.cc \
@@ -2680,14 +2885,18 @@ tests_testUfs_SOURCES = \
        ETag.cc \
        tests/stub_errorpage.cc \
        tests/stub_HttpRequest.cc \
+       log/access_log.h \
        tests/stub_access_log.cc \
+       refresh.h \
        refresh.cc \
        tests/stub_store_client.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
        time.cc \
        URLScheme.cc \
+       wordlist.h \
        wordlist.cc \
        $(DISKIO_SOURCE)
 
@@ -2736,13 +2945,16 @@ tests_testUfs_DEPENDENCIES = \
 
 tests_testRock_SOURCES = \
        cbdata.cc \
+       CacheDigest.h \
        CacheDigest.cc \
        ConfigOption.cc \
        ConfigParser.cc \
+       disk.h \
        disk.cc \
        ETag.cc \
        EventLoop.cc \
        event.cc \
+       fd.h \
        fd.cc \
        FileMap.h \
        filemap.cc \
@@ -2753,7 +2965,9 @@ tests_testRock_SOURCES = \
        HttpHdrRange.cc \
        HttpHdrSc.cc \
        HttpHdrScTarget.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpMsg.cc \
        HttpReply.cc \
@@ -2761,6 +2975,7 @@ tests_testRock_SOURCES = \
        HttpStatusLine.cc \
        int.cc \
        list.cc \
+       Mem.h \
        mem.cc \
        MemBuf.cc \
        MemObject.cc \
@@ -2786,6 +3001,7 @@ tests_testRock_SOURCES = \
        StoreSwapLogData.cc \
        store_dir.cc \
        store_io.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_swapmeta.cc \
        store_swapout.cc \
@@ -2796,9 +3012,12 @@ tests_testRock_SOURCES = \
        tests/testRock.h \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
+       log/access_log.h \
        tests/stub_access_log.cc \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
+       client_db.h \
        tests/stub_client_db.cc \
        tests/stub_client_side_request.cc \
        tests/stub_debug.cc \
@@ -2818,10 +3037,12 @@ tests_testRock_SOURCES = \
        tests/stub_store_client.cc \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
+       tools.h \
        tests/stub_tools.cc \
        time.cc \
        url.cc \
        URLScheme.cc \
+       wordlist.h \
        wordlist.cc \
        $(DELAY_POOL_SOURCE) \
        $(DISKIO_SOURCE) \
@@ -2868,15 +3089,19 @@ tests_testCoss_SOURCES = \
        tests/testMain.cc \
        tests/testCoss.h \
        tests/stub_cache_manager.cc \
+       client_db.h \
        tests/stub_client_db.cc \
        tests/stub_debug.cc \
        tests/stub_HelperChildConfig.cc \
+       internal.h \
        tests/stub_internal.cc \
        tests/stub_ipc.cc \
        tests/stub_pconn.cc \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
+       fd.h \
        fd.cc \
+       disk.h \
        disk.cc \
        FileMap.h \
        filemap.cc \
@@ -2904,6 +3129,7 @@ tests_testCoss_SOURCES = \
        $(WIN32_SOURCE) \
        event.cc \
        $(DELAY_POOL_SOURCE) \
+       CacheDigest.h \
        CacheDigest.cc \
        ConfigParser.cc \
        EventLoop.cc \
@@ -2912,11 +3138,13 @@ tests_testCoss_SOURCES = \
        store_dir.cc \
        store.cc \
        HttpRequestMethod.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        Parsing.cc \
        ConfigOption.cc \
        SwapDir.cc \
        tests/stub_acl.cc \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_helper.cc \
        cbdata.cc \
@@ -2926,8 +3154,11 @@ tests_testCoss_SOURCES = \
        mem_node.cc \
        stmem.cc \
        tests/stub_mime.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       Mem.h \
        mem.cc \
        ClientInfo.h \
        MemBuf.cc \
@@ -2945,18 +3176,22 @@ tests_testCoss_SOURCES = \
        tests/stub_StatHist.cc \
        tests/stub_errorpage.cc \
        tests/stub_HttpRequest.cc \
+       log/access_log.h \
        tests/stub_access_log.cc \
+       refresh.h \
        refresh.cc \
        tests/stub_MemStore.cc \
        tests/stub_Port.cc \
        tests/stub_store_client.cc \
        tests/stub_store_stats.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/stub_UdsOp.cc \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
        time.cc \
        URLScheme.cc \
+       wordlist.h \
        wordlist.cc \
        $(DISKIO_SOURCE)
 
@@ -3006,10 +3241,13 @@ tests_testNull_SOURCES = \
        tests/testNull.cc \
        tests/testMain.cc \
        tests/testNull.h \
+       internal.h \
        tests/stub_internal.cc \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
+       fd.h \
        fd.cc \
+       disk.h \
        disk.cc \
        FileMap.h \
        filemap.cc \
@@ -3037,6 +3275,7 @@ tests_testNull_SOURCES = \
        $(WIN32_SOURCE) \
        event.cc \
        $(DELAY_POOL_SOURCE) \
+       CacheDigest.h \
        CacheDigest.cc \
        ConfigParser.cc \
        EventLoop.cc \
@@ -3045,11 +3284,13 @@ tests_testNull_SOURCES = \
        store_dir.cc \
        store.cc \
        HttpRequestMethod.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        Parsing.cc \
        ConfigOption.cc \
        SwapDir.cc \
        tests/stub_acl.cc \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_helper.cc \
        cbdata.cc \
@@ -3061,8 +3302,11 @@ tests_testNull_SOURCES = \
        mem_node.cc \
        stmem.cc \
        tests/stub_mime.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       Mem.h \
        mem.cc \
        ClientInfo.h \
        MemBuf.cc \
@@ -3080,15 +3324,19 @@ tests_testNull_SOURCES = \
        tests/stub_StatHist.cc \
        tests/stub_errorpage.cc \
        tests/stub_HttpRequest.cc \
+       log/access_log.h \
        tests/stub_access_log.cc \
+       refresh.h \
        refresh.cc \
        tests/stub_store_client.cc \
        tests/stub_store_stats.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
        time.cc \
        URLScheme.cc \
+       wordlist.h \
        wordlist.cc \
        $(DISKIO_SOURCE)
 
@@ -3131,13 +3379,18 @@ tests_testURL_SOURCES = \
        AccessLogEntry.cc \
        $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
+       cache_cf.h \
        cache_cf.cc \
        cache_manager.cc \
+       CacheDigest.h \
        CacheDigest.cc \
+       carp.h \
        carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
+       client_db.h \
        client_db.cc \
+       client_side.h \
        client_side.cc \
        client_side_reply.cc \
        client_side_request.cc \
@@ -3150,6 +3403,7 @@ tests_testURL_SOURCES = \
        CpuAffinitySet.cc \
        CpuAffinitySet.h \
        $(DELAY_POOL_SOURCE) \
+       disk.h \
        disk.cc \
        DiskIO/ReadRequest.cc \
        DiskIO/WriteRequest.cc \
@@ -3161,13 +3415,17 @@ tests_testURL_SOURCES = \
        event.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
+       fd.h \
        fd.cc \
        fde.cc \
        FileMap.h \
        filemap.cc \
        forward.cc \
+       fqdncache.h \
        fqdncache.cc \
+       ftp.h \
        ftp.cc \
+       gopher.h \
        gopher.cc \
        helper.cc \
        HelperChildConfig.h \
@@ -3184,7 +3442,9 @@ tests_testURL_SOURCES = \
        HttpHdrRange.cc \
        HttpHdrSc.cc \
        HttpHdrScTarget.cc \
+       HttpHeader.h \
        HttpHeader.cc \
+       HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpMsg.cc \
        HttpParser.cc \
@@ -3198,15 +3458,18 @@ tests_testURL_SOURCES = \
        $(IPC_SOURCE) \
        ipcache.cc \
        int.cc \
+       internal.h \
        internal.cc \
        list.cc \
        multicast.cc \
+       Mem.h \
        mem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.cc \
        mime_header.cc \
+       neighbors.h \
        neighbors.cc \
        Packer.cc \
        Parsing.cc \
@@ -3214,15 +3477,19 @@ tests_testURL_SOURCES = \
        peer_digest.cc \
        peer_proxy_negotiate_auth.cc \
        peer_select.cc \
+       peer_sourcehash.h \
        peer_sourcehash.cc \
+       peer_userhash.h \
        peer_userhash.cc \
        redirect.cc \
+       refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
+       stat.h \
        stat.cc \
        StatCounters.h \
        StatCounters.cc \
@@ -3234,6 +3501,7 @@ tests_testURL_SOURCES = \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
+       store_key_md5.h \
        store_key_md5.cc \
        store_log.cc \
        store_rebuild.cc \
@@ -3264,15 +3532,19 @@ tests_testURL_SOURCES = \
        tests/testURLScheme.h \
        tests/testMain.cc \
        time.cc \
+       tools.h \
        tools.cc \
        tunnel.cc \
        url.cc \
        URLScheme.cc \
        urn.cc \
+       wccp2.h \
        wccp2.cc \
+       whois.h \
        whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testURL_SOURCES = \
        $(BUILT_SOURCES)
@@ -3319,6 +3591,7 @@ tests_testURL_DEPENDENCIES = \
 
 tests_testConfigParser_SOURCES = \
        ClientInfo.h \
+       Mem.h \
        mem.cc \
        MemBuf.cc \
        String.cc \
@@ -3326,12 +3599,15 @@ tests_testConfigParser_SOURCES = \
        tests/testMain.cc \
        tests/testConfigParser.cc \
        tests/testConfigParser.h \
+       cache_cf.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
        tests/stub_debug.cc \
        tests/stub_HelperChildConfig.cc \
+       tools.h \
        tests/stub_tools.cc \
        time.cc \
+       wordlist.h \
        wordlist.cc
 nodist_tests_testConfigParser_SOURCES = \
        $(TESTSOURCES)
@@ -3360,6 +3636,7 @@ tests_testStatHist_SOURCES = \
        tests/stub_debug.cc \
        tests/stub_DelayId.cc \
        tests/stub_HelperChildConfig.cc \
+       Mem.h \
        tests/stub_mem.cc \
        tests/stub_MemObject.cc \
        tests/stub_mime.cc \
@@ -3367,6 +3644,7 @@ tests_testStatHist_SOURCES = \
        tests/stub_stmem.cc \
        tests/stub_store.cc \
        tests/stub_store_stats.cc \
+       tools.h \
        tests/stub_tools.cc \
        tests/testMain.cc \
        tests/testStatHist.cc \
index a098c19d02a28e805ab1eb6f766cfaab925b08db..fc2145f9170c3956e1002b813775dd23562f77e0 100644 (file)
--- a/src/Mem.h
+++ b/src/Mem.h
 #ifndef SQUID_MEM
 #define SQUID_MEM
 
+/* for mem_type */
+#include "enums.h"
+/* for FREE */
+#include "typedefs.h"
+
 #if HAVE_IOSFWD
 #include <iosfwd>
 #endif
@@ -59,4 +64,21 @@ protected:
 
 extern const size_t squidSystemPageSize;
 
+extern void memClean(void);
+extern void memInitModule(void);
+extern void memCleanModule(void);
+extern void memConfigure(void);
+extern void *memAllocate(mem_type);
+extern void *memAllocString(size_t net_size, size_t * gross_size);
+extern void *memAllocBuf(size_t net_size, size_t * gross_size);
+extern void *memReallocBuf(void *buf, size_t net_size, size_t * gross_size);
+extern void memFree(void *, int type);
+extern void memFreeString(size_t size, void *);
+extern void memFreeBuf(size_t size, void *);
+extern FREE *memFreeBufFunc(size_t size);
+extern int memInUse(mem_type);
+extern void memDataInit(mem_type, const char *, size_t, int, bool zeroOnPush = true);
+extern void memCheckInit(void);
+extern void memConfigure(void);
+
 #endif /* SQUID_MEM */
index b953da0c7974890a9f3459176e66390eadc31c2c..13c35772dba4d1ef42f64d4c02136cc35b3f0088 100644 (file)
  */
 
 #include "squid.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "profiler/Profiler.h"
 #include "protos.h"
index d4eb78b02565f5700995f41bfdc8d37ffa61ad5b..b88f54f83c62978643073a190fa4d76b702f2b10 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 #include "squid.h"
+#include "cache_cf.h"
 #include "compat/strtoll.h"
 #include "Parsing.h"
 #include "protos.h"
index 81f72bda2b5856cc09402ce82b58174e099a2a99..3dd90d84165141ace2f5e68441abf3bd04235202 100644 (file)
@@ -131,6 +131,12 @@ private:
 
 extern const Version CacheDigestVer;
 
+extern PeerDigest *peerDigestCreate(peer * p);
+extern void peerDigestNeeded(PeerDigest * pd);
+extern void peerDigestNotePeerGone(PeerDigest * pd);
+extern void peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e);
+
+
 #endif /* USE_CACHE_DIGESTS */
 
 #endif /* SQUID_PEERDIGEST_H */
index 927245b4ae0121248372ae25b6138be649576166..081a4d8609eae2fe5f30a37c9391d71061e41b87 100644 (file)
@@ -38,6 +38,7 @@
 #include "comm/Connection.h"
 #include "comm/forward.h"
 #include "comm/Write.h"
+#include "fd.h"
 #include "err_detail_type.h"
 #include "errorpage.h"
 #include "HttpReply.h"
@@ -47,6 +48,8 @@
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "tools.h"
+#include "URL.h"
 
 #if USE_ADAPTATION
 #include "adaptation/AccessCheck.h"
index 23f4e9d3438d796a8b6540d30671e1243979ca93..e6eed41f39b70c9be3e605cac747b97bb3865154 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
+#include "Mem.h"
 #include "mgr/Registration.h"
 #include "profiler/Profiler.h"
 #include "protos.h"
index 983e2970d827a158632cd37404465b86df35ec5f..40f58955593a3e117a2a9edd49ded5c7cd5a0850 100644 (file)
  */
 
 #include "squid.h"
+#include "cache_cf.h"
 #include "compat/strtoll.h"
 #include "ConfigOption.h"
+#include "Parsing.h"
 #include "protos.h"
 #include "StoreFileSystem.h"
 #include "SwapDir.h"
index e6e112fffcec15950fb8782ba91a1098efa71e15..ab95fc84f7ae18fc1aa8940cf62c1b1a5886ea7f 100644 (file)
--- a/src/URL.h
+++ b/src/URL.h
@@ -33,6 +33,7 @@
 #ifndef SQUID_SRC_URL_H
 #define SQUID_SRC_URL_H
 
+#include "anyp/ProtocolType.h"
 #include "MemPool.h"
 #include "URLScheme.h"
 
@@ -77,4 +78,24 @@ private:
 
 MEMPROXY_CLASS_INLINE(URL);
 
+class HttpRequest;
+class HttpRequestMethod;
+
+
+extern AnyP::ProtocolType urlParseProtocol(const char *, const char *e = NULL);
+extern void urlInitialize(void);
+extern HttpRequest *urlParse(const HttpRequestMethod&, char *, HttpRequest *request = NULL);
+extern const char *urlCanonical(HttpRequest *);
+extern char *urlCanonicalClean(const HttpRequest *);
+extern const char *urlCanonicalFakeHttps(const HttpRequest * request);
+extern bool urlIsRelative(const char *);
+extern char *urlMakeAbsolute(const HttpRequest *, const char *);
+extern char *urlRInternal(const char *host, unsigned short port, const char *dir, const char *name);
+extern char *urlInternal(const char *dir, const char *name);
+extern int matchDomainName(const char *host, const char *domain);
+extern int urlCheckRequest(const HttpRequest *);
+extern int urlDefaultPort(AnyP::ProtocolType p);
+extern char *urlHostname(const char *url);
+extern void urlExtMethodConfigure(void);
+
 #endif /* SQUID_SRC_URL_H_H */
index 809e54dac35b8cb71ccff6f7523a8141dd77dc5e..972e9536165f059b48646fad9d344fcb8ce9c88f 100644 (file)
@@ -37,6 +37,7 @@
 #include "squid.h"
 #include "acl/CertificateData.h"
 #include "acl/Checklist.h"
+#include "cache_cf.h"
 #include "protos.h"
 #include "wordlist.h"
 
index fb754cac73f81c597acf8bbbb3b5b01812933ce8..7ebc43d3a17969493a6a8bbf54536a3c10e0fc08 100644 (file)
@@ -39,6 +39,7 @@
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
 #include "acl/DomainData.h"
+#include "fqdncache.h"
 #include "HttpRequest.h"
 #include "ipcache.h"
 #include "protos.h"
index 071d0a29a6a4856c23a22d61b81b75b07401bd90..da5ff80ebc213c328566f44ba40fe1a7aaefaf50 100644 (file)
 #include "squid.h"
 #include "acl/DomainData.h"
 #include "acl/Checklist.h"
+#include "cache_cf.h"
 #include "Debug.h"
 #include "protos.h"
 #include "wordlist.h"
+#include "URL.h"
 
 template<class T>
 inline void
index 3733f9a9ee6ee37620167f5b9fcf0f56202f2eff..f78e369e8c5a458f67e100e4d552b8566db37dc9 100644 (file)
@@ -47,6 +47,7 @@
 #include "errorpage.h"
 #include "globals.h"
 #include "HttpRequest.h"
+#include "Mem.h"
 #include "protos.h"
 
 /* does name lookup, returns page_id */
index fcfc048c0d8d85fb19003cef7762ee930614fcfe..43f138cc8ecfe20bb54ab8bb7a674bba760fb5a6 100644 (file)
@@ -43,6 +43,7 @@
 #include "protos.h"
 #include "wordlist.h"
 #include "ConfigParser.h"
+#include "HttpHeaderTools.h"
 
 /* Construct an ACLHTTPHeaderData that uses an ACLRegex rule with the value of the
  * selected header from a given request.
index 863711ce15e421606e06ec6e4e0b64af3ac57b0f..53d9e8222985ddba7175e5d100954a134ca0be85 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "squid.h"
 #include "acl/IntRange.h"
+#include "cache_cf.h"
 #include "Debug.h"
 #include "wordlist.h"
 #include "Parsing.h"
index 2faeb7991b72ce8da0cb382881f1a62690b8ce05..e323856170514416c1170df103b2a74e3954682c 100644 (file)
@@ -36,6 +36,7 @@
 #include "squid.h"
 #include "acl/Ip.h"
 #include "acl/Checklist.h"
+#include "cache_cf.h"
 #include "Debug.h"
 #include "ip/tools.h"
 #include "MemBuf.h"
index 05fc0be9cb52dd34be451466030c7e6828bdad3e..c4b33239cacde74e43e6b6187f9e673f07e45d16 100644 (file)
@@ -37,6 +37,7 @@
 #include "squid.h"
 #include "acl/FilledChecklist.h"
 #include "acl/MaxConnection.h"
+#include "client_db.h"
 #include "Debug.h"
 #include "protos.h"
 #include "wordlist.h"
index 7d6630910e6d0178dbc53a6151f3c9bd53c357df..9205456e245903d3cedc510784014454aabd9bc3 100644 (file)
@@ -36,7 +36,9 @@
 
 #include "acl/FilledChecklist.h"
 #include "acl/Random.h"
+#include "cache_cf.h"
 #include "Debug.h"
+#include "Parsing.h"
 #include "protos.h"
 #include "wordlist.h"
 
index 4fcb56f48b1bb1958c7db9d4a030d876a40b13bd..b8bd5a3319344f98c28b852fd6c573e56f7ac8bc 100644 (file)
@@ -42,6 +42,7 @@
 #include "acl/Acl.h"
 #include "ConfigParser.h"
 #include "Debug.h"
+#include "Mem.h"
 #include "protos.h"
 #include "wordlist.h"
 
index c4a1c6ab4245387cb0603192b79aafb7ec2ff5e0..82c83710f30139171c1e51132f2df0e83c93a421 100644 (file)
@@ -39,6 +39,7 @@
 #include "acl/Checklist.h"
 #include "acl/RegexData.h"
 #include "acl/DomainData.h"
+#include "fqdncache.h"
 #include "HttpRequest.h"
 #include "protos.h"
 
index 68184f18d81488809d3ce56927af37990738a339..a625f06012147142e97f39231366b35dc83ab434 100644 (file)
@@ -37,6 +37,7 @@
 #include "squid.h"
 #include "acl/TimeData.h"
 #include "acl/Checklist.h"
+#include "cache_cf.h"
 #include "Debug.h"
 #include "protos.h"
 #include "wordlist.h"
index 9457c43c85c7c7fd212006e9bc82ecf66e36b700..7d02415546869d90e58ad593bab9ed0d759a1f12 100644 (file)
@@ -40,6 +40,7 @@
 #include "acl/RegexData.h"
 #include "protos.h"
 #include "rfc1738.h"
+#include "URL.h"
 
 int
 ACLUrlStrategy::match (ACLData<char const *> * &data, ACLFilledChecklist *checklist)
index ab52c2e454fdb0f193a864bfc3301d130c23fd3b..be11f3988afa41ae847cc091adedcc4853a477e8 100644 (file)
@@ -14,6 +14,7 @@
 #include "adaptation/ecap/XactionRep.h"
 #include "adaptation/ecap/Host.h" /* for protocol constants */
 #include "base/TextException.h"
+#include "URL.h"
 
 /* HeaderRep */
 
index cedd2a73f9530d6d8793299b3022a15fed309411..7778abc03369fc88c4b466672c3aeaf4c57fcbed 100644 (file)
 #include "comm.h"
 #include "comm/Connection.h"
 #include "err_detail_type.h"
+#include "HttpHeaderTools.h"
 #include "HttpMsg.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "protos.h"
 #include "SquidTime.h"
+#include "URL.h"
 
 // flow and terminology:
 //     HTTP| --> receive --> encode --> write --> |network
index 52a2b9200d588b487c399e54f89abbef06961dfa..50baf5c9b1cc08a969401774764d9944391fc3b8 100644 (file)
@@ -9,6 +9,7 @@
 #include "adaptation/icap/OptXact.h"
 #include "base/TextException.h"
 #include "comm.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "protos.h"
index 7ead755492b92d3e59d1766a78634397e787d1b3..b5a6ca938b8b318ad064291028e53d93771aa7df 100644 (file)
@@ -21,6 +21,7 @@
 #include "HttpRequest.h"
 #include "icap_log.h"
 #include "ipcache.h"
+#include "Mem.h"
 #include "pconn.h"
 #include "protos.h"
 #include "SquidTime.h"
index ef4230476344972952749639c5c67c04deb71686..0fdbacb0fee043892bed76a357af084d33cb46c8 100644 (file)
@@ -12,6 +12,7 @@
 #include "protos.h"
 #include "wordlist.h"
 #include "ConfigParser.h"
+#include "Parsing.h"
 
 ACL *
 ACLMaxUserIP::clone() const
index d8cef00b724ad9c8bd3cc686b4c4dc7778402b31..434d900ab56cb5232600d372d32a8d209ca44409 100644 (file)
 #include "auth/basic/UserRequest.h"
 #include "auth/Gadgets.h"
 #include "auth/State.h"
+#include "cache_cf.h"
 #include "charset.h"
 #include "mgr/Registration.h"
 #include "Store.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "protos.h"
 #include "rfc1738.h"
index 920c7290f0ee9b4309a2e5a9473da824cc2a8ea2..bb37ddf7498487557f666977adc069f25e18a3fe 100644 (file)
@@ -4,6 +4,7 @@
 #include "auth/digest/UserRequest.h"
 #include "auth/State.h"
 #include "charset.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "protos.h"
index c7713e84c50a6a6cca14f5e1d1ec811b47b2f41a..d98b804e4195cf21ed05a3b50e3a764392d681e1 100644 (file)
@@ -37,6 +37,7 @@
  * See acl.c for access control and client_side.c for auditing */
 
 #include "squid.h"
+#include "cache_cf.h"
 #include "rfc2617.h"
 #include "auth/digest/auth_digest.h"
 #include "auth/digest/Scheme.h"
@@ -47,6 +48,7 @@
 #include "base64.h"
 #include "base/StringArea.h"
 #include "event.h"
+#include "HttpHeaderTools.h"
 #include "mgr/Registration.h"
 #include "Store.h"
 #include "HttpRequest.h"
index 9acc2616f58ad1d0bea55e7978a7b80207f7d6c6..37478d0ccfa1a06b1097e8949d712f26a059157d 100644 (file)
@@ -6,6 +6,7 @@
 #include "client_side.h"
 #include "globals.h"
 #include "helper.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "protos.h"
index a82f0f0f932a215188974f0dc72644bf458ab548..4078bbb7286984a2cca411358f19ec5113bce991 100644 (file)
 #include "auth/negotiate/auth_negotiate.h"
 #include "auth/Gadgets.h"
 #include "auth/State.h"
+#include "cache_cf.h"
 #include "mgr/Registration.h"
 #include "Store.h"
 #include "client_side.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "protos.h"
index 354714185122132664c29a1e2fdeee1640d04460..f223aa5d610cda0888d75e5d319e7923f2ce0e51 100644 (file)
 #include "auth/ntlm/User.h"
 #include "auth/ntlm/UserRequest.h"
 #include "auth/State.h"
+#include "cache_cf.h"
 #include "mgr/Registration.h"
 #include "Store.h"
 #include "client_side.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "protos.h"
index 5b46c9bfb1483c9707e20bf5bc36c015f84204c2..75acb96bd43e868805b51fa4d5d0badccb755596 100644 (file)
 #include "acl/MethodData.h"
 #include "anyp/PortCfg.h"
 #include "base/RunnersRegistry.h"
+#include "cache_cf.h"
 #include "ConfigParser.h"
 #include "CpuAffinityMap.h"
 #include "DiskIO/DiskIOModule.h"
 #include "eui/Config.h"
+#include "ExternalACL.h"
 #include "format/Format.h"
 #include "globals.h"
+#include "HttpHeaderTools.h"
 #include "HttpRequestMethod.h"
 #include "ident/Config.h"
 #include "ip/Intercept.h"
 #include "ip/tools.h"
 #include "ipc/Kids.h"
 #include "log/Config.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "mgr/Registration.h"
 #include "Parsing.h"
+#include "PeerDigest.h"
 #include "protos.h"
 #include "rfc1738.h"
 #include "Store.h"
 #include "structs.h"
 #include "SwapDir.h"
 #include "wordlist.h"
+#include "neighbors.h"
+#include "tools.h"
+/* wccp2 has its own conditional definitions */
+#include "wccp2.h"
 #if USE_ADAPTATION
 #include "adaptation/Config.h"
 #endif
 #if HAVE_GLOB_H
 #include <glob.h>
 #endif
-
 #if HAVE_LIMITS_H
 #include <limits>
 #endif
-
 #if HAVE_LIST
 #include <list>
 #endif
diff --git a/src/cache_cf.h b/src/cache_cf.h
new file mode 100644 (file)
index 0000000..93f555b
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * DEBUG: section 03    Configuration File Parsing
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_CACHE_CF_H_
+#define SQUID_CACHE_CF_H_
+
+class wordlist;
+
+extern void configFreeMemory(void);
+extern void self_destruct(void);
+extern void add_http_port(char *portspec);
+
+/* extra functions from cache_cf.c useful for lib modules */
+extern void parse_int(int *var);
+extern void parse_onoff(int *var);
+extern void parse_eol(char *volatile *var);
+extern void parse_wordlist(wordlist ** list);
+extern void requirePathnameExists(const char *name, const char *path);
+extern void parse_time_t(time_t * var);
+
+#endif /* SQUID_CACHE_CF_H_ */
index 982bd5770b439154e5b0b718457dee9f0adab314..a53a94e472da36a3f67192f94c28ee26c363c6f4 100644 (file)
 #include "squid.h"
 #include "HttpRequest.h"
 #include "mgr/Registration.h"
+#include "neighbors.h"
 #include "protos.h"
 #include "Store.h"
+#include "URL.h"
 #include "URLScheme.h"
 
 #if HAVE_MATH_H
diff --git a/src/carp.h b/src/carp.h
new file mode 100644 (file)
index 0000000..c3799cd
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * DEBUG: section 39    Cache Array Routing Protocol
+ * AUTHOR: Henrik Nordstrom
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_CARP_H_
+#define SQUID_CARP_H_
+
+class peer;
+class HttpRequest;
+
+extern void carpInit(void);
+extern peer *carpSelectParent(HttpRequest *);
+
+#endif /* SQUID_CARP_H_ */
index 24f63c861c8a46f9879590cc46227c754c7bd982..d3eb6e6ab43523effba53752afce2d30f4c46314 100644 (file)
  */
 
 #include "squid.h"
+#include "client_db.h"
 #include "event.h"
 #include "format/Token.h"
 #include "ClientInfo.h"
+#include "fqdncache.h"
 #include "ip/Address.h"
+#include "log/access_log.h"
+#include "Mem.h"
 #include "mgr/Registration.h"
 #include "protos.h"
 #include "SquidMath.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "tools.h"
 
 static hash_table *client_table = NULL;
 
diff --git a/src/client_db.h b/src/client_db.h
new file mode 100644 (file)
index 0000000..81bdcaf
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * DEBUG: section 00    Client Database
+ * AUTHOR: Duane Wessels
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_CLIENT_DB_H_
+#define SQUID_CLIENT_DB_H_
+
+#include "anyp/ProtocolType.h"
+#include "enums.h"
+#include "ip/Address.h"
+
+class StoreEntry;
+class ClientInfo;
+
+extern void clientdbInit(void);
+extern void clientdbUpdate(const Ip::Address &, log_type, AnyP::ProtocolType, size_t);
+extern int clientdbCutoffDenied(const Ip::Address &);
+extern void clientdbDump(StoreEntry *);
+extern void clientdbFreeMemory(void);
+extern int clientdbEstablished(const Ip::Address &, int);
+
+#if USE_DELAY_POOLS
+extern void clientdbSetWriteLimiter(ClientInfo * info, const int writeSpeedLimit,const double initialBurst,const double highWatermark);
+extern ClientInfo * clientdbGetInfo(const Ip::Address &addr);
+#endif
+
+
+#endif /* SQUID_CLIENT_DB_H_ */
index 7ca0a4bc55d2cedc4d7394ce93afc247d9d1a75f..4a7bc3c90a4401308220281f4984366c9736d3ec 100644 (file)
  */
 
 #include "squid.h"
-
 #include "acl/FilledChecklist.h"
 #include "anyp/PortCfg.h"
 #include "base/Subscription.h"
 #include "base/TextException.h"
 #include "ChunkedCodingParser.h"
+#include "client_db.h"
 #include "client_side_reply.h"
 #include "client_side_request.h"
 #include "client_side.h"
 #include "CommCalls.h"
 #include "errorpage.h"
 #include "eui/Config.h"
+#include "fd.h"
 #include "fde.h"
 #include "forward.h"
+#include "fqdncache.h"
+#include "http.h"
 #include "HttpHdrContRange.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "ident/Config.h"
 #include "ident/Ident.h"
+#include "internal.h"
 #include "ipc/FdNotes.h"
 #include "ipc/StartListening.h"
+#include "log/access_log.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "MemObject.h"
 #include "profiler/Profiler.h"
 #include "StatHist.h"
 #include "Store.h"
 #include "TimeOrTag.h"
+#include "tools.h"
+#include "URL.h"
 
 #if USE_AUTH
 #include "auth/UserRequest.h"
index d66395d003389ada59cf91d2d194bcd0b84d5a60..62a916cffafc581055fc95a41d260624086242be 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * $Id$
- *
+ * DEBUG: section 33    Client-side Routines
+ * AUTHOR: Duane Wessels
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  * ----------------------------------------------------------
@@ -412,4 +412,12 @@ void setLogUri(ClientHttpRequest * http, char const *uri, bool cleanUrl = false)
 
 const char *findTrailingHTTPVersion(const char *uriAndHTTPVersion, const char *end = NULL);
 
+/* Vary support functions */
+extern int varyEvaluateMatch(StoreEntry * entry, HttpRequest * req);
+
+/* client_side.c - FD related client side routines */
+extern void clientOpenListenSockets(void);
+extern void clientHttpConnectionsClose(void);
+extern void httpRequestFree(void *);
+
 #endif /* SQUID_CLIENTSIDE_H */
index d087b58b43556a70e4722eb848af93f7cd47f374..cfccd658215d6186bc5b95fc13910e66a68455d3 100644 (file)
 #include "clientStream.h"
 #include "dlink.h"
 #include "errorpage.h"
+#include "fd.h"
 #include "fde.h"
 #include "format/Token.h"
 #include "forward.h"
 #include "globals.h"
 #include "globals.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "ip/QosConfig.h"
 #include "ipcache.h"
+#include "log/access_log.h"
 #include "MemObject.h"
+#include "neighbors.h"
 #include "protos.h"
+#include "refresh.h"
 #include "SquidTime.h"
 #include "Store.h"
 #include "StoreClient.h"
+#include "tools.h"
+#include "URL.h"
 #if USE_AUTH
 #include "auth/UserRequest.h"
 #endif
index 919d2dfbdf94731802f1d4d1663b7f8e25259620..9c2192ddbba8d0f8bafaeaa3279d3ffd3d7c0e01 100644 (file)
 #include "compat/inet_pton.h"
 #include "err_detail_type.h"
 #include "errorpage.h"
+#include "fd.h"
 #include "fde.h"
 #include "format/Token.h"
+#include "gopher.h"
+#include "http.h"
 #include "HttpHdrCc.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "ipcache.h"
 #include "ip/QosConfig.h"
+#include "log/access_log.h"
 #include "MemObject.h"
+#include "Parsing.h"
 #include "profiler/Profiler.h"
 #include "protos.h"
 #include "SquidTime.h"
 #include "Store.h"
+#include "tools.h"
+#include "URL.h"
 #include "wordlist.h"
 #if USE_AUTH
 #include "auth/UserRequest.h"
index 68640d0c21d5278b445f1ac6202473c40a022713..a296e7a1350a680b7d43be7ff484aa1f9bcf2a08 100644 (file)
@@ -199,17 +199,16 @@ private:
 };
 
 /* client http based routines */
-SQUIDCEXTERN char *clientConstructTraceEcho(ClientHttpRequest *);
+extern char *clientConstructTraceEcho(ClientHttpRequest *);
 
 class ACLFilledChecklist;
-SQUIDCEXTERN ACLFilledChecklist *clientAclChecklistCreate(const acl_access * acl,ClientHttpRequest * http);
-SQUIDCEXTERN int clientHttpRequestStatus(int fd, ClientHttpRequest const *http);
-SQUIDCEXTERN void clientAccessCheck(ClientHttpRequest *);
+extern ACLFilledChecklist *clientAclChecklistCreate(const acl_access * acl,ClientHttpRequest * http);
+extern int clientHttpRequestStatus(int fd, ClientHttpRequest const *http);
+extern void clientAccessCheck(ClientHttpRequest *);
 
 /* ones that should be elsewhere */
-SQUIDCEXTERN void redirectStart(ClientHttpRequest *, RH *, void *);
-
-SQUIDCEXTERN void tunnelStart(ClientHttpRequest *, int64_t *, int *);
+extern void redirectStart(ClientHttpRequest *, RH *, void *);
+extern void tunnelStart(ClientHttpRequest *, int64_t *, int *);
 
 #if _USE_INLINE_
 #include "Store.h"
index b2bbad35c3a6ccf84a1b688191e3993d846083f9..18d00aaaff52d784130f21fe57fd47ab205b17fe 100644 (file)
@@ -48,6 +48,7 @@
 #include "compat/cmsg.h"
 #include "DescriptorSet.h"
 #include "event.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "icmp/net_db.h"
index 4a5d6eb5857d70f4d189c9b587ce32fe01b66b52..7d708124fff0fbb3fd7ab894e54d9680c1f87347 100644 (file)
@@ -7,6 +7,7 @@
 #include "comm/Connection.h"
 #include "comm/Loops.h"
 #include "comm.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "icmp/net_db.h"
index d2d39e262b96f39191668c3d440ea3447cb8c907..a93f8743275b95ba23c8c6602cd96baf555f6a40 100644 (file)
@@ -36,6 +36,7 @@
 #include "anyp/PortCfg.h"
 #include "comm/Connection.h"
 #include "comm/Loops.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "ICP.h"
index 1ba79a603639248b9249823040406cec323a55ba..371cbbc7a07e859128207ea7a5c4efa3b2f2b845 100644 (file)
 
 #include "squid.h"
 #include "base/TextException.h"
+#include "client_db.h"
 #include "comm/AcceptLimiter.h"
 #include "CommCalls.h"
 #include "comm/comm_internal.h"
 #include "comm/Connection.h"
 #include "comm/Loops.h"
 #include "comm/TcpAcceptor.h"
+#include "fd.h"
 #include "fde.h"
 #include "ip/Intercept.h"
 #include "profiler/Profiler.h"
index 20c2f967b28ad70ff3a98acea602dd8ca1307f88..a9db6177dd92db519708f14aec3c8db91110e48b 100644 (file)
@@ -2,6 +2,7 @@
 #include "comm/Connection.h"
 #include "comm/IoCallback.h"
 #include "comm/Write.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "MemBuf.h"
index 90f7df2cac18bde12d211ffde12cd558c3eac507..eb31a75db42080457a43fe74f6c770e9efe74af6 100644 (file)
@@ -34,7 +34,9 @@
 
 #include "squid.h"
 #include "comm/Loops.h"
+#include "fd.h"
 #include "fde.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "profiler/Profiler.h"
 #include "protos.h"
diff --git a/src/disk.h b/src/disk.h
new file mode 100644 (file)
index 0000000..134784f
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * DEBUG: section 06    Disk I/O Routines
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_DISK_H_
+#define SQUID_DISK_H_
+
+#include "typedefs.h"
+
+class MemBuf;
+
+extern int file_open(const char *path, int mode);
+extern void file_close(int fd);
+
+/* Adapter file_write for object callbacks */
+template <class O>
+void
+FreeObject(void *address)
+{
+    O *anObject = static_cast <O *>(address);
+    delete anObject;
+}
+
+extern void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
+extern void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
+extern void file_read(int, char *, int, off_t, DRCB *, void *);
+extern void disk_init(void);
+
+#endif /* SQUID_DISK_H_ */
index c19826375afda53423d8d9d09c72322ef99a35f5..dfbc34998d61e8a0c767a64709296ae15f1c77da 100644 (file)
 #include "comm/Loops.h"
 #include "comm/Write.h"
 #include "event.h"
+#include "fd.h"
 #include "fde.h"
 #include "ip/tools.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "mgr/Registration.h"
 #include "protos.h"
index 3b618899de808c264844ff6b66fffa76a988fcf3..dbaeea9cb9965b4bbe2463393d8e6cb7f2088782 100644 (file)
  *
  */
 #include "squid.h"
+#include "cache_cf.h"
 #include "comm/Connection.h"
 #include "comm/Write.h"
+#include "disk.h"
 #include "err_detail_type.h"
 #include "errorpage.h"
-#if USE_AUTH
-#include "auth/UserRequest.h"
-#endif
-#include "SquidTime.h"
-#if USE_SSL
-#include "ssl/ErrorDetailManager.h"
-#endif
+#include "ftp.h"
 #include "Store.h"
 #include "html_quote.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "MemObject.h"
 #include "MemBuf.h"
 #include "protos.h"
 #include "rfc1738.h"
+#include "URL.h"
 #include "URLScheme.h"
+#include "URL.h"
+#include "tools.h"
 #include "wordlist.h"
+#if USE_AUTH
+#include "auth/UserRequest.h"
+#endif
+#include "SquidTime.h"
+#if USE_SSL
+#include "ssl/ErrorDetailManager.h"
+#endif
 
 /**
  \defgroup ErrorPageInternal Error Page Internals
index 9387561fceca26150f860d5d20ce1be21eac299b..cc008cdf7fbf07f7126b3d195d1c33968aa5c513 100644 (file)
@@ -57,6 +57,7 @@
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "ip/Address.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "profiler/Profiler.h"
 #include "protos.h"
index 5a61b1259d05880733738304f43356a07aa573a0..1f567d26d417082ea2b21528c7f9b3312ae455cb 100644 (file)
 #if (USE_SQUID_ESI == 1)
 
 #include "client_side_request.h"
+#include "client_side.h"
 #include "esi/Include.h"
 #include "esi/VarState.h"
 #include "HttpReply.h"
+#include "log/access_log.h"
 #include "protos.h"
 
 CBDATA_CLASS_INIT (ESIStreamContext);
index c268b14fced099586985c7f728cdd9002e6e9b0c..7ff261b0fb04876deed6719012dc75eae9e6e688 100644 (file)
@@ -37,6 +37,7 @@
 #include "squid.h"
 #include "esi/VarState.h"
 #include "HttpReply.h"
+#include "Mem.h"
 #include "protos.h"
 
 CBDATA_TYPE (ESIVarState);
index 85019696c41bd6f1cf167686cca8a7aad7854927..afa7068eddfaa5834b1662632911107734680770 100644 (file)
 #include "squid.h"
 #include "acl/Acl.h"
 #include "acl/FilledChecklist.h"
+#include "cache_cf.h"
 #include "client_side.h"
 #include "comm/Connection.h"
 #include "ExternalACLEntry.h"
 #include "ExternalACL.h"
 #include "fde.h"
 #include "helper.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "ip/tools.h"
@@ -59,6 +61,8 @@
 #include "SquidTime.h"
 #include "Store.h"
 #include "URLScheme.h"
+#include "tools.h"
+#include "URL.h"
 #include "wordlist.h"
 #if USE_SSL
 #include "ssl/support.h"
index f1a07db90fda26aa7a00fff8ae12fe04ecb7f027..1a4e6a356dec22f77d206afae6ce27cb3776a78f 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
@@ -36,6 +36,7 @@
 #include "squid.h"
 #include "comm/Loops.h"
 #include "Debug.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "profiler/Profiler.h"
diff --git a/src/fd.h b/src/fd.h
new file mode 100644 (file)
index 0000000..a6cbf68
--- /dev/null
+++ b/src/fd.h
@@ -0,0 +1,45 @@
+/*
+ * DEBUG: section 51    Filedescriptor Functions
+ * AUTHOR: Duane Wessels
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_FD_H_
+#define SQUID_FD_H_
+
+extern void fd_close(int fd);
+extern void fd_open(int fd, unsigned int type, const char *);
+extern void fd_note(int fd, const char *);
+extern void fd_bytes(int fd, int len, unsigned int type);
+extern void fdDumpOpen(void);
+extern int fdUsageHigh(void);
+extern void fdAdjustReserved(void);
+
+#endif /* SQUID_FD_H_ */
index b81b718892fe50f60185b9b05f65e4ba7cc47515..3c1add0e01b09ec2b1e38c1a2b00da09efc5b38b 100644 (file)
@@ -1,4 +1,5 @@
 #include "squid.h"
+#include "cache_cf.h"
 #include "format/Config.h"
 #include "protos.h"
 #include <list>
index 4e47cc353ec0f65e7a82e936be1ef49a36928640..55117194a5f80a78234feac7d7b0a417d11cd8ce 100644 (file)
@@ -8,12 +8,14 @@
 #include "format/Format.h"
 #include "format/Quoting.h"
 #include "format/Token.h"
+#include "fqdncache.h"
 #include "HttpRequest.h"
 #include "MemBuf.h"
 #include "protos.h"
 #include "rfc1738.h"
 #include "SquidTime.h"
 #include "Store.h"
+#include "URL.h"
 #if USE_SSL
 #include "ssl/ErrorDetail.h"
 #endif
index c0ec60f4523197cd3e4b348ef75e39855ef9895f..0162b2d64b5cc5ce1b91f584b3772f7750ff2fbd 100644 (file)
 #include "CommCalls.h"
 #include "errorpage.h"
 #include "event.h"
+#include "fd.h"
 #include "fde.h"
 #include "forward.h"
+#include "ftp.h"
 #include "globals.h"
+#include "gopher.h"
 #include "hier_code.h"
+#include "http.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "icmp/net_db.h"
+#include "internal.h"
 #include "ip/Intercept.h"
 #include "ip/QosConfig.h"
 #include "ip/tools.h"
 #include "MemObject.h"
 #include "mgr/Registration.h"
+#include "neighbors.h"
 #include "pconn.h"
 #include "PeerSelectState.h"
 #include "protos.h"
 #include "SquidTime.h"
 #include "Store.h"
+#include "whois.h"
 #if USE_SSL
 #include "ssl/support.h"
 #include "ssl/ErrorDetail.h"
index 771160e7ccd6bc688a44f88bb1614b0adfb5fed0..9bf85bf30cb9023680ce350f47979ba1a323c686 100644 (file)
@@ -36,6 +36,7 @@
 #include "cbdata.h"
 #include "DnsLookupDetails.h"
 #include "event.h"
+#include "Mem.h"
 #include "mgr/Registration.h"
 #include "protos.h"
 #include "SquidDns.h"
@@ -586,50 +587,6 @@ fqdncache_nbgethostbyaddr(const Ip::Address &addr, FQDNH * handler, void *handle
 #endif
 }
 
-/// \ingroup FQDNCacheInternal
-static void
-fqdncacheRegisterWithCacheManager(void)
-{
-    Mgr::RegisterAction("fqdncache", "FQDN Cache Stats and Contents",
-                        fqdnStats, 0, 1);
-
-}
-
-/**
- \ingroup FQDNCacheAPI
- *
- * Initialize the fqdncache.
- * Called after IP cache initialization.
- */
-void
-fqdncache_init(void)
-{
-    int n;
-
-    fqdncacheRegisterWithCacheManager();
-
-    if (fqdn_table)
-        return;
-
-    debugs(35, 3, "Initializing FQDN Cache...");
-
-    memset(&FqdncacheStats, '\0', sizeof(FqdncacheStats));
-
-    memset(&lru_list, '\0', sizeof(lru_list));
-
-    fqdncache_high = (long) (((float) Config.fqdncache.size *
-                              (float) FQDN_HIGH_WATER) / (float) 100);
-
-    fqdncache_low = (long) (((float) Config.fqdncache.size *
-                             (float) FQDN_LOW_WATER) / (float) 100);
-
-    n = hashPrime(fqdncache_high / 4);
-
-    fqdn_table = hash_create((HASHCMP *) strcmp, n, hash4);
-
-    memDataInit(MEM_FQDNCACHE_ENTRY, "fqdncache_entry",
-                sizeof(fqdncache_entry), 0);
-}
 
 /**
  \ingroup FQDNCacheAPI
@@ -743,6 +700,7 @@ fqdnStats(StoreEntry * sentry)
 }
 
 /// \ingroup FQDNCacheAPI
+#if 0
 const char *
 fqdnFromAddr(const Ip::Address &addr)
 {
@@ -758,6 +716,7 @@ fqdnFromAddr(const Ip::Address &addr)
 
     return buf;
 }
+#endif
 
 /// \ingroup FQDNCacheInternal
 static void
@@ -870,6 +829,51 @@ fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames)
     fqdncacheLockEntry(fce);
 }
 
+/// \ingroup FQDNCacheInternal
+static void
+fqdncacheRegisterWithCacheManager(void)
+{
+    Mgr::RegisterAction("fqdncache", "FQDN Cache Stats and Contents",
+                        fqdnStats, 0, 1);
+
+}
+
+/**
+ \ingroup FQDNCacheAPI
+ *
+ * Initialize the fqdncache.
+ * Called after IP cache initialization.
+ */
+void
+fqdncache_init(void)
+{
+    int n;
+
+    fqdncacheRegisterWithCacheManager();
+
+    if (fqdn_table)
+        return;
+
+    debugs(35, 3, "Initializing FQDN Cache...");
+
+    memset(&FqdncacheStats, '\0', sizeof(FqdncacheStats));
+
+    memset(&lru_list, '\0', sizeof(lru_list));
+
+    fqdncache_high = (long) (((float) Config.fqdncache.size *
+                              (float) FQDN_HIGH_WATER) / (float) 100);
+
+    fqdncache_low = (long) (((float) Config.fqdncache.size *
+                             (float) FQDN_LOW_WATER) / (float) 100);
+
+    n = hashPrime(fqdncache_high / 4);
+
+    fqdn_table = hash_create((HASHCMP *) strcmp, n, hash4);
+
+    memDataInit(MEM_FQDNCACHE_ENTRY, "fqdncache_entry",
+                sizeof(fqdncache_entry), 0);
+}
+
 #if SQUID_SNMP
 /**
  *  \ingroup FQDNCacheAPI
diff --git a/src/fqdncache.h b/src/fqdncache.h
new file mode 100644 (file)
index 0000000..e0119cf
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * DEBUG: section 35    FQDN Cache
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_FQDNCACHE_H_
+#define SQUID_FQDNCACHE_H_
+
+#include "ip/Address.h"
+#include "typedefs.h"
+
+class StoreEntry;
+class wordlist;
+
+extern void fqdncache_init(void);
+void fqdnStats(StoreEntry *);
+//extern void fqdncacheReleaseInvalid(const char *);
+//extern int fqdncacheQueueDrain(void);
+extern void fqdncacheFreeMemory(void);
+extern void fqdncache_restart(void);
+extern void fqdncache_purgelru(void *);
+extern void fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames);
+
+extern const char *fqdncache_gethostbyaddr(const Ip::Address &, int flags);
+//extern const char *fqdnFromAddr(const Ip::Address &);
+extern void fqdncache_nbgethostbyaddr(const Ip::Address &, FQDNH *, void *);
+
+
+
+
+#endif /* SQUID_FQDNCACHE_H_ */
index 6d57ddad2d2e8ec4d867c6c30465d6b066d50886..554af54dd539e8f27a05f6cce79dd3b628d80721 100644 (file)
 
 #include "squid.h"
 #include "CossSwapDir.h"
+#include "cache_cf.h"
 #include "Store.h"
 #include "store_coss.h"
+#include "disk.h"
 #include "event.h"
 #include "fde.h"
 #include "SwapDir.h"
@@ -47,6 +49,7 @@
 #include "ConfigOption.h"
 #include "StoreFScoss.h"
 #include "Parsing.h"
+#include "store_key_md5.h"
 #include "swap_log_op.h"
 #include "SquidMath.h"
 
index 94e84b157055f191ea38cd1774ee016745f1c452..0d62591d1585b469dcd021c366d6e69af6153983 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include "squid.h"
+#include "disk.h"
 #include "fs/rock/RockRebuild.h"
 #include "fs/rock/RockSwapDir.h"
 #include "fs/rock/RockDbCell.h"
index 9e45a0b01e5cc004a4aa432e71acedd31611637d..7bef29a71f84a71b186ac7aa1b6f8f5931fb7d87 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include "squid.h"
+#include "cache_cf.h"
 #include "ConfigOption.h"
 #include "DiskIO/DiskIOModule.h"
 #include "DiskIO/DiskIOStrategy.h"
index 976b276ad8e3f38ccaba5c672c4e98bdc07c2fa7..28f694b8f9c75af4af858b9763b56dca9259307b 100644 (file)
  */
 
 #include "squid.h"
+#include "disk.h"
 #include "protos.h"
 #include "RebuildState.h"
 #include "SquidTime.h"
+#include "store_key_md5.h"
 #include "StoreSwapLogData.h"
 #include "UFSSwapLogParser.h"
 
index 14f95378e13aecec66c9c87d478c549dbdbfb07e..b72626d9189b7a18d7e3394a33718de8e64171e1 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  */
 
-#include "squid.h"
-
 #define CLEAN_BUF_SZ 16384
 
+#include "squid.h"
+#include "cache_cf.h"
+#include "disk.h"
 #include "ConfigOption.h"
 #include "DiskIO/DiskIOModule.h"
 #include "FileMap.h"
@@ -42,6 +43,7 @@
 #include "RebuildState.h"
 #include "SquidMath.h"
 #include "DiskIO/DiskIOStrategy.h"
+#include "store_key_md5.h"
 #include "StoreSearchUFS.h"
 #include "StoreSwapLogData.h"
 #include "SquidTime.h"
index 46d1aa67e7f175c5d7d2f31d5d36bfe1cb561272..645bdd6348ed07dfbeee10abc225a1bb96fc1b13 100644 (file)
@@ -40,6 +40,7 @@
 #include "CommCalls.h"
 #include "compat/strtoll.h"
 #include "errorpage.h"
+#include "fd.h"
 #include "fde.h"
 #include "forward.h"
 #include "html_quote.h"
@@ -49,6 +50,7 @@
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "ip/tools.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "protos.h"
 #include "rfc1738.h"
@@ -57,6 +59,8 @@
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "tools.h"
+#include "URL.h"
 #include "URLScheme.h"
 #include "wordlist.h"
 
diff --git a/src/ftp.h b/src/ftp.h
new file mode 100644 (file)
index 0000000..a3d2abd
--- /dev/null
+++ b/src/ftp.h
@@ -0,0 +1,49 @@
+/*
+ * DEBUG: section 09    File Transfer Protocol (FTP)
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#ifndef SQUID_FTP_H_
+#define SQUID_FTP_H_
+
+class FwdState;
+
+/**
+ * \defgroup ServerProtocolFTPAPI Server-Side FTP API
+ * \ingroup ServerProtocol
+ */
+
+/// \ingroup ServerProtocolFTPAPI
+extern void ftpStart(FwdState *);
+/// \ingroup ServerProtocolFTPAPI
+extern const char *ftpUrlWith2f(HttpRequest *);
+
+
+#endif /* SQUID_FTP_H_ */
index 1888949064a392916802744cb8bacad98e9fd218..7ca4a5f6c99bfc495980e7f8667ccbc76f48f879 100644 (file)
 #include "comm.h"
 #include "comm/Write.h"
 #include "errorpage.h"
+#include "fd.h"
 #include "forward.h"
 #include "html_quote.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "protos.h"
 #include "rfc1738.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "tools.h"
 
 #if USE_DELAY_POOLS
 #include "DelayPools.h"
diff --git a/src/gopher.h b/src/gopher.h
new file mode 100644 (file)
index 0000000..f8b0827
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * DEBUG: section 10    Gopher
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_GOPHER_H_
+#define SQUID_GOPHER_H_
+
+class FwdState;
+class HttpRequest;
+
+/**
+ \defgroup ServerProtocolGopherAPI Server-Side Gopher API
+ \ingroup ServerProtocol
+ */
+
+/// \ingroup ServerProtocolGopherAPI
+extern void gopherStart(FwdState *);
+
+/// \ingroup ServerProtocolGopherAPI
+extern int gopherCachable(const HttpRequest *);
+
+
+#endif /* SQUID_GOPHER_H_ */
index 27b641325017ada456c53ed72e99fc4ac37667c2..5bf1ad27407b2bc17cef4d2548052e8e34bf6a59 100644 (file)
 #include "comm.h"
 #include "comm/Connection.h"
 #include "comm/Write.h"
+#include "fd.h"
 #include "format/Quoting.h"
 #include "helper.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "protos.h"
 #include "SquidMath.h"
index 8150bcbd454b5840247d30af79aa74f435f33b91..22a3bf68bde85189735ae0378c828c2776b36b22 100644 (file)
 #include "md5.h"
 #include "MemBuf.h"
 #include "protos.h"
+#include "refresh.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
+#include "store_key_md5.h"
 #include "Store.h"
 #include "StoreClient.h"
+#include "URL.h"
 
 typedef struct _Countstr Countstr;
 
index 73c4c08d22f68c7f25a6efc8549e622318339c8b..eb8b40eae690445e77db123304c56ae11108c366 100644 (file)
@@ -48,6 +48,7 @@
 #include "comm/Write.h"
 #include "err_detail_type.h"
 #include "errorpage.h"
+#include "fd.h"
 #include "fde.h"
 #include "HttpControlMsg.h"
 #include "http.h"
 #include "HttpHdrContRange.h"
 #include "HttpHdrSc.h"
 #include "HttpHdrScTarget.h"
+#include "HttpHeaderTools.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "log/access_log.h"
 #include "MemBuf.h"
 #include "MemObject.h"
+#include "neighbors.h"
 #include "profiler/Profiler.h"
 #include "protos.h"
+#include "refresh.h"
 #include "rfc1738.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "tools.h"
+#include "URL.h"
 
 #if USE_AUTH
 #include "auth/UserRequest.h"
index 4cae62d5390de16311b73565a344b30381b2904f..274bd3c53146c7a3936b806df7cbe23663729a36 100644 (file)
@@ -135,4 +135,9 @@ private:
     CBDATA_CLASS2(HttpStateData);
 };
 
+extern int httpCachable(const HttpRequestMethod&);
+extern void httpStart(FwdState *);
+extern const char *httpMakeVaryMark(HttpRequest * request, HttpReply const * reply);
+
+
 #endif /* SQUID_HTTP_H */
index 82a1599c2b8f5c6ce78e6d31b3f4e58088088ae9..776683ff937d6181844d165c6e988b2c47323447 100644 (file)
@@ -35,6 +35,7 @@
 #include "squid.h"
 #include "comm.h"
 #include "comm/Loops.h"
+#include "fd.h"
 #include "icmp/IcmpSquid.h"
 #include "icmp/net_db.h"
 #include "ip/tools.h"
index cffe9b7c1c70fb8ed2f68ca04bd47a15cfa4b311..9d9fd66e30b8caa9c7d4620fd90bbdc55f53164b 100644 (file)
 #include "MemObject.h"
 #include "fde.h"
 #include "forward.h"
+#include "internal.h"
 #include "protos.h"
 #include "SquidTime.h"
 #include "wordlist.h"
 #include "ip/Address.h"
+#include "neighbors.h"
+#include "URL.h"
+#include "Mem.h"
+#include "disk.h"
+
 
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
index 075377a3df3c71571e39d987da0851cebb75bb58..ce1e6d6353aa532f30a8ddf1f7719e08e4d2cd0c 100644 (file)
 #include "AccessLogEntry.h"
 #include "acl/Acl.h"
 #include "acl/FilledChecklist.h"
+#include "client_db.h"
 #include "comm.h"
 #include "comm/Connection.h"
 #include "comm/Loops.h"
 #include "comm/UdpOpenDialer.h"
+#include "fd.h"
 #include "HttpRequest.h"
 #include "icmp/net_db.h"
 #include "ICP.h"
 #include "ip/tools.h"
 #include "ipcache.h"
 #include "md5.h"
+#include "neighbors.h"
 #include "protos.h"
+#include "refresh.h"
 #include "rfc1738.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "SwapDir.h"
+#include "tools.h"
 #include "wordlist.h"
 
 #if HAVE_ERRNO_H
index 118df8a8a70fd9e4752940dbfc6253254d9e1804..a054b89c90020c75e037240864acfe64bb92b2b8 100644 (file)
@@ -44,6 +44,8 @@
 #include "MemBuf.h"
 #include "protos.h"
 #include "SquidTime.h"
+#include "tools.h"
+#include "URL.h"
 #include "wordlist.h"
 
 /* called when we "miss" on an internal object;
diff --git a/src/internal.h b/src/internal.h
new file mode 100644 (file)
index 0000000..7595f93
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * DEBUG: section 76    Internal Squid Object handling
+ * AUTHOR: Duane, Alex, Henrik
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_INTERNAL_H_
+#define SQUID_INTERNAL_H_
+
+#include "comm/forward.h"
+class HttpRequest;
+class StoreEntry;
+
+extern void internalStart(const Comm::ConnectionPointer &clientConn, HttpRequest *, StoreEntry *);
+extern int internalCheck(const char *urlpath);
+extern int internalStaticCheck(const char *urlpath);
+extern char *internalLocalUri(const char *dir, const char *name);
+extern char *internalRemoteUri(const char *, unsigned short, const char *, const char *);
+extern const char *internalHostname(void);
+extern int internalHostnameIs(const char *);
+
+
+
+#endif /* SQUID_INTERNAL_H_ */
index 97fbd9c06b4ba8274b9c710eaa5c921a9836b7fb..efa59dba83080876884a77bf4e298c3395723dd1 100644 (file)
@@ -1,6 +1,7 @@
 #include "squid.h"
 
 #include "acl/Gadgets.h"
+#include "cache_cf.h"
 #include "comm/Connection.h"
 #include "ConfigParser.h"
 #include "fde.h"
index 9f0cb0cdab7bb84542192577ab0aab47a3fdd485..adb493a65ce685c45bc577d81294ff0f9da2e22e 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "squid.h"
 #include "comm/Connection.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "ip/Address.h"
index 846d96c5dc8d123a642ea528f0b61bf84a425fca..1a97436ac4418bc0cf152e19bc54b639f3ca7d5a 100644 (file)
@@ -7,6 +7,7 @@
 #include "squid.h"
 #include "protos.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "ipc/StoreMap.h"
 
 Ipc::StoreMap::Owner *
index 31ac49208c4cd7a1372ecbd6ec9dbcaf4d69f049..bd42e38d986b06fb6f6b6c19d94cd852d69470f1 100644 (file)
@@ -34,7 +34,9 @@
  */
 
 #include "squid.h"
+#include "cache_cf.h"
 #include "comm.h"
+#include "fd.h"
 #include "fde.h"
 #include "ip/Address.h"
 #include "rfc1738.h"
index 227b3ab0762972c9d46928f5226c50685a23485d..b032ed203d210e6f64fdf60601f5128c6e498a40 100644 (file)
@@ -38,6 +38,7 @@
 #include "ip/Address.h"
 #include "ip/tools.h"
 #include "ipcache.h"
+#include "Mem.h"
 #include "mgr/Registration.h"
 #include "protos.h"
 #include "rfc3596.h"
index 8ec4e96a72329fcf0b29d9369d62826139a2b7fd..9ba1889bcc30f219343ca63031879e34507b0e24 100644 (file)
@@ -34,6 +34,7 @@
  */
 
 #include "squid.h"
+#include "Mem.h"
 #include "protos.h"
 #include "typedefs.h"
 
index 37dc7e5a5fe97b2c0d8b4129668ca32990d287bf..d39bcaa0a3ba6c5c242c61a9ab4c01096803f9ff 100644 (file)
@@ -1,4 +1,5 @@
 #include "squid.h"
+#include "cache_cf.h"
 #include "log/Config.h"
 #include "protos.h"
 
index 1c8c6086f3cee1361376129911bc2bc16142dbee..3574fa8180d7ce628cee99744209420fef2de599 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "AccessLogEntry.h"
 #include "format/Quoting.h"
+#include "fqdncache.h"
 #include "HttpRequest.h"
 #include "log/File.h"
 #include "log/Formats.h"
index 48a083b603704ab2a29f5fafcafd69b664b6f146..5018962d7484c445e993645244e9b502be4dd87f 100644 (file)
@@ -4,6 +4,7 @@ include $(top_srcdir)/src/TestHeaders.am
 noinst_LTLIBRARIES = liblog.la
 
 liblog_la_SOURCES = \
+       access_log.h \
        access_log.cc \
        Config.cc \
        Config.h \
index 0de3d88ccf83bcd46316e5c75a67f2545d4618de..1a8c6206cd59e3d86c055fd950ff4741a80bc45a 100644 (file)
@@ -31,6 +31,8 @@
  */
 
 #include "squid.h"
+#include "disk.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "log/File.h"
index dad3fa140cea16ccb072f42d1ce8afb3f9b333ed..bc52a92c078c6ac4fa7d3e0232fff788b020510f 100644 (file)
@@ -34,6 +34,8 @@
 #include "squid.h"
 #include "comm.h"
 #include "comm/Connection.h"
+#include "disk.h"
+#include "fd.h"
 #include "log/File.h"
 #include "log/ModTcp.h"
 #include "Parsing.h"
index 8ef18dba2de62984d42d67b03ca7cc380641ae4e..9c5daf56ecb66a3bdc95ccffe28bf90f96a08e7d 100644 (file)
@@ -33,6 +33,8 @@
 #include "squid.h"
 #include "comm.h"
 #include "comm/Connection.h"
+#include "disk.h"
+#include "fd.h"
 #include "log/File.h"
 #include "log/ModUdp.h"
 #include "Parsing.h"
index f8f0188ab3bf63375f2ca74ba1998ba7e52ae915..3f626a0e66c57fe5e93ccc1921cd3ae2a0c5b210 100644 (file)
@@ -44,6 +44,7 @@
 #include "hier_code.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "log/access_log.h"
 #include "log/Config.h"
 #include "log/File.h"
 #include "log/Formats.h"
diff --git a/src/log/access_log.h b/src/log/access_log.h
new file mode 100644 (file)
index 0000000..92c0b7e
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * DEBUG: section 46    Access Log
+ * AUTHOR: Duane Wessels
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ * 
+ */
+
+#ifndef SQUID_LOG_ACCESS_LOG_H_
+#define SQUID_LOG_ACCESS_LOG_H_
+
+
+extern int logTypeIsATcpHit(log_type);
+extern void fvdbCountVia(const char *key);
+extern void fvdbCountForw(const char *key);
+
+#if HEADERS_LOG
+class HttpRequestMethod;
+extern void headersLog(int cs, int pq, const HttpRequestMethod& m, void *data);
+#endif
+
+
+#endif /* SQUID_LOG_ACCESS_LOG_H_ */
index 35a2ed257b626f6c5978cb4539a87bc832d01e97..eb0a33060344fa5d6d8aa15003cd3cfa1d50cc3e 100644 (file)
 #include "base/RunnersRegistry.h"
 #include "base/Subscription.h"
 #include "base/TextException.h"
+#include "cache_cf.h"
+#include "carp.h"
+#include "client_db.h"
+#include "client_side.h"
 #include "comm.h"
 #include "ConfigParser.h"
 #include "CpuAffinity.h"
+#include "disk.h"
 #include "DiskIO/DiskIOModule.h"
 #include "errorpage.h"
 #include "event.h"
 #include "EventLoop.h"
 #include "ExternalACL.h"
+#include "fd.h"
 #include "format/Token.h"
 #include "forward.h"
 #include "fs/Module.h"
-#include "fs/Module.h"
+#include "fqdncache.h"
 #include "htcp.h"
+#include "HttpHeader.h"
 #include "HttpReply.h"
 #include "icmp/IcmpSquid.h"
 #include "icmp/net_db.h"
 #include "ip/tools.h"
 #include "Mem.h"
 #include "MemPool.h"
+#include "neighbors.h"
 #include "pconn.h"
 #include "PeerSelectState.h"
+#include "peer_sourcehash.h"
+#include "peer_userhash.h"
 #include "profiler/Profiler.h"
 #include "protos.h"
+#include "refresh.h"
+#include "tools.h"
 #include "SquidDns.h"
 #include "SquidTime.h"
+#include "stat.h"
 #include "StatCounters.h"
 #include "StoreFileSystem.h"
 #include "Store.h"
 #include "SwapDir.h"
+#include "URL.h"
+#include "wccp.h"
+#include "wccp2.h"
 
 #if USE_ADAPTATION
 #include "adaptation/Config.h"
index 90992ade037c1805ddd63229ecd4be3a24132625..7a87f71365b267b56b34c963c7e20103cfff5809 100644 (file)
 #include <ostream>
 #endif
 
+/* forward declarations */
+static void memFree2K(void *);
+static void memFree4K(void *);
+static void memFree8K(void *);
+static void memFree16K(void *);
+static void memFree32K(void *);
+static void memFree64K(void *);
+
 /* module globals */
 const size_t squidSystemPageSize=getpagesize();
 
index 9e63b7bc421e6d41a4c65e84bb78c481440be26e..e8d94a24c2dac7041bea4d72d0031147009dc253 100644 (file)
  */
 
 #include "squid.h"
+#include "disk.h"
 #include "fde.h"
 #include "globals.h"
 #include "HttpHdrCc.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "internal.h"
+#include "Mem.h"
 #include "MemBuf.h"
 #include "MemObject.h"
 #include "protos.h"
index 2b78b1769a474d19c97431e6b11a783f45315dd8..373dc27ddfb211ed9b75fa83470bc2cbedc2ade2 100644 (file)
@@ -33,6 +33,7 @@
 #include "squid.h"
 #include "acl/FilledChecklist.h"
 #include "anyp/PortCfg.h"
+#include "CacheDigest.h"
 #include "comm/Connection.h"
 #include "comm/ConnOpener.h"
 #include "event.h"
 #include "ipcache.h"
 #include "MemObject.h"
 #include "mgr/Registration.h"
+#include "neighbors.h"
 #include "PeerDigest.h"
 #include "PeerSelectState.h"
 #include "protos.h"
 #include "SquidMath.h"
 #include "SquidTime.h"
+#include "stat.h"
 #include "Store.h"
+#include "store_key_md5.h"
+#include "URL.h"
 
 /* count mcast group peers every 15 minutes */
 #define MCAST_COUNT_RATE 900
diff --git a/src/neighbors.h b/src/neighbors.h
new file mode 100644 (file)
index 0000000..a045f9e
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * DEBUG: section 15    Neighbor Routines
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_NEIGHBORS_H_
+#define SQUID_NEIGHBORS_H_
+
+#include "enums.h"
+#include "HttpRequestMethod.h"
+#include "lookup_t.h"
+#include "ip/Address.h"
+#include "typedefs.h"
+
+class HttpRequest;
+class peer;
+class StoreEntry;
+
+SQUIDCEXTERN peer *getFirstPeer(void);
+SQUIDCEXTERN peer *getFirstUpParent(HttpRequest *);
+SQUIDCEXTERN peer *getNextPeer(peer *);
+SQUIDCEXTERN peer *getSingleParent(HttpRequest *);
+SQUIDCEXTERN int neighborsCount(HttpRequest *);
+SQUIDCEXTERN int neighborsUdpPing(HttpRequest *,
+                                  StoreEntry *,
+                                  IRCB * callback,
+                                  void *data,
+                                  int *exprep,
+                                  int *timeout);
+SQUIDCEXTERN void neighborAddAcl(const char *, const char *);
+
+SQUIDCEXTERN void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &);
+SQUIDCEXTERN void neighborAdd(const char *, const char *, int, int, int, int, int);
+SQUIDCEXTERN void neighbors_init(void);
+#if USE_HTCP
+SQUIDCEXTERN void neighborsHtcpClear(StoreEntry *, const char *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason);
+#endif
+SQUIDCEXTERN peer *peerFindByName(const char *);
+SQUIDCEXTERN peer *peerFindByNameAndPort(const char *, unsigned short);
+SQUIDCEXTERN peer *getDefaultParent(HttpRequest * request);
+SQUIDCEXTERN peer *getRoundRobinParent(HttpRequest * request);
+SQUIDCEXTERN peer *getWeightedRoundRobinParent(HttpRequest * request);
+SQUIDCEXTERN void peerClearRRStart(void);
+SQUIDCEXTERN void peerClearRR(void);
+SQUIDCEXTERN lookup_t peerDigestLookup(peer * p, HttpRequest * request);
+SQUIDCEXTERN peer *neighborsDigestSelect(HttpRequest * request);
+SQUIDCEXTERN void peerNoteDigestLookup(HttpRequest * request, peer * p, lookup_t lookup);
+SQUIDCEXTERN void peerNoteDigestGone(peer * p);
+SQUIDCEXTERN int neighborUp(const peer * e);
+SQUIDCEXTERN CBDUNL peerDestroy;
+SQUIDCEXTERN const char *neighborTypeStr(const peer * e);
+SQUIDCEXTERN peer_t neighborType(const peer *, const HttpRequest *);
+SQUIDCEXTERN void peerConnectFailed(peer *);
+SQUIDCEXTERN void peerConnectSucceded(peer *);
+SQUIDCEXTERN void dump_peer_options(StoreEntry *, peer *);
+SQUIDCEXTERN int peerHTTPOkay(const peer *, HttpRequest *);
+
+SQUIDCEXTERN peer *whichPeer(const Ip::Address &from);
+
+#endif /* SQUID_NEIGHBORS_H_ */
index a987c4b31d0a4d80db741fb64194eb0846ca56e1..a57f6c3ffce6483db6cf0a350c929272dbe23e7f 100644 (file)
@@ -35,6 +35,7 @@
 #include "squid.h"
 #include "comm.h"
 #include "comm/Connection.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "mgr/Registration.h"
index 93f15c9f3b785ff192a75c83e378482e49af2063..14f27d1f7e8eac13764bfb31c663aa9f6805b87a 100644 (file)
 
 #include "squid.h"
 #if USE_CACHE_DIGESTS
+#include "CacheDigest.h"
 #include "event.h"
 #include "forward.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "internal.h"
 #include "MemObject.h"
+#include "neighbors.h"
 #include "PeerDigest.h"
 #include "protos.h"
 #include "SquidTime.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "StoreClient.h"
+#include "tools.h"
 
 /* local types */
 
index 2be99c442c2eaf7e5395bb9e401f7b84da2cba4f..ad11bb0600b74f63c4bb3a20ba3ee7013553ac2e 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "squid.h"
 #include "acl/FilledChecklist.h"
+#include "carp.h"
 #include "client_side.h"
 #include "DnsLookupDetails.h"
 #include "errorpage.h"
 #include "icmp/net_db.h"
 #include "ICP.h"
 #include "ipcache.h"
+#include "Mem.h"
+#include "neighbors.h"
+#include "peer_sourcehash.h"
+#include "peer_userhash.h"
 #include "PeerSelectState.h"
 #include "protos.h"
 #include "SquidTime.h"
index 57ad36ab07c795c51e48c1529f7864fdef33bc31..eac8fd96079571d5d819ffceb8f9c200890187a1 100644 (file)
@@ -37,6 +37,7 @@
 #include "squid.h"
 #include "HttpRequest.h"
 #include "mgr/Registration.h"
+#include "neighbors.h"
 #include "protos.h"
 #include "Store.h"
 
diff --git a/src/peer_sourcehash.h b/src/peer_sourcehash.h
new file mode 100644 (file)
index 0000000..869a47f
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * DEBUG: section 39    Peer source hash based selection
+ * AUTHOR: Henrik Nordstrom
+ * BASED ON: carp.cc
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_PEER_SOURCEHASH_H_
+#define SQUID_PEER_SOURCEHASH_H_
+
+class peer;
+class HttpRequest;
+
+extern void peerSourceHashInit(void);
+extern peer * peerSourceHashSelectParent(HttpRequest * request);
+
+
+
+#endif /* SQUID_PEER_SOURCEHASH_H_ */
index 11ea331f4d2c31b6693066527189a8235eb5e014..0ac165f384a95b96f44b1a1c47d0b87f140bafd6 100644 (file)
@@ -42,6 +42,7 @@
 #include "globals.h"
 #include "HttpRequest.h"
 #include "mgr/Registration.h"
+#include "neighbors.h"
 #include "protos.h"
 #include "Store.h"
 
diff --git a/src/peer_userhash.h b/src/peer_userhash.h
new file mode 100644 (file)
index 0000000..4a026ca
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * DEBUG: section 39    Peer user hash based selection
+ * AUTHOR: Henrik Nordstrom
+ * BASED ON: carp.cc
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_PEER_USERHASH_H_
+#define SQUID_PEER_USERHASH_H_
+
+class peer;
+class HttpRequest;
+
+extern void peerUserHashInit(void);
+extern peer * peerUserHashSelectParent(HttpRequest * request);
+
+#endif /* SQUID_PEER_USERHASH_H_ */
index b49336a21d8398891bd5930a70bd3ba1818305dd..1f335c0bb8fab170414bd440f83a852aa7a16e0b 100644 (file)
 #include "enums.h"
 /* some parameters stil need this */
 #include "wordlist.h"
-
-/* for parameters that still need these */
+#include "anyp/ProtocolType.h"
+#include "Debug.h"
+#include "HttpHeader.h"
+#include "HttpStatusCode.h"
 #include "lookup_t.h"
 
+
 class HttpRequestMethod;
 #if USE_DELAY_POOLS
 class ClientInfo;
 #endif
 
-#if USE_FORW_VIA_DB
-extern void fvdbCountVia(const char *key);
-extern void fvdbCountForw(const char *key);
-#endif
-#if HEADERS_LOG
-SQUIDCEXTERN void headersLog(int cs, int pq, const HttpRequestMethod& m, void *data);
-#endif
-extern int logTypeIsATcpHit(log_type);
-
-/*
- * cache_cf.c
- */
-SQUIDCEXTERN void configFreeMemory(void);
-class MemBuf;
-extern void wordlistCat(const wordlist *, MemBuf * mb);
-extern void self_destruct(void);
-SQUIDCEXTERN void add_http_port(char *portspec);
-extern int xatoi(const char *token);
-extern long xatol(const char *token);
-
-/* extra functions from cache_cf.c useful for lib modules */
-SQUIDCEXTERN void parse_int(int *var);
-SQUIDCEXTERN void parse_onoff(int *var);
-SQUIDCEXTERN void parse_eol(char *volatile *var);
-SQUIDCEXTERN void parse_wordlist(wordlist ** list);
-SQUIDCEXTERN void requirePathnameExists(const char *name, const char *path);
-SQUIDCEXTERN void parse_time_t(time_t * var);
-
-/* client_side.c - FD related client side routines */
-
-SQUIDCEXTERN void clientdbInit(void);
-
-#include "anyp/ProtocolType.h"
-SQUIDCEXTERN void clientdbUpdate(const Ip::Address &, log_type, AnyP::ProtocolType, size_t);
-
-SQUIDCEXTERN int clientdbCutoffDenied(const Ip::Address &);
-void clientdbDump(StoreEntry *);
-SQUIDCEXTERN void clientdbFreeMemory(void);
-
-SQUIDCEXTERN int clientdbEstablished(const Ip::Address &, int);
-#if USE_DELAY_POOLS
-SQUIDCEXTERN void clientdbSetWriteLimiter(ClientInfo * info, const int writeSpeedLimit,const double initialBurst,const double highWatermark);
-SQUIDCEXTERN ClientInfo * clientdbGetInfo(const Ip::Address &addr);
-#endif
-SQUIDCEXTERN void clientOpenListenSockets(void);
-SQUIDCEXTERN void clientHttpConnectionsClose(void);
-SQUIDCEXTERN void httpRequestFree(void *);
-
-extern void clientAccessCheck(void *);
-
-#include "Debug.h"
-
-/* packs, then prints an object using debugs() */
-SQUIDCEXTERN void debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm);
-
-/* disk.c */
-SQUIDCEXTERN int file_open(const char *path, int mode);
-SQUIDCEXTERN void file_close(int fd);
-/* Adapter file_write for object callbacks */
-
-template <class O>
-void
-FreeObject(void *address)
-{
-    O *anObject = static_cast <O *>(address);
-    delete anObject;
-}
-
-SQUIDCEXTERN void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
-SQUIDCEXTERN void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
-SQUIDCEXTERN void file_read(int, char *, int, off_t, DRCB *, void *);
-SQUIDCEXTERN void disk_init(void);
-
-extern void fd_close(int fd);
-extern void fd_open(int fd, unsigned int type, const char *);
-extern void fd_note(int fd, const char *);
-extern void fd_bytes(int fd, int len, unsigned int type);
-extern void fdDumpOpen(void);
-extern int fdUsageHigh(void);
-extern void fdAdjustReserved(void);
-
-SQUIDCEXTERN void fqdncache_nbgethostbyaddr(const Ip::Address &, FQDNH *, void *);
-
-SQUIDCEXTERN const char *fqdncache_gethostbyaddr(const Ip::Address &, int flags);
-SQUIDCEXTERN void fqdncache_init(void);
-void fqdnStats(StoreEntry *);
-SQUIDCEXTERN void fqdncacheReleaseInvalid(const char *);
-
-SQUIDCEXTERN const char *fqdnFromAddr(const Ip::Address &);
-SQUIDCEXTERN int fqdncacheQueueDrain(void);
-SQUIDCEXTERN void fqdncacheFreeMemory(void);
-SQUIDCEXTERN void fqdncache_restart(void);
-extern void fqdncache_purgelru(void *);
-SQUIDCEXTERN void fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames);
 
 class FwdState;
 
-/**
- \defgroup ServerProtocolFTPAPI Server-Side FTP API
- \ingroup ServerProtocol
- */
-
-/// \ingroup ServerProtocolFTPAPI
-SQUIDCEXTERN void ftpStart(FwdState *);
 
 class HttpRequest;
 class HttpReply;
 
-/// \ingroup ServerProtocolFTPAPI
-SQUIDCEXTERN const char *ftpUrlWith2f(HttpRequest *);
-
-/**
- \defgroup ServerProtocolGopherAPI Server-Side Gopher API
- \ingroup ServerProtocol
- */
-
-/// \ingroup ServerProtocolGopherAPI
-SQUIDCEXTERN void gopherStart(FwdState *);
-
-/// \ingroup ServerProtocolGopherAPI
-SQUIDCEXTERN int gopherCachable(const HttpRequest *);
-
-/**
- \defgroup ServerProtocolWhoisAPI Server-Side WHOIS API
- \ingroup ServerProtocol
- */
-
-/// \ingroup ServerProtocolWhoisAPI
-SQUIDCEXTERN void whoisStart(FwdState *);
-
-/* http.c */
-/* for http_hdr_type field */
-#include "HttpHeader.h"
-SQUIDCEXTERN int httpCachable(const HttpRequestMethod&);
-SQUIDCEXTERN void httpStart(FwdState *);
-SQUIDCEXTERN mb_size_t httpBuildRequestPrefix(HttpRequest * request,
-        HttpRequest * orig_request,
-        StoreEntry * entry,
-        MemBuf * mb,
-        http_state_flags);
-extern const char *httpMakeVaryMark(HttpRequest * request, HttpReply const * reply);
-
-#include "HttpStatusCode.h"
-
-class StatHist;
-
-/* Http Cache Control Header Field */
-SQUIDCEXTERN void httpHdrCcInitModule(void);
-SQUIDCEXTERN void httpHdrCcCleanModule(void);
-SQUIDCEXTERN void httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist);
-extern void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
-
-/* Http Header Tools */
-class HttpHeaderFieldInfo;
-SQUIDCEXTERN HttpHeaderFieldInfo *httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs * attrs, int count);
-SQUIDCEXTERN void httpHeaderDestroyFieldsInfo(HttpHeaderFieldInfo * info, int count);
-SQUIDCEXTERN http_hdr_type httpHeaderIdByName(const char *name, size_t name_len, const HttpHeaderFieldInfo * attrs, int end);
-SQUIDCEXTERN http_hdr_type httpHeaderIdByNameDef(const char *name, int name_len);
-SQUIDCEXTERN const char *httpHeaderNameById(int id);
-SQUIDCEXTERN int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
+/* TODO: move to StrList.h */
 SQUIDCEXTERN void strListAdd(String * str, const char *item, char del);
 SQUIDCEXTERN int strListIsMember(const String * str, const char *item, char del);
 SQUIDCEXTERN int strListIsSubstr(const String * list, const char *s, char del);
 SQUIDCEXTERN int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos);
-SQUIDCEXTERN const char *getStringPrefix(const char *str, const char *end);
-SQUIDCEXTERN int httpHeaderParseInt(const char *start, int *val);
-SQUIDCEXTERN void httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...) PRINTF_FORMAT_ARG3;
 
-/* Http Header */
-SQUIDCEXTERN void httpHeaderInitModule(void);
-SQUIDCEXTERN void httpHeaderCleanModule(void);
+extern const char *getStringPrefix(const char *str, const char *end);
+
+
 
 /* store report about current header usage and other stats */
 void httpHeaderStoreReport(StoreEntry * e);
@@ -248,18 +96,6 @@ extern variable_list *snmp_meshPtblFn(variable_list *, snint *);
 extern variable_list *snmp_meshCtblFn(variable_list *, snint *);
 #endif /* SQUID_SNMP */
 
-#if USE_WCCP
-extern void wccpInit(void);
-extern void wccpConnectionOpen(void);
-extern void wccpConnectionClose(void);
-#endif /* USE_WCCP */
-
-#if USE_WCCPv2
-extern void wccp2Init(void);
-extern void wccp2ConnectionOpen(void);
-extern void wccp2ConnectionClose(void);
-#endif /* USE_WCCPv2 */
-
 extern char *mime_get_header(const char *mime, const char *header);
 extern char *mime_get_header_field(const char *mime, const char *name, const char *prefix);
 extern size_t headersEnd(const char *, size_t);
@@ -278,54 +114,6 @@ extern int mimeGetViewOption(const char *fn);
 extern int mcastSetTtl(int, int);
 extern IPH mcastJoinGroups;
 
-SQUIDCEXTERN peer *getFirstPeer(void);
-SQUIDCEXTERN peer *getFirstUpParent(HttpRequest *);
-SQUIDCEXTERN peer *getNextPeer(peer *);
-SQUIDCEXTERN peer *getSingleParent(HttpRequest *);
-SQUIDCEXTERN int neighborsCount(HttpRequest *);
-SQUIDCEXTERN int neighborsUdpPing(HttpRequest *,
-                                  StoreEntry *,
-                                  IRCB * callback,
-                                  void *data,
-                                  int *exprep,
-                                  int *timeout);
-SQUIDCEXTERN void neighborAddAcl(const char *, const char *);
-
-SQUIDCEXTERN void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &);
-SQUIDCEXTERN void neighborAdd(const char *, const char *, int, int, int, int, int);
-SQUIDCEXTERN void neighbors_init(void);
-#if USE_HTCP
-SQUIDCEXTERN void neighborsHtcpClear(StoreEntry *, const char *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason);
-#endif
-SQUIDCEXTERN peer *peerFindByName(const char *);
-SQUIDCEXTERN peer *peerFindByNameAndPort(const char *, unsigned short);
-SQUIDCEXTERN peer *getDefaultParent(HttpRequest * request);
-SQUIDCEXTERN peer *getRoundRobinParent(HttpRequest * request);
-SQUIDCEXTERN peer *getWeightedRoundRobinParent(HttpRequest * request);
-SQUIDCEXTERN void peerClearRRStart(void);
-SQUIDCEXTERN void peerClearRR(void);
-SQUIDCEXTERN lookup_t peerDigestLookup(peer * p, HttpRequest * request);
-SQUIDCEXTERN peer *neighborsDigestSelect(HttpRequest * request);
-SQUIDCEXTERN void peerNoteDigestLookup(HttpRequest * request, peer * p, lookup_t lookup);
-SQUIDCEXTERN void peerNoteDigestGone(peer * p);
-SQUIDCEXTERN int neighborUp(const peer * e);
-SQUIDCEXTERN CBDUNL peerDestroy;
-SQUIDCEXTERN const char *neighborTypeStr(const peer * e);
-SQUIDCEXTERN peer_t neighborType(const peer *, const HttpRequest *);
-SQUIDCEXTERN void peerConnectFailed(peer *);
-SQUIDCEXTERN void peerConnectSucceded(peer *);
-SQUIDCEXTERN void dump_peer_options(StoreEntry *, peer *);
-SQUIDCEXTERN int peerHTTPOkay(const peer *, HttpRequest *);
-
-SQUIDCEXTERN peer *whichPeer(const Ip::Address &from);
-
-/* peer_digest.c */
-class PeerDigest;
-SQUIDCEXTERN PeerDigest *peerDigestCreate(peer * p);
-SQUIDCEXTERN void peerDigestNeeded(PeerDigest * pd);
-SQUIDCEXTERN void peerDigestNotePeerGone(PeerDigest * pd);
-SQUIDCEXTERN void peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e);
-
 #include "comm/forward.h"
 extern void getOutgoingAddress(HttpRequest * request, Comm::ConnectionPointer conn);
 extern Ip::Address getOutgoingAddr(HttpRequest * request, struct peer *dst_peer);
@@ -335,60 +123,15 @@ SQUIDCEXTERN void urnStart(HttpRequest *, StoreEntry *);
 SQUIDCEXTERN void redirectInit(void);
 SQUIDCEXTERN void redirectShutdown(void);
 
-extern void refreshAddToList(const char *, int, time_t, int, time_t);
-extern int refreshIsCachable(const StoreEntry *);
-extern int refreshCheckHTTP(const StoreEntry *, HttpRequest *);
-extern int refreshCheckICP(const StoreEntry *, HttpRequest *);
-extern int refreshCheckHTCP(const StoreEntry *, HttpRequest *);
-extern int refreshCheckDigest(const StoreEntry *, time_t delta);
-extern time_t getMaxAge(const char *url);
-extern void refreshInit(void);
-extern const refresh_t *refreshLimits(const char *url);
 
 extern void shut_down(int);
 extern void rotate_logs(int);
 extern void reconfigure(int);
 
+
 extern void start_announce(void *unused);
 extern void waisStart(FwdState *);
 
-SQUIDCEXTERN void statInit(void);
-SQUIDCEXTERN void statFreeMemory(void);
-SQUIDCEXTERN double median_svc_get(int, int);
-SQUIDCEXTERN void pconnHistCount(int, int);
-SQUIDCEXTERN int stat5minClientRequests(void);
-SQUIDCEXTERN double stat5minCPUUsage(void);
-SQUIDCEXTERN double statRequestHitRatio(int minutes);
-SQUIDCEXTERN double statRequestHitMemoryRatio(int minutes);
-SQUIDCEXTERN double statRequestHitDiskRatio(int minutes);
-SQUIDCEXTERN double statByteHitRatio(int minutes);
-
-/* mem */
-SQUIDCEXTERN void memClean(void);
-SQUIDCEXTERN void memInitModule(void);
-SQUIDCEXTERN void memCleanModule(void);
-SQUIDCEXTERN void memConfigure(void);
-SQUIDCEXTERN void *memAllocate(mem_type);
-SQUIDCEXTERN void *memAllocString(size_t net_size, size_t * gross_size);
-SQUIDCEXTERN void *memAllocBuf(size_t net_size, size_t * gross_size);
-SQUIDCEXTERN void *memReallocBuf(void *buf, size_t net_size, size_t * gross_size);
-SQUIDCEXTERN void memFree(void *, int type);
-void memFree2K(void *);
-void memFree4K(void *);
-void memFree8K(void *);
-void memFree16K(void *);
-void memFree32K(void *);
-void memFree64K(void *);
-SQUIDCEXTERN void memFreeString(size_t size, void *);
-SQUIDCEXTERN void memFreeBuf(size_t size, void *);
-SQUIDCEXTERN FREE *memFreeBufFunc(size_t size);
-SQUIDCEXTERN int memInUse(mem_type);
-SQUIDCEXTERN void memDataInit(mem_type, const char *, size_t, int, bool zeroOnPush = true);
-SQUIDCEXTERN void memCheckInit(void);
-
-/* Mem */
-SQUIDCEXTERN void memConfigure(void);
-
 /* ----------------------------------------------------------------- */
 
 /* repl_modules.c */
@@ -402,23 +145,6 @@ extern void storeLogRotate(void);
 extern void storeLogClose(void);
 extern void storeLogOpen(void);
 
-/*
- * store_key_*.c
- */
-SQUIDCEXTERN cache_key *storeKeyDup(const cache_key *);
-SQUIDCEXTERN cache_key *storeKeyCopy(cache_key *, const cache_key *);
-SQUIDCEXTERN void storeKeyFree(const cache_key *);
-SQUIDCEXTERN const cache_key *storeKeyScan(const char *);
-SQUIDCEXTERN const char *storeKeyText(const cache_key *);
-SQUIDCEXTERN const cache_key *storeKeyPublic(const char *, const HttpRequestMethod&);
-SQUIDCEXTERN const cache_key *storeKeyPublicByRequest(HttpRequest *);
-SQUIDCEXTERN const cache_key *storeKeyPublicByRequestMethod(HttpRequest *, const HttpRequestMethod&);
-SQUIDCEXTERN const cache_key *storeKeyPrivate(const char *, const HttpRequestMethod&, int);
-SQUIDCEXTERN int storeKeyHashBuckets(int);
-SQUIDCEXTERN int storeKeyNull(const cache_key *);
-SQUIDCEXTERN void storeKeyInit(void);
-SQUIDCEXTERN HASHHASH storeKeyHashHash;
-SQUIDCEXTERN HASHCMP storeKeyHashCmp;
 
 /*
  * store_digest.c
@@ -444,6 +170,7 @@ extern bool storeRebuildParseEntry(MemBuf &buf, StoreEntry &e, cache_key *key, s
 /// checks whether the loaded entry should be kept; updates counters
 extern bool storeRebuildKeepEntry(const StoreEntry &e, const cache_key *key, struct _store_rebuild_data &counts);
 
+
 /*
  * store_swapin.c
  */
@@ -460,6 +187,7 @@ SQUIDCEXTERN int storeUnregister(store_client * sc, StoreEntry * e, void *data)
 SQUIDCEXTERN int storePendingNClients(const StoreEntry * e);
 SQUIDCEXTERN int storeClientIsThisAClient(store_client * sc, void *someClient);
 
+
 SQUIDCEXTERN const char *getMyHostname(void);
 SQUIDCEXTERN const char *uniqueHostname(void);
 SQUIDCEXTERN void safeunlink(const char *path, int quiet);
@@ -528,46 +256,18 @@ SQUIDCEXTERN void unlinkdClose(void);
 SQUIDCEXTERN void unlinkdUnlink(const char *);
 #endif
 
-SQUIDCEXTERN AnyP::ProtocolType urlParseProtocol(const char *, const char *e = NULL);
-SQUIDCEXTERN void urlInitialize(void);
-SQUIDCEXTERN HttpRequest *urlParse(const HttpRequestMethod&, char *, HttpRequest *request = NULL);
-SQUIDCEXTERN const char *urlCanonical(HttpRequest *);
-SQUIDCEXTERN char *urlCanonicalClean(const HttpRequest *);
-SQUIDCEXTERN const char *urlCanonicalFakeHttps(const HttpRequest * request);
-SQUIDCEXTERN bool urlIsRelative(const char *);
-SQUIDCEXTERN char *urlMakeAbsolute(const HttpRequest *, const char *);
-SQUIDCEXTERN char *urlRInternal(const char *host, unsigned short port, const char *dir, const char *name);
-SQUIDCEXTERN char *urlInternal(const char *dir, const char *name);
-SQUIDCEXTERN int matchDomainName(const char *host, const char *domain);
-SQUIDCEXTERN int urlCheckRequest(const HttpRequest *);
-SQUIDCEXTERN int urlDefaultPort(AnyP::ProtocolType p);
-SQUIDCEXTERN char *urlHostname(const char *url);
-SQUIDCEXTERN void urlExtMethodConfigure(void);
 
 SQUIDCEXTERN peer_t parseNeighborType(const char *s);
 
-/* tools.c */
-//UNUSED       #include "dlink.h"
-//UNUSED       SQUIDCEXTERN void dlinkAdd(void *data, dlink_node *, dlink_list *);
-//UNUSED       SQUIDCEXTERN void dlinkAddAfter(void *, dlink_node *, dlink_node *, dlink_list *);
-//UNUSED       SQUIDCEXTERN void dlinkAddTail(void *data, dlink_node *, dlink_list *);
-//UNUSED       SQUIDCEXTERN void dlinkDelete(dlink_node * m, dlink_list * list);
-//UNUSED       SQUIDCEXTERN void dlinkNodeDelete(dlink_node * m);
-//UNUSED       SQUIDCEXTERN dlink_node *dlinkNodeNew(void);
-
-SQUIDCEXTERN void kb_incr(kb_t *, size_t);
-SQUIDCEXTERN int stringHasWhitespace(const char *);
-SQUIDCEXTERN int stringHasCntl(const char *);
-SQUIDCEXTERN void linklistPush(link_list **, void *);
-SQUIDCEXTERN void *linklistShift(link_list **);
-SQUIDCEXTERN int xrename(const char *from, const char *to);
-extern int isPowTen(int);
-SQUIDCEXTERN void parseEtcHosts(void);
-SQUIDCEXTERN int getMyPort(void);
-SQUIDCEXTERN void setUmask(mode_t mask);
-
-SQUIDCEXTERN char *strwordtok(char *buf, char **t);
-SQUIDCEXTERN void strwordquote(MemBuf * mb, const char *str);
+SQUIDCEXTERN int stringHasWhitespace(const char *); //String.cc
+SQUIDCEXTERN int stringHasCntl(const char *); //String.cc
+SQUIDCEXTERN void linklistPush(link_list **, void *); //list.cc
+SQUIDCEXTERN void *linklistShift(link_list **); //list.cc
+SQUIDCEXTERN int xrename(const char *from, const char *to); //disk.cc
+extern int isPowTen(int); //int.cc
+
+SQUIDCEXTERN char *strwordtok(char *buf, char **t); //String.cc
+
 
 /*
  * ipc.c
@@ -581,45 +281,6 @@ SQUIDCEXTERN pid_t ipcCreate(int type,
                              int *wfd,
                              void **hIpc);
 
-class CacheDigestGuessStats;
-/* CacheDigest */
-SQUIDCEXTERN CacheDigest *cacheDigestCreate(int capacity, int bpe);
-SQUIDCEXTERN void cacheDigestDestroy(CacheDigest * cd);
-SQUIDCEXTERN CacheDigest *cacheDigestClone(const CacheDigest * cd);
-SQUIDCEXTERN void cacheDigestClear(CacheDigest * cd);
-SQUIDCEXTERN void cacheDigestChangeCap(CacheDigest * cd, int new_cap);
-SQUIDCEXTERN int cacheDigestTest(const CacheDigest * cd, const cache_key * key);
-SQUIDCEXTERN void cacheDigestAdd(CacheDigest * cd, const cache_key * key);
-SQUIDCEXTERN void cacheDigestDel(CacheDigest * cd, const cache_key * key);
-SQUIDCEXTERN size_t cacheDigestCalcMaskSize(int cap, int bpe);
-SQUIDCEXTERN int cacheDigestBitUtil(const CacheDigest * cd);
-SQUIDCEXTERN void cacheDigestGuessStatsUpdate(CacheDigestGuessStats * stats, int real_hit, int guess_hit);
-SQUIDCEXTERN void cacheDigestGuessStatsReport(const CacheDigestGuessStats * stats, StoreEntry * sentry, const char *label);
-SQUIDCEXTERN void cacheDigestReport(CacheDigest * cd, const char *label, StoreEntry * e);
-
-SQUIDCEXTERN void internalStart(const Comm::ConnectionPointer &clientConn, HttpRequest *, StoreEntry *);
-SQUIDCEXTERN int internalCheck(const char *urlpath);
-SQUIDCEXTERN int internalStaticCheck(const char *urlpath);
-SQUIDCEXTERN char *internalLocalUri(const char *dir, const char *name);
-SQUIDCEXTERN char *internalRemoteUri(const char *, unsigned short, const char *, const char *);
-SQUIDCEXTERN const char *internalHostname(void);
-SQUIDCEXTERN int internalHostnameIs(const char *);
-
-SQUIDCEXTERN void carpInit(void);
-SQUIDCEXTERN peer *carpSelectParent(HttpRequest *);
-
-SQUIDCEXTERN void peerUserHashInit(void);
-SQUIDCEXTERN peer * peerUserHashSelectParent(HttpRequest * request);
-
-SQUIDCEXTERN void peerSourceHashInit(void);
-SQUIDCEXTERN peer * peerSourceHashSelectParent(HttpRequest * request);
-
-#if USE_LEAKFINDER
-SQUIDCEXTERN void leakInit(void);
-SQUIDCEXTERN void *leakAddFL(void *, const char *, int);
-SQUIDCEXTERN void *leakTouchFL(void *, const char *, int);
-SQUIDCEXTERN void *leakFreeFL(void *, const char *, int);
-#endif
 
 /*
  * prototypes for system functions missing from system includes
@@ -641,8 +302,6 @@ SQUIDCEXTERN int gethostname(char *, int);
 class StatCounters;
         SQUIDCEXTERN StatCounters *snmpStatGet(int);
 
-        /* Vary support functions */
-        SQUIDCEXTERN int varyEvaluateMatch(StoreEntry * entry, HttpRequest * req);
 
         /* CygWin & Windows NT Port */
         /* win32.c */
@@ -668,46 +327,7 @@ class StatCounters;
 
 #endif
 
-    /* external_acl.c */
-    class external_acl;
-            SQUIDCEXTERN void parse_externalAclHelper(external_acl **);
-
-            SQUIDCEXTERN void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *);
-
-            SQUIDCEXTERN void free_externalAclHelper(external_acl **);
-
-            typedef void EAH(void *data, void *result);
-            class ACLChecklist;
-                SQUIDCEXTERN void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data);
-
-                SQUIDCEXTERN void externalAclInit(void);
-
-                SQUIDCEXTERN void externalAclShutdown(void);
-
-                SQUIDCEXTERN char *strtokFile(void);
-
-#if USE_WCCPv2
-
-                SQUIDCEXTERN void parse_wccp2_method(int *v);
-                SQUIDCEXTERN void free_wccp2_method(int *v);
-                SQUIDCEXTERN void dump_wccp2_method(StoreEntry * e, const char *label, int v);
-                SQUIDCEXTERN void parse_wccp2_amethod(int *v);
-                SQUIDCEXTERN void free_wccp2_amethod(int *v);
-                SQUIDCEXTERN void dump_wccp2_amethod(StoreEntry * e, const char *label, int v);
-
-                SQUIDCEXTERN void parse_wccp2_service(void *v);
-                SQUIDCEXTERN void free_wccp2_service(void *v);
-                SQUIDCEXTERN void dump_wccp2_service(StoreEntry * e, const char *label, void *v);
-
-                SQUIDCEXTERN int check_null_wccp2_service(void *v);
-
-                SQUIDCEXTERN void parse_wccp2_service_info(void *v);
-
-                SQUIDCEXTERN void free_wccp2_service_info(void *v);
-
-                SQUIDCEXTERN void dump_wccp2_service_info(StoreEntry * e, const char *label, void *v);
-
-#endif
+extern char *strtokFile(void);
 
 #if USE_AUTH
 
index 5751ad4c8316efbd2bbe792d2f5f332008cc74cc..621a8ee0f7b6627f215fee5401d45b104600ba94 100644 (file)
@@ -40,6 +40,7 @@
 #include "client_side_request.h"
 #include "comm/Connection.h"
 #include "fde.h"
+#include "fqdncache.h"
 #include "globals.h"
 #include "HttpRequest.h"
 #include "helper.h"
index 09d23627101624eee7986b96c3fcd4172d29bb9f..6a6340be1f3e7a3d8da6cee1c722caea8bbf1597 100644 (file)
@@ -46,6 +46,7 @@
 #include "protos.h"
 #include "SquidTime.h"
 #include "Store.h"
+#include "URL.h"
 
 typedef enum {
     rcHTTP,
diff --git a/src/refresh.h b/src/refresh.h
new file mode 100644 (file)
index 0000000..e1c8a14
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * DEBUG: section 22    Refresh Calculation
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_REFRESH_H_
+#define SQUID_REFRESH_H_
+
+extern void refreshAddToList(const char *, int, time_t, int, time_t);
+extern int refreshIsCachable(const StoreEntry *);
+extern int refreshCheckHTTP(const StoreEntry *, HttpRequest *);
+extern int refreshCheckICP(const StoreEntry *, HttpRequest *);
+extern int refreshCheckHTCP(const StoreEntry *, HttpRequest *);
+extern int refreshCheckDigest(const StoreEntry *, time_t delta);
+extern time_t getMaxAge(const char *url);
+extern void refreshInit(void);
+extern const refresh_t *refreshLimits(const char *url);
+
+
+
+#endif /* SQUID_REFRESH_H_ */
index b5ee95a87f80f6baf390ae8d085bf35ecac3ccb1..ea2a6570c465bd1d8936df5904e51842109b6ca7 100644 (file)
 
 #include "squid.h"
 #include "comm/Connection.h"
+#include "disk.h"
 #include "event.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "ICP.h"
 #include "ipcache.h"
 #include "protos.h"
 #include "SquidTime.h"
+#include "tools.h"
 
 static IPH send_announce;
 
index 7d6ec81d56772b7b02fc5b403c965c8f4f30fafa..6b828da3db284244b66deb6d834ae9e592854de8 100644 (file)
 #include "cache_snmp.h"
 #include "globals.h"
 #include "mem_node.h"
+#include "neighbors.h"
 #include "protos.h"
 #include "StatCounters.h"
 #include "StatHist.h"
 #include "SquidMath.h"
 #include "SquidTime.h"
+#include "stat.h"
 #include "Store.h"
 
 /************************************************************************
index e76df7d552828a7fb7edbc8e812cc9f903e4f35f..7bc8b3caa2fc92ff41459bd47acc35f7ffa57159 100644 (file)
@@ -12,6 +12,7 @@
 #include "protos.h"
 #include "ssl/ServerBump.h"
 #include "Store.h"
+#include "URL.h"
 
 CBDATA_NAMESPACED_CLASS_INIT(Ssl, ServerBump);
 
index 34cf8d495dcea2dc81d71dc845f8c34e2f79a972..ee81402e085444433245de412602d78e57d285d6 100644 (file)
@@ -9,6 +9,8 @@
 #include "ssl/helper.h"
 #include "SquidTime.h"
 #include "SwapDir.h"
+#include "wordlist.h"
+#include "protos.h"
 
 Ssl::Helper * Ssl::Helper::GetInstance()
 {
index 551b75698110532dd8e5b7cb5d6be7d659868e8c..bafb75ed709ed9a96d1100ae02a987886cf8cd5d 100644 (file)
@@ -47,6 +47,7 @@
 #include "ssl/ErrorDetail.h"
 #include "ssl/support.h"
 #include "ssl/gadgets.h"
+#include "URL.h"
 
 #if HAVE_ERRNO_H
 #include <errno.h>
index c089907c650b9dc5cca788df6a6684b53a6c30cd..80a7ecdf0ab664fab4a0689d9ec54871f34393ee 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 #include "squid.h"
+#include "CacheDigest.h"
 #include "client_side_request.h"
 #include "client_side.h"
 #include "comm/Connection.h"
 #include "mgr/IoAction.h"
 #include "mgr/Registration.h"
 #include "mgr/ServiceTimesAction.h"
+#include "neighbors.h"
+#include "PeerDigest.h"
 #include "protos.h"
 #include "SquidMath.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
+#include "stat.h"
 #include "StoreClient.h"
 #include "Store.h"
 #if USE_AUTH
diff --git a/src/stat.h b/src/stat.h
new file mode 100644 (file)
index 0000000..7203bff
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * DEBUG: section 18    Cache Manager Statistics
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#ifndef SQUID_STAT_H_
+#define SQUID_STAT_H_
+
+extern void statInit(void);
+extern void statFreeMemory(void);
+extern double median_svc_get(int, int);
+extern void pconnHistCount(int, int);
+extern int stat5minClientRequests(void);
+extern double stat5minCPUUsage(void);
+extern double statRequestHitRatio(int minutes);
+extern double statRequestHitMemoryRatio(int minutes);
+extern double statRequestHitDiskRatio(int minutes);
+extern double statByteHitRatio(int minutes);
+
+#endif /* SQUID_STAT_H_ */
index 399abc6b7a270fe1f71fe7f271854c41022eac23..a3fe02fd22f44b88128958972eb4ed0297ffdb40 100644 (file)
@@ -34,6 +34,7 @@
  */
 
 #include "squid.h"
+#include "CacheDigest.h"
 #include "CacheManager.h"
 #include "comm/Connection.h"
 #include "ETag.h"
 #include "stmem.h"
 #include "StoreClient.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "StoreIOState.h"
 #include "StoreMeta.h"
+#include "store_key_md5.h"
 #include "SwapDir.h"
 #include "swap_log_op.h"
 #if USE_DELAY_POOLS
index 97311b67b986431afc5826fee3e793aae1a58596..be2965f55ad05442e5aa11cdabd4e3cc47867de0 100644 (file)
 #include "globals.h"
 #include "mgr/Registration.h"
 #include "protos.h"
-#if USE_CACHE_DIGESTS
 
+#if USE_CACHE_DIGESTS
+#include "CacheDigest.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
+#include "internal.h"
 #include "MemObject.h"
 #include "PeerDigest.h"
+#include "refresh.h"
 #include "SquidTime.h"
 #include "Store.h"
 #include "StoreSearch.h"
index 303966258d5b541bd5455e1ca81a4448f1250481..d7f876d01f55b7ff5323b740df23a81705838efa 100644 (file)
@@ -43,6 +43,7 @@
 #include "SquidMath.h"
 #include "SquidTime.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "StoreHashIndex.h"
 #include "SwapDir.h"
 #include "swap_log_op.h"
index 8ebb91fad841eed5d366e40a0858938e7972138c..2bd7a9d534d25807ed42acdea63cf75c9e5d5832 100644 (file)
@@ -36,7 +36,9 @@
 #include "squid.h"
 #include "HttpRequest.h"
 #include "md5.h"
-#include "protos.h"
+#include "Mem.h"
+#include "store_key_md5.h"
+#include "URL.h"
 
 static cache_key null_key[SQUID_MD5_DIGEST_LENGTH];
 
diff --git a/src/store_key_md5.h b/src/store_key_md5.h
new file mode 100644 (file)
index 0000000..54b35d4
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * DEBUG: section 20    Storage Manager MD5 Cache Keys
+ * AUTHOR: Duane Wessels
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#ifndef SQUID_STORE_KEY_MD5_H_
+#define SQUID_STORE_KEY_MD5_H_
+
+#include "hash.h"
+#include "typedefs.h"
+
+class HttpRequestMethod;
+class HttpRequest;
+
+extern cache_key *storeKeyDup(const cache_key *);
+extern cache_key *storeKeyCopy(cache_key *, const cache_key *);
+extern void storeKeyFree(const cache_key *);
+extern const cache_key *storeKeyScan(const char *);
+extern const char *storeKeyText(const cache_key *);
+extern const cache_key *storeKeyPublic(const char *, const HttpRequestMethod&);
+extern const cache_key *storeKeyPublicByRequest(HttpRequest *);
+extern const cache_key *storeKeyPublicByRequestMethod(HttpRequest *, const HttpRequestMethod&);
+extern const cache_key *storeKeyPrivate(const char *, const HttpRequestMethod&, int);
+extern int storeKeyHashBuckets(int);
+extern int storeKeyNull(const cache_key *);
+extern void storeKeyInit(void);
+
+extern HASHHASH storeKeyHashHash;
+extern HASHCMP storeKeyHashCmp;
+
+#endif /* SQUID_STORE_KEY_MD5_H_ */
index b85269d87972f6c6439ba2f280daf91ea278738b..f7d9bdd9fbbe77b674eedd76567626efd8776ba2 100644 (file)
@@ -40,6 +40,7 @@
 #include "protos.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "SwapDir.h"
 #include "StoreSearch.h"
 #include "SquidTime.h"
index 479d4503a1f5037181c9ada5919b5a1cbb890ffe..4d674031fa3dc6ec6c949df9e1dbc7af19db74bd 100644 (file)
@@ -37,6 +37,8 @@
  */
 
 #include "squid.h"
+#include "CacheDigest.h"
+#include "store_key_md5.h"
 
 #if HAVE_ERRNO_H
 #include <errno.h>
index ab909337209a15aa3b96c72e0eb2e5a650c230c7..645b14a310fa5bd4a9fce2ca19d87acfdd1d4eb6 100644 (file)
@@ -6,29 +6,28 @@
 
 #define STUB_API "stub_mem.cc"
 #include "STUB.h"
-/* mem* definitions are still in protos.h */
-#include "protos.h"
+#include "Mem.h"
 
-extern "C" void
+void
 memFreeString(size_t size, void *buf)
 {
     xfree(buf);
 }
 
-extern "C" void *
+void *
 memAllocString(size_t net_size, size_t * gross_size)
 {
     *gross_size=net_size;
     return xmalloc(net_size);
 }
 
-extern "C" void
+void
 memFreeBuf(size_t size, void *buf)
 {
     xfree(buf);
 }
 
-extern "C" void *
+void *
 memAllocBuf(size_t net_size, size_t * gross_size)
 {
     *gross_size=net_size;
@@ -38,7 +37,7 @@ memAllocBuf(size_t net_size, size_t * gross_size)
 /* net_size is the new size, *gross size is the old gross size, to be changed to
  * the new gross size as a side-effect.
  */
-extern "C" void *
+void *
 memReallocBuf(void *oldbuf, size_t net_size, size_t * gross_size)
 {
     void *rv=xrealloc(oldbuf,net_size);
index 521dc9d5be2fd3f473baa5b97dd66d5c71047605..1b7b90de5ee6aed9f9654e2b254652506f44ea7b 100644 (file)
@@ -8,6 +8,7 @@
 #include "event.h"
 #include "Mem.h"
 #include "protos.h"
+#include "stat.h"
 #include "testEvent.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testEvent );
index bd4fb74ef1d883ee67ed0335ff6f6aeb08e762dc..693988f7e8f691ac50244b084ccbbd94a757ee69 100644 (file)
@@ -7,6 +7,7 @@
 #include "EventLoop.h"
 #include "Mem.h"
 #include "protos.h"
+#include "stat.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop );
 
index b87ee3c32afc7ca738518da62f570e1ef70f15fb..3b02f4a77dd7ecf31ba912d2b545e104ed51a118 100644 (file)
@@ -3,6 +3,7 @@
 #include <cppunit/TestAssert.h>
 
 #include "testHttpReply.h"
+#include "HttpHeader.h"
 #include "HttpReply.h"
 #include "Mem.h"
 #include "protos.h"
index 9eb0c8fa2bf5be2046f2d2edc1ac55e2b89b335c..f8bf55d666c5c8729ef020c5ca25a7a1c82a95da 100644 (file)
@@ -4,6 +4,7 @@
 #include <cppunit/TestAssert.h>
 
 #include "testHttpRequest.h"
+#include "HttpHeader.h"
 #include "HttpRequest.h"
 #include "Mem.h"
 #include "protos.h"
index a4f358cd0e5c9e6c66b0e048be8912cee599498f..6588402c97ad0a6ba36d0d2ec1804ce904fe9581 100644 (file)
 
 #include "squid.h"
 #include "base/Subscription.h"
+#include "client_side.h"
+#include "disk.h"
 #include "fde.h"
+#include "fqdncache.h"
 #include "htcp.h"
 #include "ICP.h"
 #include "ip/Intercept.h"
diff --git a/src/tools.h b/src/tools.h
new file mode 100644 (file)
index 0000000..3ffcc26
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * DEBUG: section 21    Misc Functions
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_TOOLS_H_
+#define SQUID_TOOLS_H_
+
+/* for kb_t */
+#include "typedefs.h"
+
+class MemBuf;
+
+extern void kb_incr(kb_t *, size_t);
+extern void parseEtcHosts(void);
+extern int getMyPort(void);
+extern void setUmask(mode_t mask);
+extern void strwordquote(MemBuf * mb, const char *str);
+
+/* packs, then prints an object using debugs() */
+extern void debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm);
+
+
+#endif /* SQUID_TOOLS_H_ */
index 6ac1bfab72eebcc82299d6ec15f7ac62ae694f2a..25ffff690f8bacce9681cff87cd325b5a1c8cc11 100644 (file)
@@ -50,6 +50,7 @@
 #include "PeerSelectState.h"
 #include "protos.h"
 #include "StatCounters.h"
+#include "tools.h"
 
 #if USE_DELAY_POOLS
 #include "DelayId.h"
index c4b1b5c05346abad92f0719b6912941be49fb669..81b3c8eafa6cf4181bc841ecf85fbfe6147232d3 100644 (file)
@@ -36,6 +36,7 @@
 #include "StoreMeta.h"
 #include "StoreMetaUnpacker.h"
 #include "Store.h"
+#include "store_key_md5.h"
 #include "Generic.h"
 #include "mgr/Registration.h"
 
index 5d08e7de8c89f27c856d737aef1a8b8c40a16c5c..c36a1655eab3edd6ff52d4ee00375426e721b615 100644 (file)
@@ -34,6 +34,8 @@
  */
 
 #include "squid.h"
+#include "disk.h"
+#include "fd.h"
 #include "fde.h"
 #include "globals.h"
 #include "xusleep.h"
index f3f1a98eff8c664a55201757bf43b2aa9494b9f4..7c43217a0936513d4cba86942197e4712ea4c797 100644 (file)
@@ -45,6 +45,7 @@
 #include "SquidTime.h"
 #include "icmp/net_db.h"
 #include "protos.h"
+#include "URL.h"
 
 #define        URN_REQBUF_SZ   4096
 
diff --git a/src/wccp.h b/src/wccp.h
new file mode 100644 (file)
index 0000000..7fdbe9e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * DEBUG: section 80    WCCP Support
+ * AUTHOR: Glenn Chisholm
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_WCCP_H_
+#define SQUID_WCCP_H_
+
+#if USE_WCCP
+extern void wccpInit(void);
+extern void wccpConnectionOpen(void);
+extern void wccpConnectionClose(void);
+#endif /* USE_WCCP */
+
+
+
+#endif /* SQUID_WCCP_H_ */
index bb10f1bdc35e1d8fe4b30a73d9cbf62181d1acab..9a0736614eb172e8a9beb4b19d093e86d320cf69 100644 (file)
@@ -34,6 +34,7 @@
 
 #if USE_WCCPv2
 
+#include "cache_cf.h"
 #include "comm.h"
 #include "comm/Connection.h"
 #include "comm/Loops.h"
diff --git a/src/wccp2.h b/src/wccp2.h
new file mode 100644 (file)
index 0000000..6474013
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * DEBUG: section 80    WCCP Support
+ * AUTHOR: Steven Wilton
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_WCCP2_H_
+#define SQUID_WCCP2_H_
+
+#if USE_WCCPv2
+
+class StoreEntry;
+
+extern void wccp2Init(void);
+extern void wccp2ConnectionOpen(void);
+extern void wccp2ConnectionClose(void);
+extern void parse_wccp2_method(int *v);
+extern void free_wccp2_method(int *v);
+extern void dump_wccp2_method(StoreEntry * e, const char *label, int v);
+extern void parse_wccp2_amethod(int *v);
+extern void free_wccp2_amethod(int *v);
+extern void dump_wccp2_amethod(StoreEntry * e, const char *label, int v);
+
+extern void parse_wccp2_service(void *v);
+extern void free_wccp2_service(void *v);
+extern void dump_wccp2_service(StoreEntry * e, const char *label, void *v);
+
+extern int check_null_wccp2_service(void *v);
+
+extern void parse_wccp2_service_info(void *v);
+
+extern void free_wccp2_service_info(void *v);
+
+extern void dump_wccp2_service_info(StoreEntry * e, const char *label, void *v);
+#endif /* USE_WCCPv2 */
+
+#endif /* WCCP2_H_ */
index 551413e992c0ce328c3c4a8208dda4d0017d920c..d4a0c6d9f8ec2774c0c5bb18425622efd8574659 100644 (file)
@@ -44,6 +44,7 @@
 #include "protos.h"
 #include "StatCounters.h"
 #include "Store.h"
+#include "tools.h"
 
 #if HAVE_ERRNO_H
 #include <errno.h>
diff --git a/src/whois.h b/src/whois.h
new file mode 100644 (file)
index 0000000..6859e02
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * DEBUG: section 75    WHOIS protocol
+ * AUTHOR: Duane Wessels, Kostas Anagnostakis
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_WHOIS_H_
+#define SQUID_WHOIS_H_
+
+/**
+ * \defgroup ServerProtocolWhoisAPI Server-Side WHOIS API
+ * \ingroup ServerProtocol
+ */
+
+/// \ingroup ServerProtocolWhoisAPI
+extern void whoisStart(FwdState *);
+
+
+#endif /* SQUID_WHOIS_H_ */
index cec9258a4d29ae24b871e1c49b174421735f0d13..22ffbca2359e60b7f45bec447a9da9dba70f4684 100644 (file)
@@ -47,10 +47,11 @@ public:
 
 MEMPROXY_CLASS_INLINE(wordlist);
 
-SQUIDCEXTERN const char *wordlistAdd(wordlist **, const char *);
-SQUIDCEXTERN void wordlistAddWl(wordlist **, wordlist *);
-SQUIDCEXTERN void wordlistJoin(wordlist **, wordlist **);
-SQUIDCEXTERN wordlist *wordlistDup(const wordlist *);
-SQUIDCEXTERN void wordlistDestroy(wordlist **);
+extern const char *wordlistAdd(wordlist **, const char *);
+extern void wordlistCat(const wordlist *, MemBuf * mb);
+extern void wordlistAddWl(wordlist **, wordlist *);
+extern void wordlistJoin(wordlist **, wordlist **);
+extern wordlist *wordlistDup(const wordlist *);
+extern void wordlistDestroy(wordlist **);
 
 #endif /* SQUID_WORDLIST_H */