/*
- * $Id: Array.h,v 1.4 2001/01/12 00:37:12 wessels Exp $
+ * $Id: Array.h,v 1.5 2001/02/07 18:56:50 hno Exp $
*
* AUTHOR: Alex Rousskov
*
} Array;
-extern Array *arrayCreate();
+extern Array *arrayCreate(void);
extern void arrayInit(Array * s);
extern void arrayClean(Array * s);
extern void arrayDestroy(Array * s);
/*
- * $Id: util.h,v 1.58 2001/01/12 00:37:12 wessels Exp $
+ * $Id: util.h,v 1.59 2001/02/07 18:56:50 hno Exp $
*
* AUTHOR: Harvest Derived
*
double drand48(void);
#endif
+/*
+ * Returns the amount of known allocated memory
+ */
+int statMemoryAccounted(void);
+
#endif /* ndef _UTIL_H_ */
/*
- * $Id: Array.cc,v 1.6 2001/01/12 00:37:12 wessels Exp $
+ * $Id: Array.cc,v 1.7 2001/02/07 18:56:50 hno Exp $
*
* AUTHOR: Alex Rousskov
*
#include "config.h"
+#include "Array.h"
+
#if HAVE_ASSERT_H
#include <assert.h>
#endif
static void arrayGrow(Array * a, int min_capacity);
Array *
-arrayCreate()
+arrayCreate(void)
{
Array *a = xmalloc(sizeof(Array));
arrayInit(a);
/*
- * $Id: base64.c,v 1.17 2001/01/07 23:36:36 hno Exp $
+ * $Id: base64.c,v 1.18 2001/02/07 18:56:50 hno Exp $
*/
#include "config.h"
+#include "util.h"
#if HAVE_STDIO_H
#include <stdio.h>
#include <stdlib.h>
#endif
+
static void base64_init(void);
static int base64_initialized = 0;
/*
- * $Id: heap.c,v 1.7 2001/01/12 00:37:12 wessels Exp $
+ * $Id: heap.c,v 1.8 2001/02/07 18:56:50 hno Exp $
*
* AUTHOR: John Dilley, Hewlett Packard
*
****************************************************************************/
#include "config.h"
+#include "heap.h"
#if HAVE_STDLIB_H
#include <stdlib.h>
/*
* Print the heap in element order, id..last.
*/
-void
+static void
heap_print_inorder(heap * hp, int id)
{
while (id < hp->last) {
/*
- * $Id: iso3307.c,v 1.4 1998/09/23 17:16:11 wessels Exp $
+ * $Id: iso3307.c,v 1.5 2001/02/07 18:56:50 hno Exp $
*/
#include "config.h"
+#include "util.h"
#if HAVE_STDIO_H
#include <stdio.h>
/*
- * $Id: ntlmauth.c,v 1.1 2001/01/07 23:36:36 hno Exp $
+ * $Id: ntlmauth.c,v 1.2 2001/02/07 18:56:50 hno Exp $
*
* * * * * * * * Legal stuff * * * * * * *
*
#include "ntlmauth.h"
#include "util.h" /* for base64-related stuff */
+#if UNUSED_CODE
/* Dumps NTLM flags to standard error for debugging purposes */
void
ntlm_dump_ntlmssp_flags(u_int32_t flags)
(flags & REQUEST_NON_NT_SESSION_KEY ? "Req_nonnt_sesskey " : "")
);
}
+#endif
#define lstring_zero(s) s.str=NULL; s.l=-1;
/*
- * $Id: radix.c,v 1.11 2001/01/12 00:37:12 wessels Exp $
+ * $Id: radix.c,v 1.12 2001/02/07 18:56:50 hno Exp $
*
* DEBUG: section 53 Radix tree data structure implementation
* AUTHOR: NetBSD Derived
*/
#include "config.h"
+#include "radix.h"
#if HAVE_UNISTD_H
#include <unistd.h>
return (!masks_are_equal);
}
-struct radix_node *
+static struct radix_node *
rn_lookup(v_arg, m_arg, head)
void *v_arg, *m_arg;
struct radix_node_head *head;
/*
- * $Id: rfc1035.c,v 1.20 2001/01/12 00:37:12 wessels Exp $
+ * $Id: rfc1035.c,v 1.21 2001/02/07 18:56:50 hno Exp $
*
* Low level DNS protocol routines
* AUTHOR: Duane Wessels
* Note message compression is not supported here.
* Returns number of octets packed.
*/
-off_t
+static off_t
rfc1035NamePack(char *buf, size_t sz, const char *name)
{
off_t off = 0;
rfc1035_rr ** records,
unsigned short *id)
{
- off_t off = 0;
+ size_t off = 0;
int l;
int i;
int nr = 0;
rfc1035BuildAQuery(const char *hostname, char *buf, size_t * szp)
{
static rfc1035_header h;
- off_t offset = 0;
+ size_t offset = 0;
size_t sz = *szp;
memset(&h, '\0', sizeof(h));
/* the first char of hostname must be alphanmeric */
rfc1035BuildPTRQuery(const struct in_addr addr, char *buf, size_t * szp)
{
static rfc1035_header h;
- off_t offset = 0;
+ size_t offset = 0;
size_t sz = *szp;
static char rev[32];
unsigned int i;
RFC1035_TYPE_PTR,
RFC1035_CLASS_IN);
assert(offset <= sz);
- *szp = (size_t) offset;
+ *szp = offset;
return h.id;
}
/*
- * $Id: rfc1738.c,v 1.22 2001/01/12 00:37:13 wessels Exp $
+ * $Id: rfc1738.c,v 1.23 2001/02/07 18:56:51 hno Exp $
*
* DEBUG:
* AUTHOR: Harvest Derived
static size_t bufsize = 0;
const char *p;
char *q;
- int i, do_escape;
+ unsigned int i, do_escape;
if (buf == NULL || strlen(url) * 3 > bufsize) {
xfree(buf);
/*
- * $Id: safe_inet_addr.c,v 1.11 1999/05/04 21:20:41 wessels Exp $
+ * $Id: safe_inet_addr.c,v 1.12 2001/02/07 18:56:51 hno Exp $
*/
#include "config.h"
+#include "util.h"
#if HAVE_STDIO_H
#include <stdio.h>
/*
- * $Id: stub_memaccount.c,v 1.4 1999/05/04 21:20:42 wessels Exp $
+ * $Id: stub_memaccount.c,v 1.5 2001/02/07 18:56:51 hno Exp $
*/
/* Stub function for programs not implementing statMemoryAccounted */
-#include <config.h>
+#include "config.h"
+#include "util.h"
int
statMemoryAccounted(void)
{
/*
- * $Id: HttpHdrRange.cc,v 1.24 2001/01/12 00:37:13 wessels Exp $
+ * $Id: HttpHdrRange.cc,v 1.25 2001/02/07 18:56:51 hno Exp $
*
* DEBUG: section 64 HTTP Range Header
* AUTHOR: Alex Rousskov
* Range
*/
-HttpHdrRange *
+static HttpHdrRange *
httpHdrRangeCreate(void)
{
HttpHdrRange *r = memAllocate(MEM_HTTP_HDR_RANGE);
/*
- * $Id: HttpHeaderTools.cc,v 1.30 2001/01/12 00:37:14 wessels Exp $
+ * $Id: HttpHeaderTools.cc,v 1.31 2001/02/07 18:56:51 hno Exp $
*
* DEBUG: section 66 HTTP Header Tools
* AUTHOR: Alex Rousskov
#include "squid.h"
+#if UNUSED_CODE
static int httpHeaderStrCmp(const char *h1, const char *h2, int len);
+#endif
static void httpHeaderPutStrvf(HttpHeader * hdr, http_hdr_type id, const char *fmt, va_list vargs);
* parses a given string then packs compiled headers and compares the result
* with the original, reports discrepancies
*/
+#if UNUSED_CODE
void
httpHeaderTestParser(const char *hstr)
{
packerClean(&p);
memBufClean(&mb);
}
+#endif
/* like strncasecmp but ignores ws characters */
+#if UNUSED_CODE
static int
httpHeaderStrCmp(const char *h1, const char *h2, int len)
{
/* NOTREACHED */
return 0;
}
+#endif
/*
* httpHdrMangle checks the anonymizer (header_access) configuration.
* Returns 1 if the header is allowed.
*/
-int
+static int
httpHdrMangle(HttpHeaderEntry * e, request_t * request)
{
int retval;
/*
- * $Id: access_log.cc,v 1.66 2001/01/12 00:37:14 wessels Exp $
+ * $Id: access_log.cc,v 1.67 2001/02/07 18:56:51 hno Exp $
*
* DEBUG: section 46 Access Log
* AUTHOR: Duane Wessels
return buf;
}
-char *
+static char *
username_quote(const char *header)
/* copy of log_quote. Bugs there will be found here */
{
return buf;
}
-char *
+static char *
accessLogFormatName(const char *name)
{
if (NULL == name)
/*
- * $Id: acl.cc,v 1.245 2001/02/01 18:47:46 hno Exp $
+ * $Id: acl.cc,v 1.246 2001/02/07 18:56:51 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
static void aclParseUserList(void **current);
static void aclParseIpList(void *curlist);
static void aclParseIntlist(void *curlist);
+#if SQUID_SNMP
static void aclParseWordList(void *curlist);
+#endif
static void aclParseProtoList(void *curlist);
static void aclParseMethodList(void *curlist);
static void aclParseTimeSpec(void *curlist);
}
}
+#if SQUID_SNMP
static void
aclParseWordList(void *curlist)
{
while ((t = strtokFile()))
wordlistAdd(curlist, t);
}
+#endif
static void
aclParseUserList(void **current)
wordlistAdd(outlist, node_data);
}
-wordlist *
+static wordlist *
aclDumpUserList(acl_user_data * data)
{
wordlist *wl = NULL;
/*
- * $Id: asn.cc,v 1.68 2001/01/12 00:37:14 wessels Exp $
+ * $Id: asn.cc,v 1.69 2001/02/07 18:56:51 hno Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
xfree(data);
}
-int
+static int
mask_len(int mask)
{
int len = 32;
/*
- * $Id: auth_basic.cc,v 1.5 2001/01/31 22:16:40 hno Exp $
+ * $Id: auth_basic.cc,v 1.6 2001/02/07 18:56:53 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
static int authbasic_initialised = 0;
MemPool *basic_data_pool = NULL;
+
/*
*
- * Private Functions
+ * Public Functions
*
*/
-void
-authBasicDone(void)
-{
- if (basicauthenticators)
- helperShutdown(basicauthenticators);
- authbasic_initialised = 0;
- if (!shutting_down)
- return;
- if (basicauthenticators)
- helperFree(basicauthenticators);
- basicauthenticators = NULL;
- if (basic_data_pool) {
- memPoolDestroy(basic_data_pool);
- basic_data_pool = NULL;
- }
- debug(29, 2) ("authBasicDone: Basic authentication Shutdown.\n");
-}
+AUTHSSETUP authSchemeSetup_basic;
void
authSchemeSetup_basic(authscheme_entry_t * authscheme)
authscheme->donefunc = authBasicDone;
}
-int
+/* internal functions */
+
+static void
+authBasicDone(void)
+{
+ if (basicauthenticators)
+ helperShutdown(basicauthenticators);
+ authbasic_initialised = 0;
+ if (!shutting_down)
+ return;
+ if (basicauthenticators)
+ helperFree(basicauthenticators);
+ basicauthenticators = NULL;
+ if (basic_data_pool) {
+ memPoolDestroy(basic_data_pool);
+ basic_data_pool = NULL;
+ }
+ debug(29, 2) ("authBasicDone: Basic authentication Shutdown.\n");
+}
+
+static int
authenticateBasicActive()
{
return (authbasic_initialised == 1) ? 1 : 0;
}
-int
+static int
authBasicConfigured()
{
if ((basicConfig != NULL) && (basicConfig->authenticate != NULL) &&
return 0;
}
-int
+static int
authenticateBasicAuthenticated(auth_user_request_t * auth_user_request)
{
basic_data *basic_auth = auth_user_request->auth_user->scheme_data;
return 0;
}
-int
+#if UNUSED_CODE
+static int
authenticateBasiccmpUsername(basic_data * u1, basic_data * u2)
{
return strcmp(u1->username, u2->username);
}
+#endif
/* log a basic user in
*/
return NULL;
}
-basic_data *
+static basic_data *
authBasicDataNew()
{
basic_data *temp;
return temp;
}
-void
+#if UNUSED_CODE
+static void
authBasicDataFree(basic_data * basic_auth)
{
}
+#endif
-auth_user_t *
+static auth_user_t *
authBasicAuthUserFindUsername(const char *username)
{
auth_user_hash_pointer *usernamehash;
/*
- * $Id: authenticate.cc,v 1.20 2001/01/31 22:16:38 hno Exp $
+ * $Id: authenticate.cc,v 1.21 2001/02/07 18:56:51 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
/* Generic Functions */
-int
+static int
authenticateAuthSchemeConfigured(const char *proxy_auth)
{
authScheme *scheme;
return temp_auth;
}
-auth_user_request_t *
-authenticateAuthUserRequestNew()
+static auth_user_request_t *
+authenticateAuthUserRequestNew(void)
{
auth_user_request_t *temp_request;
if (!auth_user_request_pool)
return temp_request;
}
-void
+static void
authenticateAuthUserRequestFree(auth_user_request_t * auth_user_request)
{
dlink_node *link;
}
int
-authenticateActiveSchemeCount()
+authenticateActiveSchemeCount(void)
{
int i = 0, rv = 0;
for (i = 0; authscheme_list && authscheme_list[i].typestr; i++)
}
int
-authenticateSchemeCount()
+authenticateSchemeCount(void)
{
int i = 0, rv = 0;
for (i = 0; authscheme_list && authscheme_list[i].typestr; i++)
}
void
-authenticateInitUserCache()
+authenticateInitUserCache(void)
{
if (!proxy_auth_username_cache) {
/* First time around, 7921 should be big enough */
*/
void
-authenticateUserCacheRestart()
+authenticateUserCacheRestart(void)
{
auth_user_hash_pointer *usernamehash;
auth_user_t *auth_user;
/*
- * $Id: cache_cf.cc,v 1.373 2001/01/30 09:46:46 hno Exp $
+ * $Id: cache_cf.cc,v 1.374 2001/02/07 18:56:51 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
Config2.onoff.enable_purge = 1;
if (geteuid() == 0) {
if (NULL != Config.effectiveUser) {
- struct passwd *pwd = getpwnam(Config.effectiveUser);
- if (NULL == pwd)
- /*
- * Andres Kroonmaa <andre@online.ee>:
- * Some getpwnam() implementations (Solaris?) require
- * an available FD < 256 for opening a FILE* to the
- * passwd file.
- * DW:
- * This should be safe at startup, but might still fail
- * during reconfigure.
- */
- fatalf("getpwnam failed to find userid for effective user '%s'",
- Config.effectiveUser,
- xstrerror());
- Config2.effectiveUserID = pwd->pw_uid;
+ struct passwd *pwd = getpwnam(Config.effectiveUser);
+ if (NULL == pwd)
+ /*
+ * Andres Kroonmaa <andre@online.ee>:
+ * Some getpwnam() implementations (Solaris?) require
+ * an available FD < 256 for opening a FILE* to the
+ * passwd file.
+ * DW:
+ * This should be safe at startup, but might still fail
+ * during reconfigure.
+ */
+ fatalf("getpwnam failed to find userid for effective user '%s'",
+ Config.effectiveUser,
+ xstrerror());
+ Config2.effectiveUserID = pwd->pw_uid;
Config2.effectiveGroupID = pwd->pw_gid;
- }
+ }
} else {
Config2.effectiveUserID = geteuid();
Config2.effectiveGroupID = getegid();
return s == NULL;
}
-void
+static void
allocate_new_authScheme(authConfig * cfg)
{
if (cfg->schemes == NULL) {
swap->n_configured = 0;
}
-const char *
+static const char *
peer_type_str(const peer_t type)
{
switch (type) {
unsigned char *token = strtok(NULL, null_string);
safe_free(*var);
if (token == NULL)
- self_destruct();
- while(*token && isspace(*token))
- token++;
+ self_destruct();
+ while (*token && isspace(*token))
+ token++;
if (!*token)
self_destruct();
*var = xstrdup(token);
/*
- * $Id: client_side.cc,v 1.523 2001/01/12 00:37:15 wessels Exp $
+ * $Id: client_side.cc,v 1.524 2001/02/07 18:56:52 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
return 1;
}
-void
+static void
clientUpdateCounters(clientHttpRequest * http)
{
int svc_time = tvSubMsec(http->start, current_time);
/* A dummy handler that throws away a request-body */
static char bodyAbortBuf[SQUID_TCP_SO_RCVBUF];
-void
+static void
clientReadBodyAbortHandler(char *buf, size_t size, void *data)
{
ConnStateData *conn = (ConnStateData *) data;
/*
- * $Id: debug.cc,v 1.80 2001/01/12 00:37:16 wessels Exp $
+ * $Id: debug.cc,v 1.81 2001/02/07 18:56:52 hno Exp $
*
* DEBUG: section 0 Debug Routines
* AUTHOR: Harvest Derived
static char *debug_log_file = NULL;
static int Ctx_Lock = 0;
static const char *debugLogTime(time_t);
-static void ctx_print();
+static void ctx_print(void);
#if STDC_HEADERS
void
/*
- * $Id: store_dir_aufs.cc,v 1.28 2001/01/12 00:37:32 wessels Exp $
+ * $Id: store_dir_aufs.cc,v 1.29 2001/02/07 18:56:53 hno Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
static void storeAufsDirInitBitmap(SwapDir *);
static int storeAufsDirValidFileno(SwapDir *, sfileno, int);
+/* The MAIN externally visible function */
+STSETUP storeFsSetup_aufs;
+
/*
* These functions were ripped straight out of the heart of store_dir.c.
* They assume that the given filenum is on a asyncufs partiton, which may or
* XXX this evilness should be tidied up at a later date!
*/
-int
+static int
storeAufsDirMapBitTest(SwapDir * SD, int fn)
{
sfileno filn = fn;
return file_map_bit_test(aioinfo->map, filn);
}
-void
+static void
storeAufsDirMapBitSet(SwapDir * SD, int fn)
{
sfileno filn = fn;
*
* This routine is called when the given swapdir needs reconfiguring
*/
-void
+static void
storeAufsDirReconfigure(SwapDir * sd, int index, char *path)
{
char *token;
* storeAufsDirParse *
* Called when a *new* fs is being setup.
*/
-void
+static void
storeAufsDirParse(SwapDir * sd, int index, char *path)
{
char *token;
/*
* Initial setup / end destruction
*/
-void
+static void
storeAufsDirDone(void)
{
aioDone();
/*
- * $Id: store_dir_coss.cc,v 1.17 2001/01/12 00:37:32 wessels Exp $
+ * $Id: store_dir_coss.cc,v 1.18 2001/02/07 18:56:54 hno Exp $
*
* DEBUG: section 81 Store COSS Directory Routines
* AUTHOR: Eric Stern
static STFSRECONFIGURE storeCossDirReconfigure;
static STDUMP storeCossDirDump;
+/* The "only" externally visible function */
+STSETUP storeFsSetup_coss;
+
static char *
storeCossDirSwapLogFile(SwapDir * sd, const char *ext)
{
/* ========== LOCAL FUNCTIONS ABOVE, GLOBAL FUNCTIONS BELOW ========== */
-void
+static void
storeCossDirStats(SwapDir * SD, StoreEntry * sentry)
{
CossInfo *cs = (CossInfo *) SD->fsdata;
/*
- * $Id: diskd.cc,v 1.9 2001/01/12 00:37:33 wessels Exp $
+ * $Id: diskd.cc,v 1.10 2001/02/07 18:56:54 hno Exp $
*
* DEBUG: section -- External DISKD process implementation.
* AUTHOR: Harvest Derived
}
}
-int
+static int
fsCmp(const void *a, const void *b)
{
const int *A = a;
return *A != *B;
}
-unsigned int
+static unsigned int
fsHash(const void *key, unsigned int n)
{
/* note, n must be a power of 2! */
/*
- * $Id: store_dir_diskd.cc,v 1.38 2001/01/23 17:27:21 wessels Exp $
+ * $Id: store_dir_diskd.cc,v 1.39 2001/02/07 18:56:54 hno Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
static void storeDiskdStats(StoreEntry * sentry);
static void storeDiskdDirSync(SwapDir *);
+/* The only externally visible interface */
+STSETUP storeFsSetup_diskd;
/*
* These functions were ripped straight out of the heart of store_dir.c.
* XXX this evilness should be tidied up at a later date!
*/
-int
+static int
storeDiskdDirMapBitTest(SwapDir * SD, int fn)
{
sfileno filn = fn;
return file_map_bit_test(diskdinfo->map, filn);
}
-void
+static void
storeDiskdDirMapBitSet(SwapDir * SD, int fn)
{
sfileno filn = fn;
*
* This routine is called when the given swapdir needs reconfiguring
*/
-void
+static void
storeDiskdDirReconfigure(SwapDir * sd, int index, char *path)
{
char *token;
*
* Called when a *new* fs is being setup.
*/
-void
+static void
storeDiskdDirParse(SwapDir * sd, int index, char *path)
{
char *token;
/*
* Initial setup / end destruction
*/
-void
+static void
storeDiskdDirDone(void)
{
memPoolDestroy(diskd_state_pool);
/*
- * $Id: store_dir_ufs.cc,v 1.27 2001/01/12 00:37:34 wessels Exp $
+ * $Id: store_dir_ufs.cc,v 1.28 2001/02/07 18:56:55 hno Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
static void storeUfsDirInitBitmap(SwapDir *);
static int storeUfsDirValidFileno(SwapDir *, sfileno, int);
+STSETUP storeFsSetup_ufs;
+
/*
* These functions were ripped straight out of the heart of store_dir.c.
* They assume that the given filenum is on a ufs partiton, which may or
* XXX this evilness should be tidied up at a later date!
*/
-int
+static int
storeUfsDirMapBitTest(SwapDir * SD, int fn)
{
sfileno filn = fn;
return file_map_bit_test(ufsinfo->map, filn);
}
-void
+static void
storeUfsDirMapBitSet(SwapDir * SD, int fn)
{
sfileno filn = fn;
*
* This routine is called when the given swapdir needs reconfiguring
*/
-void
+static void
storeUfsDirReconfigure(SwapDir * sd, int index, char *path)
{
char *token;
*
* Called when a *new* fs is being setup.
*/
-void
+static void
storeUfsDirParse(SwapDir * sd, int index, char *path)
{
char *token;
/*
* Initial setup / end destruction
*/
-void
+static void
storeUfsDirDone(void)
{
memPoolDestroy(ufs_state_pool);
/*
- * $Id: peer_digest.cc,v 1.77 2001/01/12 00:37:20 wessels Exp $
+ * $Id: peer_digest.cc,v 1.78 2001/02/07 18:56:52 hno Exp $
*
* DEBUG: section 72 Peer Digest Routines
* AUTHOR: Alex Rousskov
}
/* call Clean and free/unlock everything */
-void
+static void
peerDigestDestroy(PeerDigest * pd)
{
peer *p;
/*
- * $Id: peer_select.cc,v 1.112 2001/01/12 00:37:20 wessels Exp $
+ * $Id: peer_select.cc,v 1.113 2001/02/07 18:56:52 hno Exp $
*
* DEBUG: section 44 Peer Selection Algorithm
* AUTHOR: Duane Wessels
cbdataFree(psstate);
}
-int
+static int
peerSelectIcpPing(request_t * request, int direct, StoreEntry * entry)
{
int n;
/*
- * $Id: protos.h,v 1.396 2001/01/12 00:37:20 wessels Exp $
+ * $Id: protos.h,v 1.397 2001/02/07 18:56:52 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#endif
extern void commUpdateReadBits(int, PF *);
extern void commUpdateWriteBits(int, PF *);
-extern void comm_quick_poll_required();
+extern void comm_quick_poll_required(void);
extern void packerToStoreInit(Packer * p, StoreEntry * e);
extern void packerToMemInit(Packer * p, MemBuf * mb);
extern FREE authenticateFreeProxyAuthUser;
extern void authenticateFreeProxyAuthUserACLResults(void *data);
extern void authenticateProxyUserCacheCleanup(void *);
-extern void authenticateInitUserCache();
-extern int authenticateActiveSchemeCount();
-extern int authenticateSchemeCount();
+extern void authenticateInitUserCache(void);
+extern int authenticateActiveSchemeCount(void);
+extern int authenticateSchemeCount(void);
extern void authenticateUserNameCacheAdd(auth_user_t * auth_user);
extern int authenticateCheckAuthUserIP(struct in_addr request_src_addr, auth_user_request_t * auth_user);
extern int authenticateUserAuthenticated(auth_user_request_t *);
-extern void authenticateUserCacheRestart();
+extern void authenticateUserCacheRestart(void);
extern char *authenticateUserUsername(auth_user_t *);
extern char *authenticateUserRequestUsername(auth_user_request_t *);
extern int authenticateValidateUser(auth_user_request_t *);
extern int urlDefaultPort(protocol_t p);
extern char *urlCanonicalClean(const request_t *);
extern char *urlHostname(const char *url);
-extern void urlExtMethodConfigure();
+extern void urlExtMethodConfigure(void);
extern void useragentOpenLog(void);
extern void useragentRotateLog(void);
extern void dlinkAddTail(void *data, dlink_node *, dlink_list *);
extern void dlinkDelete(dlink_node * m, dlink_list * list);
extern void dlinkNodeDelete(dlink_node * m);
-extern dlink_node *dlinkNodeNew();
+extern dlink_node *dlinkNodeNew(void);
extern void kb_incr(kb_t *, size_t);
extern double gb_to_double(const gb_t *);
#if URL_CHECKSUM_DEBUG
extern unsigned int url_checksum(const char *url);
#endif
+
+/*
+ * hack to allow snmp access to the statistics counters
+ */
+extern StatCounters *snmpStatGet(int);
/*
- * $Id: store_heap_replacement.cc,v 1.5 2001/01/12 00:37:35 wessels Exp $
+ * $Id: store_heap_replacement.cc,v 1.6 2001/02/07 18:56:56 hno Exp $
*
* DEBUG: section 20 Storage Manager Heap-based replacement
* AUTHOR: John Dilley
#include "squid.h"
#include "heap.h"
+#include "store_heap_replacement.h"
/*
* Key generation function to implement the LFU-DA policy (Least
/*
- * $Id: store_repl_heap.cc,v 1.4 2001/01/12 00:37:35 wessels Exp $
+ * $Id: store_repl_heap.cc,v 1.5 2001/02/07 18:56:56 hno Exp $
*
* DEBUG: section ? HEAP based removal policies
* AUTHOR: Henrik Nordstrom
int current;
};
-const StoreEntry *
+static const StoreEntry *
heap_walkNext(RemovalPolicyWalker * walker)
{
HeapWalkData *heap_walk = walker->_data;
/*
- * $Id: store_repl_lru.cc,v 1.6 2001/01/12 00:37:36 wessels Exp $
+ * $Id: store_repl_lru.cc,v 1.7 2001/02/07 18:56:56 hno Exp $
*
* DEBUG: section ? LRU Removal policy
* AUTHOR: Henrik Nordstrom
LruNode *current;
};
-const StoreEntry *
+static const StoreEntry *
lru_walkNext(RemovalPolicyWalker * walker)
{
LruWalkData *lru_walk = walker->_data;
/*
- * $Id: snmp_agent.cc,v 1.79 2001/01/24 22:38:25 wessels Exp $
+ * $Id: snmp_agent.cc,v 1.80 2001/02/07 18:56:52 hno Exp $
*
* DEBUG: section 49 SNMP Interface
* AUTHOR: Kostas Anagnostakis
#include "squid.h"
#include "cache_snmp.h"
-extern StatCounters *snmpStatGet(int);
-
/************************************************************************
SQUID MIB Implementation
break;
case PERF_SYS_MEMUSAGE:
Answer = snmp_var_new_integer(Var->name, Var->name_length,
- (snint) memTotalAllocated() >> 10,
+ (snint) statMemoryAccounted() >> 10,
ASN_INTEGER);
break;
case PERF_SYS_CPUTIME:
/*
- * $Id: stat.cc,v 1.343 2001/01/12 00:37:21 wessels Exp $
+ * $Id: stat.cc,v 1.344 2001/02/07 18:56:52 hno Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
#endif /* HAVE_MALLINFO */
storeAppendPrintf(sentry, "Memory accounted for:\n");
storeAppendPrintf(sentry, "\tTotal accounted: %6d KB\n",
- memTotalAllocated() >> 10);
+ statMemoryAccounted() >> 10);
storeAppendPrintf(sentry, "\tmemPoolAlloc calls: %d\n",
mem_pool_alloc_calls);
storeAppendPrintf(sentry, "\tmemPoolFree calls: %d\n",
/*
* SNMP wants ints, ick
*/
+#if UNUSED_CODE
int
get_median_svc(int interval, int which)
{
return (int) statMedianSvc(interval, which);
}
+#endif
+
StatCounters *
snmpStatGet(int minutes)
{
GENGRAPH(cputime, "cputime", "CPU utilisation");
}
+int
+statMemoryAccounted(void)
+{
+ memTotalAllocated();
+}
+
#endif /* STAT_GRAPHS */
/*
- * $Id: typedefs.h,v 1.121 2001/01/31 22:16:39 hno Exp $
+ * $Id: typedefs.h,v 1.122 2001/02/07 18:56:52 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef void StatHistBinDumper(StoreEntry *, int idx, double val, double size, int count);
/* authenticate.c authenticate scheme routines typedefs */
-typedef int AUTHSACTIVE();
+typedef int AUTHSACTIVE(void);
typedef int AUTHSAUTHED(auth_user_request_t *);
typedef void AUTHSAUTHUSER(auth_user_request_t *, request_t *, ConnStateData *, http_hdr_type);
-typedef int AUTHSCONFIGURED();
+typedef int AUTHSCONFIGURED(void);
typedef void AUTHSDECODE(auth_user_request_t *, const char *);
typedef int AUTHSDIRECTION(auth_user_request_t *);
typedef void AUTHSDUMP(StoreEntry *, const char *, authScheme *);