From: Francesco Chemolli Date: Tue, 28 Aug 2012 19:12:13 +0000 (+0200) Subject: protos.h refactoring, part one. X-Git-Tag: sourceformat-review-1~63^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc54b8d21cac0631578f3e382f68fa9e996210ae;p=thirdparty%2Fsquid.git protos.h refactoring, part one. Refactor many function prototypes from protos.h to more specific header files. Change linkage for moved prototypes to c++. --- diff --git a/src/CacheDigest.cc b/src/CacheDigest.cc index 47b6788d7e..7f401b01be 100644 --- a/src/CacheDigest.cc +++ b/src/CacheDigest.cc @@ -35,12 +35,17 @@ #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 index 0000000000..b9f1304b77 --- /dev/null +++ b/src/CacheDigest.h @@ -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_ */ diff --git a/src/ConfigParser.cc b/src/ConfigParser.cc index 9548eb7b7d..2ba9baaa4d 100644 --- a/src/ConfigParser.cc +++ b/src/ConfigParser.cc @@ -34,6 +34,7 @@ */ #include "squid.h" +#include "cache_cf.h" #include "ConfigParser.h" #include "Debug.h" #include "globals.h" diff --git a/src/DelaySpec.cc b/src/DelaySpec.cc index b11b113b5e..fee83035ee 100644 --- a/src/DelaySpec.cc +++ b/src/DelaySpec.cc @@ -40,6 +40,7 @@ #include "squid.h" #if USE_DELAY_POOLS +#include "cache_cf.h" #include "DelaySpec.h" #include "Parsing.h" #include "protos.h" diff --git a/src/DiskIO/AIO/AIODiskFile.cc b/src/DiskIO/AIO/AIODiskFile.cc index fa2132f8ed..1d51d5bd35 100644 --- a/src/DiskIO/AIO/AIODiskFile.cc +++ b/src/DiskIO/AIO/AIODiskFile.cc @@ -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 diff --git a/src/DiskIO/Blocking/BlockingFile.cc b/src/DiskIO/Blocking/BlockingFile.cc index 6744a1ef41..2cb215a81d 100644 --- a/src/DiskIO/Blocking/BlockingFile.cc +++ b/src/DiskIO/Blocking/BlockingFile.cc @@ -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 diff --git a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc index d7e3c26326..10b71cb41c 100644 --- a/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc +++ b/src/DiskIO/DiskDaemon/DiskdIOStrategy.cc @@ -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" diff --git a/src/DiskIO/DiskThreads/CommIO.cc b/src/DiskIO/DiskThreads/CommIO.cc index 9de30912b0..d975942c6d 100644 --- a/src/DiskIO/DiskThreads/CommIO.cc +++ b/src/DiskIO/DiskThreads/CommIO.cc @@ -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" diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc index 4ee13011a0..173c276a21 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc @@ -34,10 +34,12 @@ */ #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" diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index 1f39c1ec37..0c6f5d4ad0 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -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" diff --git a/src/DiskIO/Mmapped/MmappedFile.cc b/src/DiskIO/Mmapped/MmappedFile.cc index b4a70d9359..fe36ee2322 100644 --- a/src/DiskIO/Mmapped/MmappedFile.cc +++ b/src/DiskIO/Mmapped/MmappedFile.cc @@ -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" diff --git a/src/ExternalACL.h b/src/ExternalACL.h index 071c7a9493..125c3535a7 100644 --- a/src/ExternalACL.h +++ b/src/ExternalACL.h @@ -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 */ diff --git a/src/HelperChildConfig.cc b/src/HelperChildConfig.cc index b75e3252a2..002bdda81e 100644 --- a/src/HelperChildConfig.cc +++ b/src/HelperChildConfig.cc @@ -1,4 +1,5 @@ #include "squid.h" +#include "cache_cf.h" #include "Debug.h" #include "HelperChildConfig.h" #include "globals.h" diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index 6971752a49..ffc59fe4b6 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -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" diff --git a/src/HttpHdrCc.h b/src/HttpHdrCc.h index 32d4115bb8..b539181dc6 100644 --- a/src/HttpHdrCc.h +++ b/src/HttpHdrCc.h @@ -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 diff --git a/src/HttpHdrContRange.cc b/src/HttpHdrContRange.cc index 730a8a9b2e..c9c01af051 100644 --- a/src/HttpHdrContRange.cc +++ b/src/HttpHdrContRange.cc @@ -38,6 +38,7 @@ #include "enums.h" #include "HttpHdrContRange.h" #include "HttpHeaderTools.h" +#include "Mem.h" #include "protos.h" /* diff --git a/src/HttpHdrSc.cc b/src/HttpHdrSc.cc index 133a092184..057e5330b3 100644 --- a/src/HttpHdrSc.cc +++ b/src/HttpHdrSc.cc @@ -40,6 +40,7 @@ #include "HttpHdrSc.h" #include "HttpHeader.h" #include "HttpHeaderStat.h" +#include "HttpHeaderTools.h" #include "Store.h" #include "protos.h" diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 36e60b6c57..3d2539d0ee 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -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" diff --git a/src/HttpHeader.h b/src/HttpHeader.h index 53e884bc64..9f4c5f5618 100644 --- a/src/HttpHeader.h +++ b/src/HttpHeader.h @@ -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 */ diff --git a/src/HttpHeaderTools.h b/src/HttpHeaderTools.h index a954607ce0..1da330e32b 100644 --- a/src/HttpHeaderTools.h +++ b/src/HttpHeaderTools.h @@ -3,6 +3,7 @@ #include "format/Format.h" #include "HttpHeader.h" +#include "typedefs.h" #if HAVE_LIST #include @@ -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 diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index 772d35f2f3..2922089ddd 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -35,6 +35,7 @@ #include "squid.h" #include "Debug.h" +#include "HttpHeaderTools.h" #include "HttpMsg.h" #include "MemBuf.h" #include "profiler/Profiler.h" diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 38a67382c7..b1a8128a33 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -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" diff --git a/src/Makefile.am b/src/Makefile.am index 56a2de0f6b..9fc7b86757 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/Mem.h b/src/Mem.h index a098c19d02..fc2145f917 100644 --- a/src/Mem.h +++ b/src/Mem.h @@ -34,6 +34,11 @@ #ifndef SQUID_MEM #define SQUID_MEM +/* for mem_type */ +#include "enums.h" +/* for FREE */ +#include "typedefs.h" + #if HAVE_IOSFWD #include #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 */ diff --git a/src/MemBuf.cc b/src/MemBuf.cc index b953da0c79..13c35772db 100644 --- a/src/MemBuf.cc +++ b/src/MemBuf.cc @@ -100,6 +100,7 @@ */ #include "squid.h" +#include "Mem.h" #include "MemBuf.h" #include "profiler/Profiler.h" #include "protos.h" diff --git a/src/Parsing.cc b/src/Parsing.cc index d4eb78b025..b88f54f83c 100644 --- a/src/Parsing.cc +++ b/src/Parsing.cc @@ -33,6 +33,7 @@ */ #include "squid.h" +#include "cache_cf.h" #include "compat/strtoll.h" #include "Parsing.h" #include "protos.h" diff --git a/src/PeerDigest.h b/src/PeerDigest.h index 81f72bda2b..3dd90d8416 100644 --- a/src/PeerDigest.h +++ b/src/PeerDigest.h @@ -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 */ diff --git a/src/Server.cc b/src/Server.cc index 927245b4ae..081a4d8609 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -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" diff --git a/src/String.cc b/src/String.cc index 23f4e9d343..e6eed41f39 100644 --- a/src/String.cc +++ b/src/String.cc @@ -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" diff --git a/src/SwapDir.cc b/src/SwapDir.cc index 983e2970d8..40f5895559 100644 --- a/src/SwapDir.cc +++ b/src/SwapDir.cc @@ -33,8 +33,10 @@ */ #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" diff --git a/src/URL.h b/src/URL.h index e6e112fffc..ab95fc84f7 100644 --- 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 */ diff --git a/src/acl/CertificateData.cc b/src/acl/CertificateData.cc index 809e54dac3..972e953616 100644 --- a/src/acl/CertificateData.cc +++ b/src/acl/CertificateData.cc @@ -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" diff --git a/src/acl/DestinationDomain.cc b/src/acl/DestinationDomain.cc index fb754cac73..7ebc43d3a1 100644 --- a/src/acl/DestinationDomain.cc +++ b/src/acl/DestinationDomain.cc @@ -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" diff --git a/src/acl/DomainData.cc b/src/acl/DomainData.cc index 071d0a29a6..da5ff80ebc 100644 --- a/src/acl/DomainData.cc +++ b/src/acl/DomainData.cc @@ -37,9 +37,11 @@ #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 inline void diff --git a/src/acl/Gadgets.cc b/src/acl/Gadgets.cc index 3733f9a9ee..f78e369e8c 100644 --- a/src/acl/Gadgets.cc +++ b/src/acl/Gadgets.cc @@ -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 */ diff --git a/src/acl/HttpHeaderData.cc b/src/acl/HttpHeaderData.cc index fcfc048c0d..43f138cc8e 100644 --- a/src/acl/HttpHeaderData.cc +++ b/src/acl/HttpHeaderData.cc @@ -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. diff --git a/src/acl/IntRange.cc b/src/acl/IntRange.cc index 863711ce15..53d9e82229 100644 --- a/src/acl/IntRange.cc +++ b/src/acl/IntRange.cc @@ -36,6 +36,7 @@ #include "squid.h" #include "acl/IntRange.h" +#include "cache_cf.h" #include "Debug.h" #include "wordlist.h" #include "Parsing.h" diff --git a/src/acl/Ip.cc b/src/acl/Ip.cc index 2faeb7991b..e323856170 100644 --- a/src/acl/Ip.cc +++ b/src/acl/Ip.cc @@ -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" diff --git a/src/acl/MaxConnection.cc b/src/acl/MaxConnection.cc index 05fc0be9cb..c4b33239ca 100644 --- a/src/acl/MaxConnection.cc +++ b/src/acl/MaxConnection.cc @@ -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" diff --git a/src/acl/Random.cc b/src/acl/Random.cc index 7d6630910e..9205456e24 100644 --- a/src/acl/Random.cc +++ b/src/acl/Random.cc @@ -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" diff --git a/src/acl/RegexData.cc b/src/acl/RegexData.cc index 4fcb56f48b..b8bd5a3319 100644 --- a/src/acl/RegexData.cc +++ b/src/acl/RegexData.cc @@ -42,6 +42,7 @@ #include "acl/Acl.h" #include "ConfigParser.h" #include "Debug.h" +#include "Mem.h" #include "protos.h" #include "wordlist.h" diff --git a/src/acl/SourceDomain.cc b/src/acl/SourceDomain.cc index c4a1c6ab42..82c83710f3 100644 --- a/src/acl/SourceDomain.cc +++ b/src/acl/SourceDomain.cc @@ -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" diff --git a/src/acl/TimeData.cc b/src/acl/TimeData.cc index 68184f18d8..a625f06012 100644 --- a/src/acl/TimeData.cc +++ b/src/acl/TimeData.cc @@ -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" diff --git a/src/acl/Url.cc b/src/acl/Url.cc index 9457c43c85..7d02415546 100644 --- a/src/acl/Url.cc +++ b/src/acl/Url.cc @@ -40,6 +40,7 @@ #include "acl/RegexData.h" #include "protos.h" #include "rfc1738.h" +#include "URL.h" int ACLUrlStrategy::match (ACLData * &data, ACLFilledChecklist *checklist) diff --git a/src/adaptation/ecap/MessageRep.cc b/src/adaptation/ecap/MessageRep.cc index ab52c2e454..be11f3988a 100644 --- a/src/adaptation/ecap/MessageRep.cc +++ b/src/adaptation/ecap/MessageRep.cc @@ -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 */ diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index cedd2a73f9..7778abc033 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -20,11 +20,13 @@ #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 diff --git a/src/adaptation/icap/OptXact.cc b/src/adaptation/icap/OptXact.cc index 52a2b9200d..50baf5c9b1 100644 --- a/src/adaptation/icap/OptXact.cc +++ b/src/adaptation/icap/OptXact.cc @@ -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" diff --git a/src/adaptation/icap/Xaction.cc b/src/adaptation/icap/Xaction.cc index 7ead755492..b5a6ca938b 100644 --- a/src/adaptation/icap/Xaction.cc +++ b/src/adaptation/icap/Xaction.cc @@ -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" diff --git a/src/auth/AclMaxUserIp.cc b/src/auth/AclMaxUserIp.cc index ef42304763..0fdbacb0fe 100644 --- a/src/auth/AclMaxUserIp.cc +++ b/src/auth/AclMaxUserIp.cc @@ -12,6 +12,7 @@ #include "protos.h" #include "wordlist.h" #include "ConfigParser.h" +#include "Parsing.h" ACL * ACLMaxUserIP::clone() const diff --git a/src/auth/basic/auth_basic.cc b/src/auth/basic/auth_basic.cc index d8cef00b72..434d900ab5 100644 --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/auth_basic.cc @@ -43,9 +43,11 @@ #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" diff --git a/src/auth/digest/UserRequest.cc b/src/auth/digest/UserRequest.cc index 920c7290f0..bb37ddf749 100644 --- a/src/auth/digest/UserRequest.cc +++ b/src/auth/digest/UserRequest.cc @@ -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" diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index c7713e84c5..d98b804e41 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -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" diff --git a/src/auth/negotiate/UserRequest.cc b/src/auth/negotiate/UserRequest.cc index 9acc2616f5..37478d0ccf 100644 --- a/src/auth/negotiate/UserRequest.cc +++ b/src/auth/negotiate/UserRequest.cc @@ -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" diff --git a/src/auth/negotiate/auth_negotiate.cc b/src/auth/negotiate/auth_negotiate.cc index a82f0f0f93..4078bbb728 100644 --- a/src/auth/negotiate/auth_negotiate.cc +++ b/src/auth/negotiate/auth_negotiate.cc @@ -40,9 +40,11 @@ #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" diff --git a/src/auth/ntlm/auth_ntlm.cc b/src/auth/ntlm/auth_ntlm.cc index 3547141851..f223aa5d61 100644 --- a/src/auth/ntlm/auth_ntlm.cc +++ b/src/auth/ntlm/auth_ntlm.cc @@ -43,9 +43,11 @@ #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" diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 5b46c9bfb1..75acb96bd4 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -38,12 +38,15 @@ #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" @@ -51,9 +54,11 @@ #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" @@ -61,6 +66,10 @@ #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 @@ -88,11 +97,9 @@ #if HAVE_GLOB_H #include #endif - #if HAVE_LIMITS_H #include #endif - #if HAVE_LIST #include #endif diff --git a/src/cache_cf.h b/src/cache_cf.h new file mode 100644 index 0000000000..93f555b44e --- /dev/null +++ b/src/cache_cf.h @@ -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_ */ diff --git a/src/carp.cc b/src/carp.cc index 982bd5770b..a53a94e472 100644 --- a/src/carp.cc +++ b/src/carp.cc @@ -37,8 +37,10 @@ #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 index 0000000000..c3799cdf89 --- /dev/null +++ b/src/carp.h @@ -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_ */ diff --git a/src/client_db.cc b/src/client_db.cc index 24f63c861c..d3eb6e6ab4 100644 --- a/src/client_db.cc +++ b/src/client_db.cc @@ -33,16 +33,21 @@ */ #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 index 0000000000..81bdcaf7ce --- /dev/null +++ b/src/client_db.h @@ -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_ */ diff --git a/src/client_side.cc b/src/client_side.cc index 7ca0a4bc55..4a7bc3c90a 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -82,12 +82,12 @@ */ #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" @@ -101,15 +101,22 @@ #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" @@ -120,6 +127,8 @@ #include "StatHist.h" #include "Store.h" #include "TimeOrTag.h" +#include "tools.h" +#include "URL.h" #if USE_AUTH #include "auth/UserRequest.h" diff --git a/src/client_side.h b/src/client_side.h index d66395d003..62a916cffa 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -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 */ diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index d087b58b43..cfccd65821 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -40,20 +40,27 @@ #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 diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 919d2dfbdf..9c2192ddbb 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -55,18 +55,25 @@ #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" diff --git a/src/client_side_request.h b/src/client_side_request.h index 68640d0c21..a296e7a135 100644 --- a/src/client_side_request.h +++ b/src/client_side_request.h @@ -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" diff --git a/src/comm.cc b/src/comm.cc index b2bbad35c3..18d00aaaff 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -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" diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc index 4a5d6eb585..7d708124ff 100644 --- a/src/comm/ConnOpener.cc +++ b/src/comm/ConnOpener.cc @@ -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" diff --git a/src/comm/ModPoll.cc b/src/comm/ModPoll.cc index d2d39e262b..a93f874327 100644 --- a/src/comm/ModPoll.cc +++ b/src/comm/ModPoll.cc @@ -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" diff --git a/src/comm/TcpAcceptor.cc b/src/comm/TcpAcceptor.cc index 1ba79a6036..371cbbc7a0 100644 --- a/src/comm/TcpAcceptor.cc +++ b/src/comm/TcpAcceptor.cc @@ -34,12 +34,14 @@ #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" diff --git a/src/comm/Write.cc b/src/comm/Write.cc index 20c2f967b2..a9db6177dd 100644 --- a/src/comm/Write.cc +++ b/src/comm/Write.cc @@ -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" diff --git a/src/disk.cc b/src/disk.cc index 90f7df2cac..eb31a75db4 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -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 index 0000000000..134784f20d --- /dev/null +++ b/src/disk.h @@ -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 +void +FreeObject(void *address) +{ + O *anObject = static_cast (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_ */ diff --git a/src/dns_internal.cc b/src/dns_internal.cc index c19826375a..dfbc34998d 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -40,8 +40,10 @@ #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" diff --git a/src/errorpage.cc b/src/errorpage.cc index 3b618899de..dbaeea9cb9 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -32,19 +32,16 @@ * */ #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" @@ -52,8 +49,18 @@ #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 diff --git a/src/esi/Esi.cc b/src/esi/Esi.cc index 9387561fce..cc008cdf7f 100644 --- a/src/esi/Esi.cc +++ b/src/esi/Esi.cc @@ -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" diff --git a/src/esi/Include.cc b/src/esi/Include.cc index 5a61b1259d..1f567d26d4 100644 --- a/src/esi/Include.cc +++ b/src/esi/Include.cc @@ -42,9 +42,11 @@ #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); diff --git a/src/esi/VarState.cc b/src/esi/VarState.cc index c268b14fce..7ff261b0fb 100644 --- a/src/esi/VarState.cc +++ b/src/esi/VarState.cc @@ -37,6 +37,7 @@ #include "squid.h" #include "esi/VarState.h" #include "HttpReply.h" +#include "Mem.h" #include "protos.h" CBDATA_TYPE (ESIVarState); diff --git a/src/external_acl.cc b/src/external_acl.cc index 85019696c4..afa7068edd 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -43,12 +43,14 @@ #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" diff --git a/src/fd.cc b/src/fd.cc index f1a07db90f..1a4e6a356d 100644 --- 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 index 0000000000..a6cbf68445 --- /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_ */ diff --git a/src/format/Config.cc b/src/format/Config.cc index b81b718892..3c1add0e01 100644 --- a/src/format/Config.cc +++ b/src/format/Config.cc @@ -1,4 +1,5 @@ #include "squid.h" +#include "cache_cf.h" #include "format/Config.h" #include "protos.h" #include diff --git a/src/format/Format.cc b/src/format/Format.cc index 4e47cc353e..55117194a5 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -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 diff --git a/src/forward.cc b/src/forward.cc index c0ec60f452..0162b2d64b 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -43,23 +43,30 @@ #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" diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 771160e7cc..9bf85bf30c 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -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 index 0000000000..e0119cfb5d --- /dev/null +++ b/src/fqdncache.h @@ -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_ */ diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 6d57ddad2d..554af54dd5 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -35,8 +35,10 @@ #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" diff --git a/src/fs/rock/RockRebuild.cc b/src/fs/rock/RockRebuild.cc index 94e84b1570..0d62591d15 100644 --- a/src/fs/rock/RockRebuild.cc +++ b/src/fs/rock/RockRebuild.cc @@ -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" diff --git a/src/fs/rock/RockSwapDir.cc b/src/fs/rock/RockSwapDir.cc index 9e45a0b01e..7bef29a71f 100644 --- a/src/fs/rock/RockSwapDir.cc +++ b/src/fs/rock/RockSwapDir.cc @@ -5,6 +5,7 @@ */ #include "squid.h" +#include "cache_cf.h" #include "ConfigOption.h" #include "DiskIO/DiskIOModule.h" #include "DiskIO/DiskIOStrategy.h" diff --git a/src/fs/ufs/RebuildState.cc b/src/fs/ufs/RebuildState.cc index 976b276ad8..28f694b8f9 100644 --- a/src/fs/ufs/RebuildState.cc +++ b/src/fs/ufs/RebuildState.cc @@ -32,9 +32,11 @@ */ #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" diff --git a/src/fs/ufs/UFSSwapDir.cc b/src/fs/ufs/UFSSwapDir.cc index 14f95378e1..b72626d918 100644 --- a/src/fs/ufs/UFSSwapDir.cc +++ b/src/fs/ufs/UFSSwapDir.cc @@ -29,10 +29,11 @@ * 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" diff --git a/src/ftp.cc b/src/ftp.cc index 46d1aa67e7..645bdd6348 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -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 index 0000000000..a3d2abd4fc --- /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_ */ diff --git a/src/gopher.cc b/src/gopher.cc index 1888949064..7ca4a5f6c9 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -37,16 +37,19 @@ #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 index 0000000000..f8b0827262 --- /dev/null +++ b/src/gopher.h @@ -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_ */ diff --git a/src/helper.cc b/src/helper.cc index 27b6413250..5bf1ad2740 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -37,8 +37,10 @@ #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" diff --git a/src/htcp.cc b/src/htcp.cc index 8150bcbd45..22a3bf68bd 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -51,10 +51,13 @@ #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; diff --git a/src/http.cc b/src/http.cc index 73c4c08d22..eb8b40eae6 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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" @@ -55,16 +56,22 @@ #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" diff --git a/src/http.h b/src/http.h index 4cae62d539..274bd3c531 100644 --- a/src/http.h +++ b/src/http.h @@ -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 */ diff --git a/src/icmp/IcmpSquid.cc b/src/icmp/IcmpSquid.cc index 82a1599c2b..776683ff93 100644 --- a/src/icmp/IcmpSquid.cc +++ b/src/icmp/IcmpSquid.cc @@ -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" diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc index cffe9b7c1c..9d9fd66e30 100644 --- a/src/icmp/net_db.cc +++ b/src/icmp/net_db.cc @@ -51,10 +51,16 @@ #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 diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 075377a3df..ce1e6d6353 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -39,10 +39,12 @@ #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" @@ -50,12 +52,16 @@ #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 diff --git a/src/internal.cc b/src/internal.cc index 118df8a8a7..a054b89c90 100644 --- a/src/internal.cc +++ b/src/internal.cc @@ -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 index 0000000000..7595f93f03 --- /dev/null +++ b/src/internal.h @@ -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_ */ diff --git a/src/ip/QosConfig.cc b/src/ip/QosConfig.cc index 97fbd9c06b..efa59dba83 100644 --- a/src/ip/QosConfig.cc +++ b/src/ip/QosConfig.cc @@ -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" diff --git a/src/ipc.cc b/src/ipc.cc index 9f0cb0cdab..adb493a65c 100644 --- a/src/ipc.cc +++ b/src/ipc.cc @@ -32,6 +32,7 @@ #include "squid.h" #include "comm/Connection.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "ip/Address.h" diff --git a/src/ipc/StoreMap.cc b/src/ipc/StoreMap.cc index 846d96c5dc..1a97436ac4 100644 --- a/src/ipc/StoreMap.cc +++ b/src/ipc/StoreMap.cc @@ -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 * diff --git a/src/ipc_win32.cc b/src/ipc_win32.cc index 31ac49208c..bd42e38d98 100644 --- a/src/ipc_win32.cc +++ b/src/ipc_win32.cc @@ -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" diff --git a/src/ipcache.cc b/src/ipcache.cc index 227b3ab076..b032ed203d 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -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" diff --git a/src/list.cc b/src/list.cc index 8ec4e96a72..9ba1889bcc 100644 --- a/src/list.cc +++ b/src/list.cc @@ -34,6 +34,7 @@ */ #include "squid.h" +#include "Mem.h" #include "protos.h" #include "typedefs.h" diff --git a/src/log/Config.cc b/src/log/Config.cc index 37dc7e5a5f..d39bcaa0a3 100644 --- a/src/log/Config.cc +++ b/src/log/Config.cc @@ -1,4 +1,5 @@ #include "squid.h" +#include "cache_cf.h" #include "log/Config.h" #include "protos.h" diff --git a/src/log/FormatSquidIcap.cc b/src/log/FormatSquidIcap.cc index 1c8c6086f3..3574fa8180 100644 --- a/src/log/FormatSquidIcap.cc +++ b/src/log/FormatSquidIcap.cc @@ -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" diff --git a/src/log/Makefile.am b/src/log/Makefile.am index 48a083b603..5018962d74 100644 --- a/src/log/Makefile.am +++ b/src/log/Makefile.am @@ -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 \ diff --git a/src/log/ModStdio.cc b/src/log/ModStdio.cc index 0de3d88ccf..1a8c6206cd 100644 --- a/src/log/ModStdio.cc +++ b/src/log/ModStdio.cc @@ -31,6 +31,8 @@ */ #include "squid.h" +#include "disk.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "log/File.h" diff --git a/src/log/ModTcp.cc b/src/log/ModTcp.cc index dad3fa140c..bc52a92c07 100644 --- a/src/log/ModTcp.cc +++ b/src/log/ModTcp.cc @@ -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" diff --git a/src/log/ModUdp.cc b/src/log/ModUdp.cc index 8ef18dba2d..9c5daf56ec 100644 --- a/src/log/ModUdp.cc +++ b/src/log/ModUdp.cc @@ -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" diff --git a/src/log/access_log.cc b/src/log/access_log.cc index f8f0188ab3..3f626a0e66 100644 --- a/src/log/access_log.cc +++ b/src/log/access_log.cc @@ -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 index 0000000000..92c0b7e14a --- /dev/null +++ b/src/log/access_log.h @@ -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_ */ diff --git a/src/main.cc b/src/main.cc index 35a2ed257b..eb0a330603 100644 --- a/src/main.cc +++ b/src/main.cc @@ -39,19 +39,26 @@ #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" @@ -63,16 +70,25 @@ #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" diff --git a/src/mem.cc b/src/mem.cc index 90992ade03..7a87f71365 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -52,6 +52,14 @@ #include #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(); diff --git a/src/mime.cc b/src/mime.cc index 9e63b7bc42..e8d94a24c2 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -34,11 +34,14 @@ */ #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" diff --git a/src/neighbors.cc b/src/neighbors.cc index 2b78b1769a..373dc27ddf 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -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" @@ -46,12 +47,16 @@ #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 index 0000000000..a045f9ec59 --- /dev/null +++ b/src/neighbors.h @@ -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_ */ diff --git a/src/pconn.cc b/src/pconn.cc index a987c4b31d..a57f6c3ffc 100644 --- a/src/pconn.cc +++ b/src/pconn.cc @@ -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" diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 93f15c9f3b..14f27d1f7e 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -35,16 +35,21 @@ #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 */ diff --git a/src/peer_select.cc b/src/peer_select.cc index 2be99c442c..ad11bb0600 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -34,6 +34,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" +#include "carp.h" #include "client_side.h" #include "DnsLookupDetails.h" #include "errorpage.h" @@ -45,6 +46,10 @@ #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" diff --git a/src/peer_sourcehash.cc b/src/peer_sourcehash.cc index 57ad36ab07..eac8fd9607 100644 --- a/src/peer_sourcehash.cc +++ b/src/peer_sourcehash.cc @@ -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 index 0000000000..869a47f24d --- /dev/null +++ b/src/peer_sourcehash.h @@ -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_ */ diff --git a/src/peer_userhash.cc b/src/peer_userhash.cc index 11ea331f4d..0ac165f384 100644 --- a/src/peer_userhash.cc +++ b/src/peer_userhash.cc @@ -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 index 0000000000..4a026ca641 --- /dev/null +++ b/src/peer_userhash.h @@ -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_ */ diff --git a/src/protos.h b/src/protos.h index b49336a21d..1f335c0bb8 100644 --- a/src/protos.h +++ b/src/protos.h @@ -39,186 +39,34 @@ #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 -void -FreeObject(void *address) -{ - O *anObject = static_cast (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 diff --git a/src/redirect.cc b/src/redirect.cc index 5751ad4c83..621a8ee0f7 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -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" diff --git a/src/refresh.cc b/src/refresh.cc index 09d2362710..6a6340be1f 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -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 index 0000000000..e1c8a14ad0 --- /dev/null +++ b/src/refresh.h @@ -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_ */ diff --git a/src/send-announce.cc b/src/send-announce.cc index b5ee95a87f..ea2a6570c4 100644 --- a/src/send-announce.cc +++ b/src/send-announce.cc @@ -35,13 +35,16 @@ #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; diff --git a/src/snmp_agent.cc b/src/snmp_agent.cc index 7d6ec81d56..6b828da3db 100644 --- a/src/snmp_agent.cc +++ b/src/snmp_agent.cc @@ -36,11 +36,13 @@ #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" /************************************************************************ diff --git a/src/ssl/ServerBump.cc b/src/ssl/ServerBump.cc index e76df7d552..7bc8b3caa2 100644 --- a/src/ssl/ServerBump.cc +++ b/src/ssl/ServerBump.cc @@ -12,6 +12,7 @@ #include "protos.h" #include "ssl/ServerBump.h" #include "Store.h" +#include "URL.h" CBDATA_NAMESPACED_CLASS_INIT(Ssl, ServerBump); diff --git a/src/ssl/helper.cc b/src/ssl/helper.cc index 34cf8d495d..ee81402e08 100644 --- a/src/ssl/helper.cc +++ b/src/ssl/helper.cc @@ -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() { diff --git a/src/ssl/support.cc b/src/ssl/support.cc index 551b756981..bafb75ed70 100644 --- a/src/ssl/support.cc +++ b/src/ssl/support.cc @@ -47,6 +47,7 @@ #include "ssl/ErrorDetail.h" #include "ssl/support.h" #include "ssl/gadgets.h" +#include "URL.h" #if HAVE_ERRNO_H #include diff --git a/src/stat.cc b/src/stat.cc index c089907c65..80a7ecdf0a 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -33,6 +33,7 @@ */ #include "squid.h" +#include "CacheDigest.h" #include "client_side_request.h" #include "client_side.h" #include "comm/Connection.h" @@ -52,10 +53,13 @@ #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 index 0000000000..7203bffe4f --- /dev/null +++ b/src/stat.h @@ -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_ */ diff --git a/src/store.cc b/src/store.cc index 399abc6b7a..a3fe02fd22 100644 --- a/src/store.cc +++ b/src/store.cc @@ -34,6 +34,7 @@ */ #include "squid.h" +#include "CacheDigest.h" #include "CacheManager.h" #include "comm/Connection.h" #include "ETag.h" @@ -54,8 +55,10 @@ #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 diff --git a/src/store_digest.cc b/src/store_digest.cc index 97311b67b9..be2965f55a 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -45,12 +45,15 @@ #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" diff --git a/src/store_dir.cc b/src/store_dir.cc index 303966258d..d7f876d01f 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -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" diff --git a/src/store_key_md5.cc b/src/store_key_md5.cc index 8ebb91fad8..2bd7a9d534 100644 --- a/src/store_key_md5.cc +++ b/src/store_key_md5.cc @@ -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 index 0000000000..54b35d4d7a --- /dev/null +++ b/src/store_key_md5.h @@ -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_ */ diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index b85269d879..f7d9bdd9fb 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -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" diff --git a/src/test_cache_digest.cc b/src/test_cache_digest.cc index 479d4503a1..4d674031fa 100644 --- a/src/test_cache_digest.cc +++ b/src/test_cache_digest.cc @@ -37,6 +37,8 @@ */ #include "squid.h" +#include "CacheDigest.h" +#include "store_key_md5.h" #if HAVE_ERRNO_H #include diff --git a/src/tests/stub_mem.cc b/src/tests/stub_mem.cc index ab90933720..645b14a310 100644 --- a/src/tests/stub_mem.cc +++ b/src/tests/stub_mem.cc @@ -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); diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc index 521dc9d5be..1b7b90de5e 100644 --- a/src/tests/testEvent.cc +++ b/src/tests/testEvent.cc @@ -8,6 +8,7 @@ #include "event.h" #include "Mem.h" #include "protos.h" +#include "stat.h" #include "testEvent.h" CPPUNIT_TEST_SUITE_REGISTRATION( testEvent ); diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index bd4fb74ef1..693988f7e8 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -7,6 +7,7 @@ #include "EventLoop.h" #include "Mem.h" #include "protos.h" +#include "stat.h" CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop ); diff --git a/src/tests/testHttpReply.cc b/src/tests/testHttpReply.cc index b87ee3c32a..3b02f4a77d 100644 --- a/src/tests/testHttpReply.cc +++ b/src/tests/testHttpReply.cc @@ -3,6 +3,7 @@ #include #include "testHttpReply.h" +#include "HttpHeader.h" #include "HttpReply.h" #include "Mem.h" #include "protos.h" diff --git a/src/tests/testHttpRequest.cc b/src/tests/testHttpRequest.cc index 9eb0c8fa2b..f8bf55d666 100644 --- a/src/tests/testHttpRequest.cc +++ b/src/tests/testHttpRequest.cc @@ -4,6 +4,7 @@ #include #include "testHttpRequest.h" +#include "HttpHeader.h" #include "HttpRequest.h" #include "Mem.h" #include "protos.h" diff --git a/src/tools.cc b/src/tools.cc index a4f358cd0e..6588402c97 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -34,7 +34,10 @@ #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 index 0000000000..3ffcc26a56 --- /dev/null +++ b/src/tools.h @@ -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_ */ diff --git a/src/tunnel.cc b/src/tunnel.cc index 6ac1bfab72..25ffff690f 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -50,6 +50,7 @@ #include "PeerSelectState.h" #include "protos.h" #include "StatCounters.h" +#include "tools.h" #if USE_DELAY_POOLS #include "DelayId.h" diff --git a/src/ufsdump.cc b/src/ufsdump.cc index c4b1b5c053..81b3c8eafa 100644 --- a/src/ufsdump.cc +++ b/src/ufsdump.cc @@ -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" diff --git a/src/unlinkd.cc b/src/unlinkd.cc index 5d08e7de8c..c36a1655ea 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -34,6 +34,8 @@ */ #include "squid.h" +#include "disk.h" +#include "fd.h" #include "fde.h" #include "globals.h" #include "xusleep.h" diff --git a/src/urn.cc b/src/urn.cc index f3f1a98eff..7c43217a09 100644 --- a/src/urn.cc +++ b/src/urn.cc @@ -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 index 0000000000..7fdbe9e2d5 --- /dev/null +++ b/src/wccp.h @@ -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_ */ diff --git a/src/wccp2.cc b/src/wccp2.cc index bb10f1bdc3..9a0736614e 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -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 index 0000000000..647401326a --- /dev/null +++ b/src/wccp2.h @@ -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_ */ diff --git a/src/whois.cc b/src/whois.cc index 551413e992..d4a0c6d9f8 100644 --- a/src/whois.cc +++ b/src/whois.cc @@ -44,6 +44,7 @@ #include "protos.h" #include "StatCounters.h" #include "Store.h" +#include "tools.h" #if HAVE_ERRNO_H #include diff --git a/src/whois.h b/src/whois.h new file mode 100644 index 0000000000..6859e02151 --- /dev/null +++ b/src/whois.h @@ -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_ */ diff --git a/src/wordlist.h b/src/wordlist.h index cec9258a4d..22ffbca235 100644 --- a/src/wordlist.h +++ b/src/wordlist.h @@ -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 */