Refactor many function prototypes from protos.h to more specific header files.
Change linkage for moved prototypes to c++.
#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 {
--- /dev/null
+/*
+ * 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_ */
*/
#include "squid.h"
+#include "cache_cf.h"
#include "ConfigParser.h"
#include "Debug.h"
#include "globals.h"
#include "squid.h"
#if USE_DELAY_POOLS
+#include "cache_cf.h"
#include "DelaySpec.h"
#include "Parsing.h"
#include "protos.h"
#include "DiskIO/IORequestor.h"
#include "DiskIO/ReadRequest.h"
#include "DiskIO/WriteRequest.h"
+#include "disk.h"
#include "protos.h"
#if HAVE_ERRNO_H
#include "DiskIO/IORequestor.h"
#include "DiskIO/ReadRequest.h"
#include "DiskIO/WriteRequest.h"
+#include "disk.h"
#include "protos.h"
#if HAVE_ERRNO_H
#include "DiskIO/DiskFile.h"
#include "DiskdFile.h"
#include "diomsg.h"
+#include "fd.h"
#include "protos.h"
#include "Store.h"
#include "StatCounters.h"
#include "squid.h"
#include "comm/Loops.h"
#include "DiskIO/DiskThreads/CommIO.h"
+#include "fd.h"
#include "globals.h"
#include "protos.h"
*/
#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"
#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"
#include "DiskIO/Mmapped/MmappedFile.h"
#include "DiskIO/ReadRequest.h"
#include "DiskIO/WriteRequest.h"
+#include "disk.h"
#include "globals.h"
#include "protos.h"
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 */
#include "squid.h"
+#include "cache_cf.h"
#include "Debug.h"
#include "HelperChildConfig.h"
#include "globals.h"
#include "base/StringArea.h"
#include "HttpHeader.h"
#include "HttpHeaderStat.h"
+#include "HttpHeaderTools.h"
#include "HttpHdrCc.h"
#include "StatHist.h"
#include "Store.h"
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
#include "enums.h"
#include "HttpHdrContRange.h"
#include "HttpHeaderTools.h"
+#include "Mem.h"
#include "protos.h"
/*
#include "HttpHdrSc.h"
#include "HttpHeader.h"
#include "HttpHeaderStat.h"
+#include "HttpHeaderTools.h"
#include "Store.h"
#include "protos.h"
#include "HttpHdrSc.h"
#include "HttpHeader.h"
#include "HttpHeaderStat.h"
+#include "HttpHeaderTools.h"
#include "MemBuf.h"
#include "mgr/Registration.h"
#include "profiler/Profiler.h"
};
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
hasListMember(HDR_TRANSFER_ENCODING, "chunked", ',');
}
+extern void httpHeaderInitModule(void);
+extern void httpHeaderCleanModule(void);
+
#endif /* SQUID_HTTPHEADER_H */
#include "format/Format.h"
#include "HttpHeader.h"
+#include "typedefs.h"
#if HAVE_LIST
#include <list>
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
#include "squid.h"
#include "Debug.h"
+#include "HttpHeaderTools.h"
#include "HttpMsg.h"
#include "MemBuf.h"
#include "profiler/Profiler.h"
#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"
#include "MemBuf.h"
#include "protos.h"
#include "Store.h"
+#include "URL.h"
#if USE_AUTH
#include "auth/UserRequest.h"
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 \
Debug.h \
defines.h \
$(DELAY_POOL_SOURCE) \
+ disk.h \
disk.cc \
$(DISKIO_SOURCE) \
dlink.h \
ExternalACLEntry.h \
FadingCounter.h \
FadingCounter.cc \
+ fd.h \
fd.cc \
fde.cc \
fde.h \
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 \
HttpHdrContRange.cc \
HttpHdrContRange.h \
HttpHeaderStat.h \
- HttpHeader.cc \
HttpHeader.h \
+ HttpHeader.cc \
HttpHeaderMask.h \
HttpHeaderRange.h \
HttpHeaderTools.h \
icp_v2.cc \
icp_v3.cc \
int.cc \
+ internal.h \
internal.cc \
$(IPC_SOURCE) \
ipcache.cc \
list.cc \
lookup_t.h \
main.cc \
+ Mem.h \
mem.cc \
mem_node.cc \
mem_node.h \
mime.cc \
mime_header.cc \
multicast.cc \
+ neighbors.h \
neighbors.cc \
Packer.cc \
Packer.h \
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 \
SquidMath.h \
SquidMath.cc \
SquidNew.cc \
+ stat.h \
stat.cc \
StatCounters.h \
StatCounters.cc \
StoreClient.h \
store_digest.cc \
store_dir.cc \
+ store_key_md5.h \
store_key_md5.cc \
store_log.cc \
store_rebuild.cc \
MemStore.h \
time.cc \
TimeOrTag.h \
+ tools.h \
tools.cc \
tunnel.cc \
typedefs.h \
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)
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 \
HttpRequestMethod.cc \
RemovalPolicy.cc \
$(WIN32_SOURCE) \
+ fd.h \
tests/stub_fd.cc
ufsdump_LDADD = \
$(AUTH_ACL_LIBS) \
HttpHdrSc.h \
HttpHdrScTarget.cc \
HttpHdrScTarget.h \
- HttpHeader.cc \
HttpHeader.h \
+ HttpHeader.cc \
HttpHeaderMask.h \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpControlMsg.h \
HttpMsg.cc \
HttpStatusCode.h \
HttpStatusLine.cc \
HttpStatusLine.h \
+ Mem.h \
mem.cc \
MemBuf.cc \
MemBuf.h \
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 \
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 \
time.cc \
url.cc \
URLScheme.cc \
+ wordlist.h \
wordlist.cc
nodist_tests_testHttpReply_SOURCES=\
$(TESTSOURCES)
HelperChildConfig.h \
HelperChildConfig.cc \
HttpBody.cc \
+ HttpHeader.h \
HttpHeader.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpHdrContRange.cc \
HttpHdrRange.cc \
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 \
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 \
URL.h \
URLScheme.cc \
URLScheme.h \
+ Mem.h \
mem.cc \
MemBuf.cc \
+ wordlist.h \
wordlist.cc
nodist_tests_testACLMaxUserIP_SOURCES= \
$(TESTSOURCES)
HttpParser.h \
HttpRequest.cc \
HttpRequestMethod.cc \
+ Mem.h \
mem.cc \
String.cc \
tests/testCacheManager.cc \
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 \
CpuAffinitySet.h \
$(DELAY_POOL_SOURCE) \
$(DISKIO_SOURCE) \
+ disk.h \
disk.cc \
dlink.h \
dlink.cc \
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 \
http.cc \
HttpBody.h \
HttpBody.cc \
+ HttpHeader.h \
HttpHeader.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpHdrCc.h \
HttpHdrCc.cc \
$(IPC_SOURCE) \
ipcache.cc \
int.cc \
+ internal.h \
internal.cc \
list.cc \
multicast.cc \
MemObject.cc \
mime.cc \
mime_header.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 \
redirect.cc \
+ refresh.h \
refresh.cc \
RemovalPolicy.cc \
Server.cc \
$(SNMP_SOURCE) \
SquidMath.h \
SquidMath.cc \
+ stat.h \
stat.cc \
StatCounters.h \
StatCounters.cc \
store_digest.cc \
store_dir.cc \
store_io.cc \
+ store_key_md5.h \
store_key_md5.cc \
store_log.cc \
store_rebuild.cc \
StoreMetaURL.cc \
StoreMetaVary.cc \
StoreSwapLogData.cc \
+ tools.h \
tools.cc \
tunnel.cc \
SwapDir.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_testCacheManager_SOURCES = \
$(BUILT_SOURCES) \
$(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 \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
HttpHdrRange.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
+ HttpHeader.h \
HttpHeader.cc \
HttpMsg.cc \
HttpReply.cc \
MemBuf.cc \
MemObject.cc \
mem_node.cc \
+ Mem.h \
mem.cc \
Packer.cc \
Parsing.cc \
+ refresh.h \
refresh.cc \
RemovalPolicy.cc \
StatCounters.h \
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 \
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 \
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 \
url.cc \
URLScheme.cc \
$(WIN32_SOURCE) \
+ wordlist.h \
wordlist.cc
nodist_tests_testDiskIO_SOURCES= \
$(TESTSOURCES) \
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 \
debug.cc \
$(DELAY_POOL_SOURCE) \
$(DISKIO_SOURCE) \
+ disk.h \
disk.cc \
dlink.h \
dlink.cc \
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 \
http.cc \
HttpBody.h \
HttpBody.cc \
+ HttpHeader.h \
HttpHeader.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpHdrCc.h \
HttpHdrCc.cc \
$(IPC_SOURCE) \
ipcache.cc \
int.cc \
+ internal.h \
internal.cc \
list.cc \
+ Mem.h \
mem.cc \
mem_node.cc \
MemBuf.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 \
redirect.cc \
+ refresh.h \
refresh.cc \
RemovalPolicy.cc \
Server.cc \
$(SNMP_SOURCE) \
SquidMath.cc \
SquidMath.h \
+ stat.h \
stat.cc \
StatCounters.h \
StatCounters.cc \
store_digest.cc \
store_dir.cc \
store_io.cc \
+ store_key_md5.h \
store_key_md5.cc \
store_log.cc \
store_rebuild.cc \
tests/stub_ipc_Forwarder.cc \
tests/stub_store_stats.cc \
time.cc \
+ tools.h \
tools.cc \
tunnel.cc \
MemStore.cc \
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) \
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 \
debug.cc \
$(DELAY_POOL_SOURCE) \
$(DISKIO_SOURCE) \
+ disk.h \
disk.cc \
dlink.h \
dlink.cc \
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 \
http.cc \
HttpBody.h \
HttpBody.cc \
+ HttpHeader.h \
HttpHeader.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpHdrCc.h \
HttpHdrCc.cc \
$(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 \
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 \
tests/stub_ipc_Forwarder.cc \
tests/stub_store_stats.cc \
time.cc \
+ tools.h \
tools.cc \
tunnel.cc \
MemStore.cc \
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) \
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 \
debug.cc \
$(DELAY_POOL_SOURCE) \
$(DISKIO_SOURCE) \
+ disk.h \
disk.cc \
dlink.h \
dlink.cc \
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 \
HttpHdrRange.cc \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
+ HttpHeader.h \
HttpHeader.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpMsg.cc \
HttpParser.cc \
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 \
store_client.cc \
store_digest.cc \
store_dir.cc \
+ store_key_md5.h \
store_key_md5.cc \
store_io.cc \
store_log.cc \
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) \
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)
HttpParser.h \
HttpRequest.cc \
HttpRequestMethod.cc \
+ Mem.h \
mem.cc \
String.cc \
tests/testHttpRequest.h \
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 \
CpuAffinitySet.cc \
CpuAffinitySet.h \
$(DELAY_POOL_SOURCE) \
+ disk.h \
disk.cc \
dlink.h \
dlink.cc \
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 \
http.cc \
HttpBody.h \
HttpBody.cc \
+ HttpHeader.h \
HttpHeader.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpHdrCc.h \
HttpHdrCc.cc \
$(IPC_SOURCE) \
ipcache.cc \
int.cc \
+ internal.h \
internal.cc \
list.cc \
multicast.cc \
MemObject.cc \
mime.cc \
mime_header.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 \
redirect.cc \
+ refresh.h \
refresh.cc \
RemovalPolicy.cc \
Server.cc \
$(SNMP_SOURCE) \
SquidMath.h \
SquidMath.cc \
+ stat.h \
stat.cc \
StatCounters.h \
StatCounters.cc \
store_digest.cc \
store_dir.cc \
store_io.cc \
+ store_key_md5.h \
store_key_md5.cc \
store_log.cc \
store_rebuild.cc \
StoreMetaVary.cc \
StoreSwapLogData.cc \
event.cc \
+ tools.h \
tools.cc \
tunnel.cc \
SwapDir.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_testHttpRequest_SOURCES = \
$(BUILT_SOURCES)
## 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 \
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 \
Packer.cc \
Parsing.cc \
RemovalPolicy.cc \
+ refresh.h \
refresh.cc \
StatCounters.h \
StatCounters.cc \
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 \
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 \
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 \
time.cc \
url.cc \
URLScheme.cc \
+ wordlist.h \
wordlist.cc
nodist_tests_testStore_SOURCES= \
## 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)
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 \
$(WIN32_SOURCE) \
event.cc \
$(DELAY_POOL_SOURCE) \
+ CacheDigest.h \
CacheDigest.cc \
ConfigParser.cc \
EventLoop.cc \
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 \
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 \
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)
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 \
HttpHdrRange.cc \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
+ HttpHeader.h \
HttpHeader.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpMsg.cc \
HttpReply.cc \
HttpStatusLine.cc \
int.cc \
list.cc \
+ Mem.h \
mem.cc \
MemBuf.cc \
MemObject.cc \
StoreSwapLogData.cc \
store_dir.cc \
store_io.cc \
+ store_key_md5.h \
store_key_md5.cc \
store_swapmeta.cc \
store_swapout.cc \
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 \
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) \
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 \
$(WIN32_SOURCE) \
event.cc \
$(DELAY_POOL_SOURCE) \
+ CacheDigest.h \
CacheDigest.cc \
ConfigParser.cc \
EventLoop.cc \
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 \
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 \
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)
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 \
$(WIN32_SOURCE) \
event.cc \
$(DELAY_POOL_SOURCE) \
+ CacheDigest.h \
CacheDigest.cc \
ConfigParser.cc \
EventLoop.cc \
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 \
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 \
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)
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 \
CpuAffinitySet.cc \
CpuAffinitySet.h \
$(DELAY_POOL_SOURCE) \
+ disk.h \
disk.cc \
DiskIO/ReadRequest.cc \
DiskIO/WriteRequest.cc \
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 \
HttpHdrRange.cc \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
+ HttpHeader.h \
HttpHeader.cc \
+ HttpHeaderTools.h \
HttpHeaderTools.cc \
HttpMsg.cc \
HttpParser.cc \
$(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 \
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 \
store_digest.cc \
store_dir.cc \
store_io.cc \
+ store_key_md5.h \
store_key_md5.cc \
store_log.cc \
store_rebuild.cc \
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)
tests_testConfigParser_SOURCES = \
ClientInfo.h \
+ Mem.h \
mem.cc \
MemBuf.cc \
String.cc \
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)
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 \
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 \
#ifndef SQUID_MEM
#define SQUID_MEM
+/* for mem_type */
+#include "enums.h"
+/* for FREE */
+#include "typedefs.h"
+
#if HAVE_IOSFWD
#include <iosfwd>
#endif
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 */
*/
#include "squid.h"
+#include "Mem.h"
#include "MemBuf.h"
#include "profiler/Profiler.h"
#include "protos.h"
*/
#include "squid.h"
+#include "cache_cf.h"
#include "compat/strtoll.h"
#include "Parsing.h"
#include "protos.h"
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 */
#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"
#include "SquidTime.h"
#include "StatCounters.h"
#include "Store.h"
+#include "tools.h"
+#include "URL.h"
#if USE_ADAPTATION
#include "adaptation/AccessCheck.h"
#include "squid.h"
#include "base/TextException.h"
+#include "Mem.h"
#include "mgr/Registration.h"
#include "profiler/Profiler.h"
#include "protos.h"
*/
#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"
#ifndef SQUID_SRC_URL_H
#define SQUID_SRC_URL_H
+#include "anyp/ProtocolType.h"
#include "MemPool.h"
#include "URLScheme.h"
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 */
#include "squid.h"
#include "acl/CertificateData.h"
#include "acl/Checklist.h"
+#include "cache_cf.h"
#include "protos.h"
#include "wordlist.h"
#include "acl/Checklist.h"
#include "acl/RegexData.h"
#include "acl/DomainData.h"
+#include "fqdncache.h"
#include "HttpRequest.h"
#include "ipcache.h"
#include "protos.h"
#include "squid.h"
#include "acl/DomainData.h"
#include "acl/Checklist.h"
+#include "cache_cf.h"
#include "Debug.h"
#include "protos.h"
#include "wordlist.h"
+#include "URL.h"
template<class T>
inline void
#include "errorpage.h"
#include "globals.h"
#include "HttpRequest.h"
+#include "Mem.h"
#include "protos.h"
/* does name lookup, returns page_id */
#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.
#include "squid.h"
#include "acl/IntRange.h"
+#include "cache_cf.h"
#include "Debug.h"
#include "wordlist.h"
#include "Parsing.h"
#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"
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "acl/MaxConnection.h"
+#include "client_db.h"
#include "Debug.h"
#include "protos.h"
#include "wordlist.h"
#include "acl/FilledChecklist.h"
#include "acl/Random.h"
+#include "cache_cf.h"
#include "Debug.h"
+#include "Parsing.h"
#include "protos.h"
#include "wordlist.h"
#include "acl/Acl.h"
#include "ConfigParser.h"
#include "Debug.h"
+#include "Mem.h"
#include "protos.h"
#include "wordlist.h"
#include "acl/Checklist.h"
#include "acl/RegexData.h"
#include "acl/DomainData.h"
+#include "fqdncache.h"
#include "HttpRequest.h"
#include "protos.h"
#include "squid.h"
#include "acl/TimeData.h"
#include "acl/Checklist.h"
+#include "cache_cf.h"
#include "Debug.h"
#include "protos.h"
#include "wordlist.h"
#include "acl/RegexData.h"
#include "protos.h"
#include "rfc1738.h"
+#include "URL.h"
int
ACLUrlStrategy::match (ACLData<char const *> * &data, ACLFilledChecklist *checklist)
#include "adaptation/ecap/XactionRep.h"
#include "adaptation/ecap/Host.h" /* for protocol constants */
#include "base/TextException.h"
+#include "URL.h"
/* HeaderRep */
#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
#include "adaptation/icap/OptXact.h"
#include "base/TextException.h"
#include "comm.h"
+#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "protos.h"
#include "HttpRequest.h"
#include "icap_log.h"
#include "ipcache.h"
+#include "Mem.h"
#include "pconn.h"
#include "protos.h"
#include "SquidTime.h"
#include "protos.h"
#include "wordlist.h"
#include "ConfigParser.h"
+#include "Parsing.h"
ACL *
ACLMaxUserIP::clone() const
#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"
#include "auth/digest/UserRequest.h"
#include "auth/State.h"
#include "charset.h"
+#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "protos.h"
* 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"
#include "base64.h"
#include "base/StringArea.h"
#include "event.h"
+#include "HttpHeaderTools.h"
#include "mgr/Registration.h"
#include "Store.h"
#include "HttpRequest.h"
#include "client_side.h"
#include "globals.h"
#include "helper.h"
+#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "protos.h"
#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"
#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"
#include "acl/MethodData.h"
#include "anyp/PortCfg.h"
#include "base/RunnersRegistry.h"
+#include "cache_cf.h"
#include "ConfigParser.h"
#include "CpuAffinityMap.h"
#include "DiskIO/DiskIOModule.h"
#include "eui/Config.h"
+#include "ExternalACL.h"
#include "format/Format.h"
#include "globals.h"
+#include "HttpHeaderTools.h"
#include "HttpRequestMethod.h"
#include "ident/Config.h"
#include "ip/Intercept.h"
#include "ip/tools.h"
#include "ipc/Kids.h"
#include "log/Config.h"
+#include "Mem.h"
#include "MemBuf.h"
#include "mgr/Registration.h"
#include "Parsing.h"
+#include "PeerDigest.h"
#include "protos.h"
#include "rfc1738.h"
#include "Store.h"
#include "structs.h"
#include "SwapDir.h"
#include "wordlist.h"
+#include "neighbors.h"
+#include "tools.h"
+/* wccp2 has its own conditional definitions */
+#include "wccp2.h"
#if USE_ADAPTATION
#include "adaptation/Config.h"
#endif
#if HAVE_GLOB_H
#include <glob.h>
#endif
-
#if HAVE_LIMITS_H
#include <limits>
#endif
-
#if HAVE_LIST
#include <list>
#endif
--- /dev/null
+/*
+ * 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_ */
#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
--- /dev/null
+/*
+ * 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_ */
*/
#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;
--- /dev/null
+/*
+ * 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_ */
*/
#include "squid.h"
-
#include "acl/FilledChecklist.h"
#include "anyp/PortCfg.h"
#include "base/Subscription.h"
#include "base/TextException.h"
#include "ChunkedCodingParser.h"
+#include "client_db.h"
#include "client_side_reply.h"
#include "client_side_request.h"
#include "client_side.h"
#include "CommCalls.h"
#include "errorpage.h"
#include "eui/Config.h"
+#include "fd.h"
#include "fde.h"
#include "forward.h"
+#include "fqdncache.h"
+#include "http.h"
#include "HttpHdrContRange.h"
+#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "ident/Config.h"
#include "ident/Ident.h"
+#include "internal.h"
#include "ipc/FdNotes.h"
#include "ipc/StartListening.h"
+#include "log/access_log.h"
+#include "Mem.h"
#include "MemBuf.h"
#include "MemObject.h"
#include "profiler/Profiler.h"
#include "StatHist.h"
#include "Store.h"
#include "TimeOrTag.h"
+#include "tools.h"
+#include "URL.h"
#if USE_AUTH
#include "auth/UserRequest.h"
/*
- * $Id$
- *
+ * DEBUG: section 33 Client-side Routines
+ * AUTHOR: Duane Wessels
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
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 */
#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
#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"
};
/* 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"
#include "compat/cmsg.h"
#include "DescriptorSet.h"
#include "event.h"
+#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "icmp/net_db.h"
#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"
#include "anyp/PortCfg.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
+#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "ICP.h"
#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"
#include "comm/Connection.h"
#include "comm/IoCallback.h"
#include "comm/Write.h"
+#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "MemBuf.h"
#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"
--- /dev/null
+/*
+ * DEBUG: section 06 Disk I/O Routines
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+
+#ifndef SQUID_DISK_H_
+#define SQUID_DISK_H_
+
+#include "typedefs.h"
+
+class MemBuf;
+
+extern int file_open(const char *path, int mode);
+extern void file_close(int fd);
+
+/* Adapter file_write for object callbacks */
+template <class O>
+void
+FreeObject(void *address)
+{
+ O *anObject = static_cast <O *>(address);
+ delete anObject;
+}
+
+extern void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
+extern void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
+extern void file_read(int, char *, int, off_t, DRCB *, void *);
+extern void disk_init(void);
+
+#endif /* SQUID_DISK_H_ */
#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"
*
*/
#include "squid.h"
+#include "cache_cf.h"
#include "comm/Connection.h"
#include "comm/Write.h"
+#include "disk.h"
#include "err_detail_type.h"
#include "errorpage.h"
-#if USE_AUTH
-#include "auth/UserRequest.h"
-#endif
-#include "SquidTime.h"
-#if USE_SSL
-#include "ssl/ErrorDetailManager.h"
-#endif
+#include "ftp.h"
#include "Store.h"
#include "html_quote.h"
+#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "MemObject.h"
#include "MemBuf.h"
#include "protos.h"
#include "rfc1738.h"
+#include "URL.h"
#include "URLScheme.h"
+#include "URL.h"
+#include "tools.h"
#include "wordlist.h"
+#if USE_AUTH
+#include "auth/UserRequest.h"
+#endif
+#include "SquidTime.h"
+#if USE_SSL
+#include "ssl/ErrorDetailManager.h"
+#endif
/**
\defgroup ErrorPageInternal Error Page Internals
#include "HttpReply.h"
#include "HttpRequest.h"
#include "ip/Address.h"
+#include "Mem.h"
#include "MemBuf.h"
#include "profiler/Profiler.h"
#include "protos.h"
#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);
#include "squid.h"
#include "esi/VarState.h"
#include "HttpReply.h"
+#include "Mem.h"
#include "protos.h"
CBDATA_TYPE (ESIVarState);
#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"
#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"
#include "squid.h"
#include "comm/Loops.h"
#include "Debug.h"
+#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "profiler/Profiler.h"
--- /dev/null
+/*
+ * 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_ */
#include "squid.h"
+#include "cache_cf.h"
#include "format/Config.h"
#include "protos.h"
#include <list>
#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
#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"
#include "cbdata.h"
#include "DnsLookupDetails.h"
#include "event.h"
+#include "Mem.h"
#include "mgr/Registration.h"
#include "protos.h"
#include "SquidDns.h"
#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
}
/// \ingroup FQDNCacheAPI
+#if 0
const char *
fqdnFromAddr(const Ip::Address &addr)
{
return buf;
}
+#endif
/// \ingroup FQDNCacheInternal
static void
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
--- /dev/null
+/*
+ * 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_ */
#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"
#include "ConfigOption.h"
#include "StoreFScoss.h"
#include "Parsing.h"
+#include "store_key_md5.h"
#include "swap_log_op.h"
#include "SquidMath.h"
*/
#include "squid.h"
+#include "disk.h"
#include "fs/rock/RockRebuild.h"
#include "fs/rock/RockSwapDir.h"
#include "fs/rock/RockDbCell.h"
*/
#include "squid.h"
+#include "cache_cf.h"
#include "ConfigOption.h"
#include "DiskIO/DiskIOModule.h"
#include "DiskIO/DiskIOStrategy.h"
*/
#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"
* 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"
#include "RebuildState.h"
#include "SquidMath.h"
#include "DiskIO/DiskIOStrategy.h"
+#include "store_key_md5.h"
#include "StoreSearchUFS.h"
#include "StoreSwapLogData.h"
#include "SquidTime.h"
#include "CommCalls.h"
#include "compat/strtoll.h"
#include "errorpage.h"
+#include "fd.h"
#include "fde.h"
#include "forward.h"
#include "html_quote.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "ip/tools.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"
+#include "URL.h"
#include "URLScheme.h"
#include "wordlist.h"
--- /dev/null
+/*
+ * 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_ */
#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"
--- /dev/null
+/*
+ * 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_ */
#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"
#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;
#include "comm/Write.h"
#include "err_detail_type.h"
#include "errorpage.h"
+#include "fd.h"
#include "fde.h"
#include "HttpControlMsg.h"
#include "http.h"
#include "HttpHdrContRange.h"
#include "HttpHdrSc.h"
#include "HttpHdrScTarget.h"
+#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
+#include "log/access_log.h"
#include "MemBuf.h"
#include "MemObject.h"
+#include "neighbors.h"
#include "profiler/Profiler.h"
#include "protos.h"
+#include "refresh.h"
#include "rfc1738.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "Store.h"
+#include "tools.h"
+#include "URL.h"
#if USE_AUTH
#include "auth/UserRequest.h"
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 */
#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"
#include "MemObject.h"
#include "fde.h"
#include "forward.h"
+#include "internal.h"
#include "protos.h"
#include "SquidTime.h"
#include "wordlist.h"
#include "ip/Address.h"
+#include "neighbors.h"
+#include "URL.h"
+#include "Mem.h"
+#include "disk.h"
+
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#include "AccessLogEntry.h"
#include "acl/Acl.h"
#include "acl/FilledChecklist.h"
+#include "client_db.h"
#include "comm.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
#include "comm/UdpOpenDialer.h"
+#include "fd.h"
#include "HttpRequest.h"
#include "icmp/net_db.h"
#include "ICP.h"
#include "ip/tools.h"
#include "ipcache.h"
#include "md5.h"
+#include "neighbors.h"
#include "protos.h"
+#include "refresh.h"
#include "rfc1738.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "Store.h"
+#include "store_key_md5.h"
#include "SwapDir.h"
+#include "tools.h"
#include "wordlist.h"
#if HAVE_ERRNO_H
#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;
--- /dev/null
+/*
+ * 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_ */
#include "squid.h"
#include "acl/Gadgets.h"
+#include "cache_cf.h"
#include "comm/Connection.h"
#include "ConfigParser.h"
#include "fde.h"
#include "squid.h"
#include "comm/Connection.h"
+#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "ip/Address.h"
#include "squid.h"
#include "protos.h"
#include "Store.h"
+#include "store_key_md5.h"
#include "ipc/StoreMap.h"
Ipc::StoreMap::Owner *
*/
#include "squid.h"
+#include "cache_cf.h"
#include "comm.h"
+#include "fd.h"
#include "fde.h"
#include "ip/Address.h"
#include "rfc1738.h"
#include "ip/Address.h"
#include "ip/tools.h"
#include "ipcache.h"
+#include "Mem.h"
#include "mgr/Registration.h"
#include "protos.h"
#include "rfc3596.h"
*/
#include "squid.h"
+#include "Mem.h"
#include "protos.h"
#include "typedefs.h"
#include "squid.h"
+#include "cache_cf.h"
#include "log/Config.h"
#include "protos.h"
#include "AccessLogEntry.h"
#include "format/Quoting.h"
+#include "fqdncache.h"
#include "HttpRequest.h"
#include "log/File.h"
#include "log/Formats.h"
noinst_LTLIBRARIES = liblog.la
liblog_la_SOURCES = \
+ access_log.h \
access_log.cc \
Config.cc \
Config.h \
*/
#include "squid.h"
+#include "disk.h"
+#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "log/File.h"
#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"
#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"
#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"
--- /dev/null
+/*
+ * 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_ */
#include "base/RunnersRegistry.h"
#include "base/Subscription.h"
#include "base/TextException.h"
+#include "cache_cf.h"
+#include "carp.h"
+#include "client_db.h"
+#include "client_side.h"
#include "comm.h"
#include "ConfigParser.h"
#include "CpuAffinity.h"
+#include "disk.h"
#include "DiskIO/DiskIOModule.h"
#include "errorpage.h"
#include "event.h"
#include "EventLoop.h"
#include "ExternalACL.h"
+#include "fd.h"
#include "format/Token.h"
#include "forward.h"
#include "fs/Module.h"
-#include "fs/Module.h"
+#include "fqdncache.h"
#include "htcp.h"
+#include "HttpHeader.h"
#include "HttpReply.h"
#include "icmp/IcmpSquid.h"
#include "icmp/net_db.h"
#include "ip/tools.h"
#include "Mem.h"
#include "MemPool.h"
+#include "neighbors.h"
#include "pconn.h"
#include "PeerSelectState.h"
+#include "peer_sourcehash.h"
+#include "peer_userhash.h"
#include "profiler/Profiler.h"
#include "protos.h"
+#include "refresh.h"
+#include "tools.h"
#include "SquidDns.h"
#include "SquidTime.h"
+#include "stat.h"
#include "StatCounters.h"
#include "StoreFileSystem.h"
#include "Store.h"
#include "SwapDir.h"
+#include "URL.h"
+#include "wccp.h"
+#include "wccp2.h"
#if USE_ADAPTATION
#include "adaptation/Config.h"
#include <ostream>
#endif
+/* forward declarations */
+static void memFree2K(void *);
+static void memFree4K(void *);
+static void memFree8K(void *);
+static void memFree16K(void *);
+static void memFree32K(void *);
+static void memFree64K(void *);
+
/* module globals */
const size_t squidSystemPageSize=getpagesize();
*/
#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"
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "anyp/PortCfg.h"
+#include "CacheDigest.h"
#include "comm/Connection.h"
#include "comm/ConnOpener.h"
#include "event.h"
#include "ipcache.h"
#include "MemObject.h"
#include "mgr/Registration.h"
+#include "neighbors.h"
#include "PeerDigest.h"
#include "PeerSelectState.h"
#include "protos.h"
#include "SquidMath.h"
#include "SquidTime.h"
+#include "stat.h"
#include "Store.h"
+#include "store_key_md5.h"
+#include "URL.h"
/* count mcast group peers every 15 minutes */
#define MCAST_COUNT_RATE 900
--- /dev/null
+/*
+ * 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_ */
#include "squid.h"
#include "comm.h"
#include "comm/Connection.h"
+#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "mgr/Registration.h"
#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 */
#include "squid.h"
#include "acl/FilledChecklist.h"
+#include "carp.h"
#include "client_side.h"
#include "DnsLookupDetails.h"
#include "errorpage.h"
#include "icmp/net_db.h"
#include "ICP.h"
#include "ipcache.h"
+#include "Mem.h"
+#include "neighbors.h"
+#include "peer_sourcehash.h"
+#include "peer_userhash.h"
#include "PeerSelectState.h"
#include "protos.h"
#include "SquidTime.h"
#include "squid.h"
#include "HttpRequest.h"
#include "mgr/Registration.h"
+#include "neighbors.h"
#include "protos.h"
#include "Store.h"
--- /dev/null
+/*
+ * 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_ */
#include "globals.h"
#include "HttpRequest.h"
#include "mgr/Registration.h"
+#include "neighbors.h"
#include "protos.h"
#include "Store.h"
--- /dev/null
+/*
+ * 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_ */
#include "enums.h"
/* some parameters stil need this */
#include "wordlist.h"
-
-/* for parameters that still need these */
+#include "anyp/ProtocolType.h"
+#include "Debug.h"
+#include "HttpHeader.h"
+#include "HttpStatusCode.h"
#include "lookup_t.h"
+
class HttpRequestMethod;
#if USE_DELAY_POOLS
class ClientInfo;
#endif
-#if USE_FORW_VIA_DB
-extern void fvdbCountVia(const char *key);
-extern void fvdbCountForw(const char *key);
-#endif
-#if HEADERS_LOG
-SQUIDCEXTERN void headersLog(int cs, int pq, const HttpRequestMethod& m, void *data);
-#endif
-extern int logTypeIsATcpHit(log_type);
-
-/*
- * cache_cf.c
- */
-SQUIDCEXTERN void configFreeMemory(void);
-class MemBuf;
-extern void wordlistCat(const wordlist *, MemBuf * mb);
-extern void self_destruct(void);
-SQUIDCEXTERN void add_http_port(char *portspec);
-extern int xatoi(const char *token);
-extern long xatol(const char *token);
-
-/* extra functions from cache_cf.c useful for lib modules */
-SQUIDCEXTERN void parse_int(int *var);
-SQUIDCEXTERN void parse_onoff(int *var);
-SQUIDCEXTERN void parse_eol(char *volatile *var);
-SQUIDCEXTERN void parse_wordlist(wordlist ** list);
-SQUIDCEXTERN void requirePathnameExists(const char *name, const char *path);
-SQUIDCEXTERN void parse_time_t(time_t * var);
-
-/* client_side.c - FD related client side routines */
-
-SQUIDCEXTERN void clientdbInit(void);
-
-#include "anyp/ProtocolType.h"
-SQUIDCEXTERN void clientdbUpdate(const Ip::Address &, log_type, AnyP::ProtocolType, size_t);
-
-SQUIDCEXTERN int clientdbCutoffDenied(const Ip::Address &);
-void clientdbDump(StoreEntry *);
-SQUIDCEXTERN void clientdbFreeMemory(void);
-
-SQUIDCEXTERN int clientdbEstablished(const Ip::Address &, int);
-#if USE_DELAY_POOLS
-SQUIDCEXTERN void clientdbSetWriteLimiter(ClientInfo * info, const int writeSpeedLimit,const double initialBurst,const double highWatermark);
-SQUIDCEXTERN ClientInfo * clientdbGetInfo(const Ip::Address &addr);
-#endif
-SQUIDCEXTERN void clientOpenListenSockets(void);
-SQUIDCEXTERN void clientHttpConnectionsClose(void);
-SQUIDCEXTERN void httpRequestFree(void *);
-
-extern void clientAccessCheck(void *);
-
-#include "Debug.h"
-
-/* packs, then prints an object using debugs() */
-SQUIDCEXTERN void debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm);
-
-/* disk.c */
-SQUIDCEXTERN int file_open(const char *path, int mode);
-SQUIDCEXTERN void file_close(int fd);
-/* Adapter file_write for object callbacks */
-
-template <class O>
-void
-FreeObject(void *address)
-{
- O *anObject = static_cast <O *>(address);
- delete anObject;
-}
-
-SQUIDCEXTERN void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
-SQUIDCEXTERN void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
-SQUIDCEXTERN void file_read(int, char *, int, off_t, DRCB *, void *);
-SQUIDCEXTERN void disk_init(void);
-
-extern void fd_close(int fd);
-extern void fd_open(int fd, unsigned int type, const char *);
-extern void fd_note(int fd, const char *);
-extern void fd_bytes(int fd, int len, unsigned int type);
-extern void fdDumpOpen(void);
-extern int fdUsageHigh(void);
-extern void fdAdjustReserved(void);
-
-SQUIDCEXTERN void fqdncache_nbgethostbyaddr(const Ip::Address &, FQDNH *, void *);
-
-SQUIDCEXTERN const char *fqdncache_gethostbyaddr(const Ip::Address &, int flags);
-SQUIDCEXTERN void fqdncache_init(void);
-void fqdnStats(StoreEntry *);
-SQUIDCEXTERN void fqdncacheReleaseInvalid(const char *);
-
-SQUIDCEXTERN const char *fqdnFromAddr(const Ip::Address &);
-SQUIDCEXTERN int fqdncacheQueueDrain(void);
-SQUIDCEXTERN void fqdncacheFreeMemory(void);
-SQUIDCEXTERN void fqdncache_restart(void);
-extern void fqdncache_purgelru(void *);
-SQUIDCEXTERN void fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames);
class FwdState;
-/**
- \defgroup ServerProtocolFTPAPI Server-Side FTP API
- \ingroup ServerProtocol
- */
-
-/// \ingroup ServerProtocolFTPAPI
-SQUIDCEXTERN void ftpStart(FwdState *);
class HttpRequest;
class HttpReply;
-/// \ingroup ServerProtocolFTPAPI
-SQUIDCEXTERN const char *ftpUrlWith2f(HttpRequest *);
-
-/**
- \defgroup ServerProtocolGopherAPI Server-Side Gopher API
- \ingroup ServerProtocol
- */
-
-/// \ingroup ServerProtocolGopherAPI
-SQUIDCEXTERN void gopherStart(FwdState *);
-
-/// \ingroup ServerProtocolGopherAPI
-SQUIDCEXTERN int gopherCachable(const HttpRequest *);
-
-/**
- \defgroup ServerProtocolWhoisAPI Server-Side WHOIS API
- \ingroup ServerProtocol
- */
-
-/// \ingroup ServerProtocolWhoisAPI
-SQUIDCEXTERN void whoisStart(FwdState *);
-
-/* http.c */
-/* for http_hdr_type field */
-#include "HttpHeader.h"
-SQUIDCEXTERN int httpCachable(const HttpRequestMethod&);
-SQUIDCEXTERN void httpStart(FwdState *);
-SQUIDCEXTERN mb_size_t httpBuildRequestPrefix(HttpRequest * request,
- HttpRequest * orig_request,
- StoreEntry * entry,
- MemBuf * mb,
- http_state_flags);
-extern const char *httpMakeVaryMark(HttpRequest * request, HttpReply const * reply);
-
-#include "HttpStatusCode.h"
-
-class StatHist;
-
-/* Http Cache Control Header Field */
-SQUIDCEXTERN void httpHdrCcInitModule(void);
-SQUIDCEXTERN void httpHdrCcCleanModule(void);
-SQUIDCEXTERN void httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist);
-extern void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
-
-/* Http Header Tools */
-class HttpHeaderFieldInfo;
-SQUIDCEXTERN HttpHeaderFieldInfo *httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs * attrs, int count);
-SQUIDCEXTERN void httpHeaderDestroyFieldsInfo(HttpHeaderFieldInfo * info, int count);
-SQUIDCEXTERN http_hdr_type httpHeaderIdByName(const char *name, size_t name_len, const HttpHeaderFieldInfo * attrs, int end);
-SQUIDCEXTERN http_hdr_type httpHeaderIdByNameDef(const char *name, int name_len);
-SQUIDCEXTERN const char *httpHeaderNameById(int id);
-SQUIDCEXTERN int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
+/* TODO: move to StrList.h */
SQUIDCEXTERN void strListAdd(String * str, const char *item, char del);
SQUIDCEXTERN int strListIsMember(const String * str, const char *item, char del);
SQUIDCEXTERN int strListIsSubstr(const String * list, const char *s, char del);
SQUIDCEXTERN int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos);
-SQUIDCEXTERN const char *getStringPrefix(const char *str, const char *end);
-SQUIDCEXTERN int httpHeaderParseInt(const char *start, int *val);
-SQUIDCEXTERN void httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...) PRINTF_FORMAT_ARG3;
-/* Http Header */
-SQUIDCEXTERN void httpHeaderInitModule(void);
-SQUIDCEXTERN void httpHeaderCleanModule(void);
+extern const char *getStringPrefix(const char *str, const char *end);
+
+
/* store report about current header usage and other stats */
void httpHeaderStoreReport(StoreEntry * e);
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);
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);
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 */
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
/// 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
*/
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);
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
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
class StatCounters;
SQUIDCEXTERN StatCounters *snmpStatGet(int);
- /* Vary support functions */
- SQUIDCEXTERN int varyEvaluateMatch(StoreEntry * entry, HttpRequest * req);
/* CygWin & Windows NT Port */
/* win32.c */
#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
#include "client_side_request.h"
#include "comm/Connection.h"
#include "fde.h"
+#include "fqdncache.h"
#include "globals.h"
#include "HttpRequest.h"
#include "helper.h"
#include "protos.h"
#include "SquidTime.h"
#include "Store.h"
+#include "URL.h"
typedef enum {
rcHTTP,
--- /dev/null
+/*
+ * 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_ */
#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;
#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"
/************************************************************************
#include "protos.h"
#include "ssl/ServerBump.h"
#include "Store.h"
+#include "URL.h"
CBDATA_NAMESPACED_CLASS_INIT(Ssl, ServerBump);
#include "ssl/helper.h"
#include "SquidTime.h"
#include "SwapDir.h"
+#include "wordlist.h"
+#include "protos.h"
Ssl::Helper * Ssl::Helper::GetInstance()
{
#include "ssl/ErrorDetail.h"
#include "ssl/support.h"
#include "ssl/gadgets.h"
+#include "URL.h"
#if HAVE_ERRNO_H
#include <errno.h>
*/
#include "squid.h"
+#include "CacheDigest.h"
#include "client_side_request.h"
#include "client_side.h"
#include "comm/Connection.h"
#include "mgr/IoAction.h"
#include "mgr/Registration.h"
#include "mgr/ServiceTimesAction.h"
+#include "neighbors.h"
+#include "PeerDigest.h"
#include "protos.h"
#include "SquidMath.h"
#include "SquidTime.h"
#include "StatCounters.h"
+#include "stat.h"
#include "StoreClient.h"
#include "Store.h"
#if USE_AUTH
--- /dev/null
+/*
+ * 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_ */
*/
#include "squid.h"
+#include "CacheDigest.h"
#include "CacheManager.h"
#include "comm/Connection.h"
#include "ETag.h"
#include "stmem.h"
#include "StoreClient.h"
#include "Store.h"
+#include "store_key_md5.h"
#include "StoreIOState.h"
#include "StoreMeta.h"
+#include "store_key_md5.h"
#include "SwapDir.h"
#include "swap_log_op.h"
#if USE_DELAY_POOLS
#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"
#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"
#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];
--- /dev/null
+/*
+ * 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_ */
#include "protos.h"
#include "StatCounters.h"
#include "Store.h"
+#include "store_key_md5.h"
#include "SwapDir.h"
#include "StoreSearch.h"
#include "SquidTime.h"
*/
#include "squid.h"
+#include "CacheDigest.h"
+#include "store_key_md5.h"
#if HAVE_ERRNO_H
#include <errno.h>
#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;
/* 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);
#include "event.h"
#include "Mem.h"
#include "protos.h"
+#include "stat.h"
#include "testEvent.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testEvent );
#include "EventLoop.h"
#include "Mem.h"
#include "protos.h"
+#include "stat.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop );
#include <cppunit/TestAssert.h>
#include "testHttpReply.h"
+#include "HttpHeader.h"
#include "HttpReply.h"
#include "Mem.h"
#include "protos.h"
#include <cppunit/TestAssert.h>
#include "testHttpRequest.h"
+#include "HttpHeader.h"
#include "HttpRequest.h"
#include "Mem.h"
#include "protos.h"
#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"
--- /dev/null
+/*
+ * 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_ */
#include "PeerSelectState.h"
#include "protos.h"
#include "StatCounters.h"
+#include "tools.h"
#if USE_DELAY_POOLS
#include "DelayId.h"
#include "StoreMeta.h"
#include "StoreMetaUnpacker.h"
#include "Store.h"
+#include "store_key_md5.h"
#include "Generic.h"
#include "mgr/Registration.h"
*/
#include "squid.h"
+#include "disk.h"
+#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "xusleep.h"
#include "SquidTime.h"
#include "icmp/net_db.h"
#include "protos.h"
+#include "URL.h"
#define URN_REQBUF_SZ 4096
--- /dev/null
+/*
+ * 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_ */
#if USE_WCCPv2
+#include "cache_cf.h"
#include "comm.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
--- /dev/null
+/*
+ * 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_ */
#include "protos.h"
#include "StatCounters.h"
#include "Store.h"
+#include "tools.h"
#if HAVE_ERRNO_H
#include <errno.h>
--- /dev/null
+/*
+ * 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_ */
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 */