#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.158 1998/08/17 22:04:52 wessels Exp $
+# $Id: Makefile.in,v 1.159 1998/08/17 23:00:36 wessels Exp $
#
# Uncomment and customize the following to suit your needs:
#
UNLINKD_EXE = unlinkd$(exec_suffix)
PINGER_EXE = pinger$(exec_suffix)
CACHEMGR_EXE = cachemgr$(cgi_suffix)
-NCSA_AUTH_EXE = ncsa_auth$(exec_suffix)
DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
DEFAULT_ICON_DIR = $(sysconfdir)/icons
DEFAULT_ERROR_DIR = $(sysconfdir)/errors
DEFAULT_MIB_PATH = $(sysconfdir)/mib.txt
-DEFAULT_AUTH_PROGRAM = $(bindir)/$(NCSA_AUTH_EXE)
DEFAULT_PASSWD_FILE = $(sysconfdir)/passwd
CC = @CC@
AUTH_LIBS = -L../lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS)
PROGS = $(SQUID_EXE) $(CLIENT_EXE)
-UTILS = $(DNSSERVER_EXE) $(UNLINKD_EXE) $(NCSA_AUTH_EXE)
+UTILS = $(DNSSERVER_EXE) $(UNLINKD_EXE)
SUID_UTILS = $(PINGER_EXE)
CGIPROGS = $(CACHEMGR_EXE)
OBJS = \
ftp.o \
globals.o \
gopher.o \
- hash.o \
@HTCP_OBJS@ \
http.o \
http-anon.o \
$(UNLINKD_EXE): unlinkd-daemon.o
$(CC) $(LDFLAGS) unlinkd-daemon.o -o $@
-$(NCSA_AUTH_EXE): ncsa_auth.o hash.o debug.o globals.o
- $(CC) $(LDFLAGS) ncsa_auth.o hash.o debug.o globals.o -o $@ $(AUTH_LIBS)
-
unlinkd-daemon.o: unlinkd.c
$(CC) -c $(CFLAGS) -DUNLINK_DAEMON $(srcdir)/unlinkd.c -o $@
-cache_diff: cache_diff.o debug.o globals.o hash.o store_key_md5.o
- $(CC) -o $@ $(LDFLAGS) $@.o debug.o globals.o hash.o store_key_md5.o $(STD_APP_LIBS)
+cache_diff: cache_diff.o debug.o globals.o store_key_md5.o
+ $(CC) -o $@ $(LDFLAGS) $@.o debug.o globals.o store_key_md5.o $(STD_APP_LIBS)
-test_cache_digest: test_cache_digest.o CacheDigest.o debug.o globals.o hash.o store_key_md5.o
- $(CC) -o $@ $(LDFLAGS) $@.o CacheDigest.o debug.o globals.o hash.o store_key_md5.o $(STD_APP_LIBS)
+test_cache_digest: test_cache_digest.o CacheDigest.o debug.o globals.o store_key_md5.o
+ $(CC) -o $@ $(LDFLAGS) $@.o CacheDigest.o debug.o globals.o store_key_md5.o $(STD_APP_LIBS)
cache_cf.o: cf_parser.c
/*
- * $Id: defines.h,v 1.63 1998/08/17 22:04:57 wessels Exp $
+ * $Id: defines.h,v 1.64 1998/08/17 23:00:37 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
#define FQDN_LOOKUP_IF_MISS 0x01
#define FQDN_MAX_NAMES 5
-/*
- * Here are some good prime number choices. It's important not to
- * choose a prime number that is too close to exact powers of 2.
- *
- * HASH_SIZE 103 // prime number < 128
- * HASH_SIZE 229 // prime number < 256
- * HASH_SIZE 467 // prime number < 512
- * HASH_SIZE 977 // prime number < 1024
- * HASH_SIZE 1979 // prime number < 2048
- * HASH_SIZE 4019 // prime number < 4096
- * HASH_SIZE 6037 // prime number < 6144
- * HASH_SIZE 7951 // prime number < 8192
- * HASH_SIZE 12149 // prime number < 12288
- * HASH_SIZE 16231 // prime number < 16384
- * HASH_SIZE 33493 // prime number < 32768
- * HASH_SIZE 65357 // prime number < 65536
- */
-
-#define DEFAULT_HASH_SIZE 7951 /* prime number < 8192 */
-
#define HTTP_REPLY_FIELD_SZ 128
#define BUF_TYPE_8K 1
/*
- * $Id: protos.h,v 1.249 1998/08/17 22:05:01 wessels Exp $
+ * $Id: protos.h,v 1.250 1998/08/17 23:00:39 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
extern void whoisStart(FwdState *, int fd);
-extern hash_table *hash_create(HASHCMP *, int, HASHHASH *);
-extern void hash_join(hash_table *, hash_link *);
-extern void hash_remove_link(hash_table *, hash_link *);
-extern int hashPrime(int n);
-extern void *hash_lookup(hash_table *, const void *);
-extern void hash_first(hash_table *);
-extern void *hash_next(hash_table *);
-extern hash_link *hash_get_bucket(hash_table *, unsigned int);
-extern void hashFreeMemory(hash_table *);
-extern void hashFreeItems(hash_table *, FREE *);
-extern HASHHASH hash_string;
-extern HASHHASH hash_url;
-extern HASHHASH hash4;
-
extern int httpCachable(method_t);
extern void httpStart(FwdState *, int fd);
extern void httpParseReplyHeaders(const char *, http_reply *);
/*
- * $Id: squid.h,v 1.176 1998/08/13 17:38:18 wessels Exp $
+ * $Id: squid.h,v 1.177 1998/08/17 23:00:41 wessels Exp $
*
* AUTHOR: Duane Wessels
*
#include "cache_snmp.h"
#endif
+#include "hash.h"
+
#include "defines.h"
#include "enums.h"
#include "typedefs.h"
/*
- * $Id: structs.h,v 1.201 1998/08/17 22:05:02 wessels Exp $
+ * $Id: structs.h,v 1.202 1998/08/17 23:00:42 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
struct {
char *dnsserver;
char *redirect;
- char *authenticate;
- wordlist *authenticate_options;
+ wordlist *authenticate;
char *pinger;
char *unlinkd;
} Program;
unsigned long *file_map;
};
-struct _hash_link {
- char *key;
- hash_link *next;
-};
-
-struct _hash_table {
- hash_link **buckets;
- HASHCMP *cmp;
- HASHHASH *hash;
- unsigned int size;
- unsigned int current_slot;
- hash_link *next;
- int count;
-};
-
/* auto-growing memory-resident buffer with printf interface */
/* note: when updating this struct, update MemBufNULL #define */
struct _MemBuf {
/*
- * $Id: typedefs.h,v 1.68 1998/08/17 16:44:13 wessels Exp $
+ * $Id: typedefs.h,v 1.69 1998/08/17 23:00:43 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
typedef struct _fileMap fileMap;
typedef struct _fqdncache_entry fqdncache_entry;
typedef struct _fqdn_pending fqdn_pending;
-typedef struct _hash_link hash_link;
-typedef struct _hash_table hash_table;
typedef struct _HttpReply http_reply;
typedef struct _HttpStatusLine HttpStatusLine;
typedef struct _HttpHeaderFieldAttrs HttpHeaderFieldAttrs;
typedef void DRCB(int fd, const char *buf, int size, int errflag, void *data);
typedef void DWCB(int, int, size_t, void *);
typedef void FQDNH(const char *, void *);
-typedef int HASHCMP(const void *, const void *);
-typedef unsigned int HASHHASH(const void *, unsigned int);
typedef void IDCB(void *);
typedef void IPH(const ipcache_addrs *, void *);
typedef void IRCB(peer *, peer_t, icp_common_t *, void *data);