/* hashfunc.h */

#ifndef _h_hash
#define _h_hash


#include "getstats.h"

typedef struct requesttable {
	char *request;			/* file name path */
	long date;
	long filesize;
	int requestnum;			/* number of requests */
	int printed;			/* flag */
	char *status;			/* file found? (leaf nodes only) */
	struct requesttable *next;
} requesttable;

unsigned int hash(char *s);
void addhash(	char *nameaddress,
		char *numaddress);
char *hashlookupnumaddr(char *numaddress);
void addhashsize(long int filesize,
		char *request);
long hashlookupsize(char *request);
void addhashreq(char *request,
		long int date,
		long int filesize,
		char *status);
struct requesttable *hashlookupreq(char *request);


#endif
