#ifndef _TEMPNAM_H
#define _TEMPNAM_H
-extern char *tempnam(const char *, const char *);
+extern char *tempnam __P((const char *, const char *));
#endif /* _TEMPNAM_H */
/*
- * $Id: util.h,v 1.14 1996/09/14 16:54:48 wessels Exp $
+ * $Id: util.h,v 1.15 1996/09/15 05:04:08 wessels Exp $
*
* AUTHOR: Harvest Derived
*
#endif
#if !HAVE_STRDUP
-extern char *strdup(char *);
+extern char *strdup __P((char *));
#endif
extern char *xstrdup(char *); /* Duplicate a string */
void debug_flag(char *);
char *mkhttpdlogtime(time_t *);
-extern char *mkrfc850(time_t);
-extern time_t parse_rfc850(char *str);
-extern void init_log3(char *pn, FILE * a, FILE * b);
-extern void debug_init();
-extern void log_errno2(char *, int, char *);
+extern char *mkrfc850 __P((time_t));
+extern time_t parse_rfc850 __P((char *str));
+extern void init_log3 __P((char *pn, FILE * a, FILE * b));
+extern void debug_init __P((void));
+extern void log_errno2 __P((char *, int, char *));
#if defined(__STRICT_ANSI__)
-extern void Log(char *,...);
-extern void errorlog(char *,...);
+extern void Log __P((char *,...));
+extern void errorlog __P((char *,...));
#else
-extern void Log();
-extern void errorlog();
+extern void Log __P((void));
+extern void errorlog __P((void));
#endif /* __STRICT_ANSI__ */
-extern void Tolower(char *);
+extern void Tolower __P((char *));
-extern char *uudecode(char *);
+extern char *uudecode __P((char *));
#endif /* ndef _UTIL_H_ */
/*
- * $Id: acl.cc,v 1.35 1996/09/14 16:05:39 wessels Exp $
+ * $Id: acl.cc,v 1.36 1996/09/15 05:04:11 wessels Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
static struct _acl *AclList = NULL;
static struct _acl **AclListTail = &AclList;
-static void aclDestroyAclList(struct _acl_list *list);
-static void aclDestroyIpList(struct _acl_ip_data *data);
-static void aclDestroyRegexList(struct _relist *data);
-static void aclDestroyTimeList(struct _acl_time_data *data);
-static int aclMatchDomainList(wordlist *, char *);
-static int aclMatchAclList(struct _acl_list *, aclCheck_t *);
-static int aclMatchInteger(intlist * data, int i);
-static int aclMatchIp(struct _acl_ip_data *data, struct in_addr c);
-static int aclMatchRegex(relist * data, char *word);
-static int aclMatchTime(struct _acl_time_data *data, time_t when);
-static intlist *aclParseIntlist(void);
-static struct _acl_ip_data *aclParseIpList(void);
-static intlist *aclParseMethodList(void);
-static intlist *aclParseProtoList(void);
-static struct _relist *aclParseRegexList(void);
-static struct _acl_time_data *aclParseTimeSpec(void);
-static wordlist *aclParseWordList(void);
-static wordlist *aclParseDomainList(void);
-static squid_acl aclType(char *s);
-static int decode_addr(char *, struct in_addr *, struct in_addr *);
+static void aclDestroyAclList __P((struct _acl_list *list));
+static void aclDestroyIpList __P((struct _acl_ip_data *data));
+static void aclDestroyRegexList __P((struct _relist *data));
+static void aclDestroyTimeList __P((struct _acl_time_data *data));
+static int aclMatchDomainList __P((wordlist *, char *));
+static int aclMatchAclList __P((struct _acl_list *, aclCheck_t *));
+static int aclMatchInteger __P((intlist * data, int i));
+static int aclMatchIp __P((struct _acl_ip_data *data, struct in_addr c));
+static int aclMatchRegex __P((relist * data, char *word));
+static int aclMatchTime __P((struct _acl_time_data *data, time_t when));
+static intlist *aclParseIntlist __P((void));
+static struct _acl_ip_data *aclParseIpList __P((void));
+static intlist *aclParseMethodList __P((void));
+static intlist *aclParseProtoList __P((void));
+static struct _relist *aclParseRegexList __P((void));
+static struct _acl_time_data *aclParseTimeSpec __P((void));
+static wordlist *aclParseWordList __P((void));
+static wordlist *aclParseDomainList __P((void));
+static squid_acl aclType __P((char *s));
+static int decode_addr __P((char *, struct in_addr *, struct in_addr *));
static squid_acl
aclType(char *s)
/*
- * $Id: cache_cf.cc,v 1.87 1996/09/14 08:45:37 wessels Exp $
+ * $Id: cache_cf.cc,v 1.88 1996/09/15 05:04:13 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
char config_input_line[BUFSIZ];
int config_lineno = 0;
-static char *safe_xstrdup(char *p);
-static void parseOnOff(int *);
-static void parseIntegerValue(int *);
+static char *safe_xstrdup __P((char *p));
+static void parseOnOff __P((int *));
+static void parseIntegerValue __P((int *));
static char fatal_str[BUFSIZ];
-static void configDoConfigure(void);
-static void configFreeMemory(void);
-static void configSetFactoryDefaults(void);
-static void parseAccessLogLine(void);
-static void parseAddressLine(struct in_addr *);
-static void parseAnnounceToLine(void);
-static void parseAppendDomainLine(void);
-static void parseCacheAnnounceLine(void);
-static void parseCacheHostLine(void);
-static void parseDebugOptionsLine(void);
-static void parseDirLine(void);
-static void parseDnsProgramLine(void);
-static void parseDnsTestnameLine(void);
-static void parseEffectiveUserLine(void);
-static void parseErrHtmlLine(void);
-static void parseFtpLine(void);
-static void parseFtpOptionsLine(void);
-static void parseFtpProgramLine(void);
-static void parseFtpUserLine(void);
-static void parseGopherLine(void);
-static void parseHierarchyStoplistLine(void);
-static void parseHostAclLine(void);
-static void parseHostDomainLine(void);
-static void parseHotVmFactorLine(void);
-static void parseHttpLine(void);
-static void parseHttpPortLine(void);
-static void parseHttpdAccelLine(void);
-static void parseIPLine(ip_acl ** list);
-static void parseIcpPortLine(void);
-static void parseInsideFirewallLine(void);
-static void parseLocalDomainFile(char *fname);
-static void parseLocalDomainLine(void);
-static void parseLogLine(void);
-static void parseMemLine(void);
-static void parseMgrLine(void);
-static void parsePidFilenameLine(void);
-static void parseRequestSizeLine(void);
-static void parseStoreLogLine(void);
-static void parseSwapLine(void);
-static void parseTTLPattern(int icase, int force);
-static void parseVisibleHostnameLine(void);
-static void parseWAISRelayLine(void);
-static void parseMinutesLine(int *);
+static void configDoConfigure __P((void));
+static void configFreeMemory __P((void));
+static void configSetFactoryDefaults __P((void));
+static void parseAccessLogLine __P((void));
+static void parseAddressLine __P((struct in_addr *));
+static void parseAnnounceToLine __P((void));
+static void parseAppendDomainLine __P((void));
+static void parseCacheAnnounceLine __P((void));
+static void parseCacheHostLine __P((void));
+static void parseDebugOptionsLine __P((void));
+static void parseDirLine __P((void));
+static void parseDnsProgramLine __P((void));
+static void parseDnsTestnameLine __P((void));
+static void parseEffectiveUserLine __P((void));
+static void parseErrHtmlLine __P((void));
+static void parseFtpLine __P((void));
+static void parseFtpOptionsLine __P((void));
+static void parseFtpProgramLine __P((void));
+static void parseFtpUserLine __P((void));
+static void parseGopherLine __P((void));
+static void parseHierarchyStoplistLine __P((void));
+static void parseHostAclLine __P((void));
+static void parseHostDomainLine __P((void));
+static void parseHotVmFactorLine __P((void));
+static void parseHttpLine __P((void));
+static void parseHttpPortLine __P((void));
+static void parseHttpdAccelLine __P((void));
+static void parseIPLine __P((ip_acl ** list));
+static void parseIcpPortLine __P((void));
+static void parseInsideFirewallLine __P((void));
+static void parseLocalDomainFile __P((char *fname));
+static void parseLocalDomainLine __P((void));
+static void parseLogLine __P((void));
+static void parseMemLine __P((void));
+static void parseMgrLine __P((void));
+static void parsePidFilenameLine __P((void));
+static void parseRequestSizeLine __P((void));
+static void parseStoreLogLine __P((void));
+static void parseSwapLine __P((void));
+static void parseTTLPattern __P((int icase, int force));
+static void parseVisibleHostnameLine __P((void));
+static void parseWAISRelayLine __P((void));
+static void parseMinutesLine __P((int *));
void
self_destruct()
/*
- * $Id: cachemgr.cc,v 1.21 1996/09/14 16:54:49 wessels Exp $
+ * $Id: cachemgr.cc,v 1.22 1996/09/15 05:04:14 wessels Exp $
*
* DEBUG: Section 0 CGI Cache Manager
* AUTHOR: Harvest Derived
char *script_name = "/cgi-bin/cachemgr.cgi";
char *progname = NULL;
-static int client_comm_connect(int sock, char *dest_host, u_short dest_port);
+static int client_comm_connect __P((int sock, char *dest_host, u_short dest_port));
void
print_trailer(void)
/*
- * $Id: client.cc,v 1.9 1996/09/14 08:45:41 wessels Exp $
+ * $Id: client.cc,v 1.10 1996/09/15 05:04:15 wessels Exp $
*
* DEBUG: section 0 WWW Client
* AUTHOR: Harvest Derived
#endif
/* Local functions */
-static int client_comm_connect(int sock, char *dest_host, u_short dest_port);
-static void usage(char *progname);
+static int client_comm_connect __P((int sock, char *dest_host, u_short dest_port));
+static void usage __P((char *progname));
static void
usage(char *progname)
/*
- * $Id: client_side.cc,v 1.25 1996/09/14 16:54:50 wessels Exp $
+ * $Id: client_side.cc,v 1.26 1996/09/15 05:04:15 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
#include "squid.h"
-static void clientRedirectDone(void *data, char *result);
-static int icpHandleIMSReply(int fd, StoreEntry * entry, void *data);
+static void clientRedirectDone __P((void *data, char *result));
+static int icpHandleIMSReply __P((int fd, StoreEntry * entry, void *data));
static int
/*
- * $Id: comm.cc,v 1.68 1996/09/14 16:54:51 wessels Exp $
+ * $Id: comm.cc,v 1.69 1996/09/15 05:04:17 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
FD_ENTRY *fd_table = NULL; /* also used in disk.c */
/* STATIC */
-static void checkTimeouts(void);
-static void checkLifetimes(void);
-static void Reserve_More_FDs(void);
-static void commSetReuseAddr(int);
-static int examine_select(fd_set *, fd_set *, fd_set *);
-static void commSetNoLinger(int);
-static void comm_select_incoming(void);
-static int commBind(int s, struct in_addr, u_short port);
-static void RWStateCallbackAndFree(int fd, int code);
+static void checkTimeouts __P((void));
+static void checkLifetimes __P((void));
+static void Reserve_More_FDs __P((void));
+static void commSetReuseAddr __P((int));
+static int examine_select __P((fd_set *, fd_set *, fd_set *));
+static void commSetNoLinger __P((int));
+static void comm_select_incoming __P((void));
+static int commBind __P((int s, struct in_addr, u_short port));
+static void RWStateCallbackAndFree __P((int fd, int code));
#ifdef TCP_NODELAY
-static void commSetTcpNoDelay(int);
+static void commSetTcpNoDelay __P((int));
#endif
-static void commSetTcpRcvbuf(int, int);
+static void commSetTcpRcvbuf __P((int, int));
static int *fd_lifetime = NULL;
static struct timeval zero_tv;
/*
- * $Id: dns.cc,v 1.7 1996/09/14 08:45:48 wessels Exp $
+ * $Id: dns.cc,v 1.8 1996/09/15 05:04:20 wessels Exp $
*
* DEBUG: section 34 Dnsserver interface
* AUTHOR: Harvest Derived
void *data;
};
-static int dnsOpenServer(char *command);
+static int dnsOpenServer __P((char *command));
static dnsserver_t **dns_child_table = NULL;
static int NDnsServersAlloc = 0;
/*
- * $Id: filemap.cc,v 1.9 1996/09/14 08:45:56 wessels Exp $
+ * $Id: filemap.cc,v 1.10 1996/09/15 05:04:23 wessels Exp $
*
* DEBUG: section 8 Swap File Bitmap
* AUTHOR: Harvest Derived
#define ALL_ONES (unsigned long) 0xFFFFFFFF
#endif
-extern int storeGetSwapSpace(int);
-extern void fatal_dump(char *);
+extern int storeGetSwapSpace __P((int));
+extern void fatal_dump __P((char *));
static fileMap *fm = NULL;
/*
- * $Id: fqdncache.cc,v 1.17 1996/09/14 08:45:58 wessels Exp $
+ * $Id: fqdncache.cc,v 1.18 1996/09/15 05:04:25 wessels Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
int ghba_calls; /* # calls to blocking gethostbyaddr() */
} FqdncacheStats;
-static int fqdncache_compareLastRef(fqdncache_entry **, fqdncache_entry **);
-static int fqdncache_dnsHandleRead(int, dnsserver_t *);
-static fqdncache_entry *fqdncache_parsebuffer(char *buf, dnsserver_t *);
-static int fqdncache_purgelru(void);
-static void fqdncache_release(fqdncache_entry *);
-static fqdncache_entry *fqdncache_GetFirst(void);
-static fqdncache_entry *fqdncache_GetNext(void);
-static fqdncache_entry *fqdncache_create(void);
-static void fqdncache_add_to_hash(fqdncache_entry *);
-static void fqdncache_call_pending(fqdncache_entry *);
-static void fqdncache_call_pending_badname(int fd, FQDNH handler, void *);
-static void fqdncache_add(char *, fqdncache_entry *, struct hostent *, int);
-static int fqdncacheHasPending(fqdncache_entry *);
-static fqdncache_entry *fqdncache_get(char *);
-static void dummy_handler(int, char *, void *);
-static int fqdncacheExpiredEntry(fqdncache_entry *);
-static void fqdncacheAddPending(fqdncache_entry *, int fd, FQDNH, void *);
-static void fqdncacheEnqueue(fqdncache_entry *);
-static void *fqdncacheDequeue(void);
-static void fqdncache_dnsDispatch(dnsserver_t *, fqdncache_entry *);
+static int fqdncache_compareLastRef __P((fqdncache_entry **, fqdncache_entry **));
+static int fqdncache_dnsHandleRead __P((int, dnsserver_t *));
+static fqdncache_entry *fqdncache_parsebuffer __P((char *buf, dnsserver_t *));
+static int fqdncache_purgelru __P((void));
+static void fqdncache_release __P((fqdncache_entry *));
+static fqdncache_entry *fqdncache_GetFirst __P((void));
+static fqdncache_entry *fqdncache_GetNext __P((void));
+static fqdncache_entry *fqdncache_create __P((void));
+static void fqdncache_add_to_hash __P((fqdncache_entry *));
+static void fqdncache_call_pending __P((fqdncache_entry *));
+static void fqdncache_call_pending_badname __P((int fd, FQDNH handler, void *));
+static void fqdncache_add __P((char *, fqdncache_entry *, struct hostent *, int));
+static int fqdncacheHasPending __P((fqdncache_entry *));
+static fqdncache_entry *fqdncache_get __P((char *));
+static void dummy_handler __P((int, char *, void *));
+static int fqdncacheExpiredEntry __P((fqdncache_entry *));
+static void fqdncacheAddPending __P((fqdncache_entry *, int fd, FQDNH, void *));
+static void fqdncacheEnqueue __P((fqdncache_entry *));
+static void *fqdncacheDequeue __P((void));
+static void fqdncache_dnsDispatch __P((dnsserver_t *, fqdncache_entry *));
static struct hostent *static_result = NULL;
static HashID fqdn_table = 0;
/*
- * $Id: ftp.cc,v 1.55 1996/09/14 08:45:59 wessels Exp $
+ * $Id: ftp.cc,v 1.56 1996/09/15 05:04:26 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
} FtpData;
/* Local functions */
-static int ftpStateFree(int fd, FtpData * ftpState);
-static void ftpProcessReplyHeader(FtpData * data, char *buf, int size);
-static void ftpServerClosed(int fd, void *nodata);
-static void ftp_login_parser(char *login, FtpData * data);
-static char *ftpTransferMode(char *urlpath);
+static int ftpStateFree __P((int fd, FtpData * ftpState));
+static void ftpProcessReplyHeader __P((FtpData * data, char *buf, int size));
+static void ftpServerClosed __P((int fd, void *nodata));
+static void ftp_login_parser __P((char *login, FtpData * data));
+static char *ftpTransferMode __P((char *urlpath));
/* Global functions not declared in ftp.h */
void ftpLifetimeExpire(int fd, FtpData * data);
void ftpServerClose(void);
/* External functions */
-extern char *base64_decode(char *coded);
+extern char *base64_decode __P((char *coded));
static int
ftpStateFree(int fd, FtpData * ftpState)
/*
- * $Id: gopher.cc,v 1.45 1996/09/14 16:54:53 wessels Exp $
+ * $Id: gopher.cc,v 1.46 1996/09/15 05:04:28 wessels Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
char *buf; /* pts to a 4k page */
} GopherStateData;
-static int gopherStateFree(int fd, GopherStateData *);
-static void gopher_mime_content(char *buf, char *name, char *def);
-static void gopherMimeCreate(GopherStateData *);
+static int gopherStateFree __P((int fd, GopherStateData *));
+static void gopher_mime_content __P((char *buf, char *name, char *def));
+static void gopherMimeCreate __P((GopherStateData *));
static int gopher_url_parser(char *url,
char *host,
int *port,
char *type_id,
char *request);
-static void gopherEndHTML(GopherStateData *);
-static void gopherToHTML(GopherStateData *, char *inbuf, int len);
-static int gopherReadReplyTimeout(int fd, GopherStateData *);
-static void gopherLifetimeExpire(int fd, GopherStateData *);
-static void gopherReadReply(int fd, GopherStateData *);
+static void gopherEndHTML __P((GopherStateData *));
+static void gopherToHTML __P((GopherStateData *, char *inbuf, int len));
+static int gopherReadReplyTimeout __P((int fd, GopherStateData *));
+static void gopherLifetimeExpire __P((int fd, GopherStateData *));
+static void gopherReadReply __P((int fd, GopherStateData *));
static void gopherSendComplete(int fd,
char *buf,
int size,
int errflag,
void *data);
-static void gopherSendRequest(int fd, GopherStateData *);
-static GopherStateData *CreateGopherStateData(void);
+static void gopherSendRequest __P((int fd, GopherStateData *));
+static GopherStateData *CreateGopherStateData __P((void));
static char def_gopher_bin[] = "www/unknown";
static char def_gopher_text[] = "text/plain";
/*
- * $Id: http.cc,v 1.74 1996/09/14 08:46:05 wessels Exp $
+ * $Id: http.cc,v 1.75 1996/09/15 05:04:31 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
int ctype;
} ReplyHeaderStats;
-static int httpStateFree(int fd, HttpStateData *);
-static void httpReadReplyTimeout(int fd, HttpStateData *);
-static void httpLifetimeExpire(int fd, HttpStateData *);
-static void httpMakePublic(StoreEntry *);
-static void httpMakePrivate(StoreEntry *);
-static void httpCacheNegatively(StoreEntry *);
-static void httpReadReply(int fd, HttpStateData *);
-static void httpSendComplete(int fd, char *, int, int, void *);
-static void httpSendRequest(int fd, HttpStateData *);
-static void httpConnInProgress(int fd, HttpStateData *);
-static int httpConnect(int fd, struct hostent *, void *);
+static int httpStateFree __P((int fd, HttpStateData *));
+static void httpReadReplyTimeout __P((int fd, HttpStateData *));
+static void httpLifetimeExpire __P((int fd, HttpStateData *));
+static void httpMakePublic __P((StoreEntry *));
+static void httpMakePrivate __P((StoreEntry *));
+static void httpCacheNegatively __P((StoreEntry *));
+static void httpReadReply __P((int fd, HttpStateData *));
+static void httpSendComplete __P((int fd, char *, int, int, void *));
+static void httpSendRequest __P((int fd, HttpStateData *));
+static void httpConnInProgress __P((int fd, HttpStateData *));
+static int httpConnect __P((int fd, struct hostent *, void *));
static int
httpStateFree(int fd, HttpStateData * httpState)
/*
- * $Id: ident.cc,v 1.11 1996/09/14 08:46:09 wessels Exp $
+ * $Id: ident.cc,v 1.12 1996/09/15 05:04:34 wessels Exp $
*
* DEBUG: section 30 Ident (RFC 931)
* AUTHOR: Duane Wessels
#define IDENT_PORT 113
-static void identRequestComplete(int, char *, int, int, void *);
-static void identReadReply(int, icpStateData *);
-static void identClose(int, icpStateData *);
+static void identRequestComplete __P((int, char *, int, int, void *));
+static void identReadReply __P((int, icpStateData *));
+static void identClose __P((int, icpStateData *));
static void
identClose(int fd, icpStateData * icpState)
/*
- * $Id: ipcache.cc,v 1.56 1996/09/14 08:46:10 wessels Exp $
+ * $Id: ipcache.cc,v 1.57 1996/09/15 05:04:34 wessels Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
int ghbn_calls; /* # calls to blocking gethostbyname() */
} IpcacheStats;
-static int ipcache_testname(void);
-static int ipcache_compareLastRef(ipcache_entry **, ipcache_entry **);
-static int ipcache_reverseLastRef(ipcache_entry **, ipcache_entry **);
-static int ipcache_dnsHandleRead(int, dnsserver_t *);
-static ipcache_entry *ipcache_parsebuffer(char *buf, dnsserver_t *);
-static void ipcache_release(ipcache_entry *);
-static ipcache_entry *ipcache_GetFirst(void);
-static ipcache_entry *ipcache_GetNext(void);
-static ipcache_entry *ipcache_create(void);
-static void ipcache_add_to_hash(ipcache_entry *);
-static void ipcache_call_pending(ipcache_entry *);
-static void ipcache_add(char *, ipcache_entry *, struct hostent *, int);
-static int ipcacheHasPending(ipcache_entry *);
-static ipcache_entry *ipcache_get(char *);
-static int dummy_handler(int, struct hostent *hp, void *);
-static int ipcacheExpiredEntry(ipcache_entry *);
-static void ipcacheAddPending(ipcache_entry *, int fd, IPH, void *);
-static void ipcacheEnqueue(ipcache_entry *);
-static void *ipcacheDequeue(void);
-static void ipcache_dnsDispatch(dnsserver_t *, ipcache_entry *);
-static struct hostent *ipcacheCheckNumeric(char *name);
-static void ipcacheStatPrint(ipcache_entry *, StoreEntry *);
-static void ipcacheUnlockEntry(ipcache_entry *);
-static void ipcacheLockEntry(ipcache_entry *);
+static int ipcache_testname __P((void));
+static int ipcache_compareLastRef __P((ipcache_entry **, ipcache_entry **));
+static int ipcache_reverseLastRef __P((ipcache_entry **, ipcache_entry **));
+static int ipcache_dnsHandleRead __P((int, dnsserver_t *));
+static ipcache_entry *ipcache_parsebuffer __P((char *buf, dnsserver_t *));
+static void ipcache_release __P((ipcache_entry *));
+static ipcache_entry *ipcache_GetFirst __P((void));
+static ipcache_entry *ipcache_GetNext __P((void));
+static ipcache_entry *ipcache_create __P((void));
+static void ipcache_add_to_hash __P((ipcache_entry *));
+static void ipcache_call_pending __P((ipcache_entry *));
+static void ipcache_add __P((char *, ipcache_entry *, struct hostent *, int));
+static int ipcacheHasPending __P((ipcache_entry *));
+static ipcache_entry *ipcache_get __P((char *));
+static int dummy_handler __P((int, struct hostent *hp, void *));
+static int ipcacheExpiredEntry __P((ipcache_entry *));
+static void ipcacheAddPending __P((ipcache_entry *, int fd, IPH, void *));
+static void ipcacheEnqueue __P((ipcache_entry *));
+static void *ipcacheDequeue __P((void));
+static void ipcache_dnsDispatch __P((dnsserver_t *, ipcache_entry *));
+static struct hostent *ipcacheCheckNumeric __P((char *name));
+static void ipcacheStatPrint __P((ipcache_entry *, StoreEntry *));
+static void ipcacheUnlockEntry __P((ipcache_entry *));
+static void ipcacheLockEntry __P((ipcache_entry *));
static struct hostent *static_result = NULL;
static HashID ip_table = 0;
/*
- * $Id: main.cc,v 1.73 1996/09/14 08:46:12 wessels Exp $
+ * $Id: main.cc,v 1.74 1996/09/15 05:04:36 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
char *dash_str = "-";
/* for error reporting from xmalloc and friends */
-extern void (*failure_notify) (char *);
+extern void (*failure_notify) __P((char *));
static int rotate_pending = 0; /* set by SIGUSR1 handler */
static int httpPortNumOverride = 1;
static time_t next_announce;
static time_t next_ip_purge;
-static void rotate_logs(int);
-static void reconfigure(int);
-static void mainInitialize(void);
-static void mainReinitialize(void);
-static time_t mainMaintenance(void);
-static void usage(void);
-static void mainParseOptions(int, char **);
-static void sendSignal(void);
+static void rotate_logs __P((int));
+static void reconfigure __P((int));
+static void mainInitialize __P((void));
+static void mainReinitialize __P((void));
+static time_t mainMaintenance __P((void));
+static void usage __P((void));
+static void mainParseOptions __P((int, char **));
+static void sendSignal __P((void));
static void
usage()
/*
- * $Id: neighbors.cc,v 1.51 1996/09/14 08:46:15 wessels Exp $
+ * $Id: neighbors.cc,v 1.52 1996/09/15 05:04:37 wessels Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
#include "squid.h"
-static int edgeWouldBePinged(edge *, request_t *);
-static void neighborRemove(edge *);
-static edge *whichEdge(icp_common_t *, struct sockaddr_in *);
+static int edgeWouldBePinged __P((edge *, request_t *));
+static void neighborRemove __P((edge *));
+static edge *whichEdge __P((icp_common_t *, struct sockaddr_in *));
static neighbors *friends = NULL;
static struct neighbor_cf *Neighbor_cf = NULL;
/*
- * $Id: recv-announce.cc,v 1.7 1996/09/14 08:46:20 wessels Exp $
+ * $Id: recv-announce.cc,v 1.8 1996/09/15 05:04:40 wessels Exp $
*
* DEBUG: section 0 Announement Server
* AUTHOR: Harvest Derived
#define RECV_BUF_SIZE 8192
-extern void xmemcpy(void *from, void *to, int len);
+extern void xmemcpy __P((void *from, void *to, int len));
/*
* This program must be run from inetd. First add something like this
/*
- * $Id: redirect.cc,v 1.14 1996/09/14 08:46:21 wessels Exp $
+ * $Id: redirect.cc,v 1.15 1996/09/15 05:04:40 wessels Exp $
*
* DEBUG: section 29 Redirector
* AUTHOR: Duane Wessels
redirectStateData *redirectState;
};
-static redirector_t *GetFirstAvailable(void);
-static int redirectCreateRedirector(char *command);
-static int redirectHandleRead(int, redirector_t *);
-static redirectStateData *Dequeue();
-static void Enqueue(redirectStateData *);
-static void redirectDispatch(redirector_t *, redirectStateData *);
+static redirector_t *GetFirstAvailable __P((void));
+static int redirectCreateRedirector __P((char *command));
+static int redirectHandleRead __P((int, redirector_t *));
+static redirectStateData *Dequeue __P((void));
+static void Enqueue __P((redirectStateData *));
+static void redirectDispatch __P((redirector_t *, redirectStateData *));
static redirector_t **redirect_child_table = NULL;
/*
- * $Id: squid.h,v 1.46 1996/09/14 16:05:48 wessels Exp $
+ * $Id: squid.h,v 1.47 1996/09/15 05:04:41 wessels Exp $
*
* AUTHOR: Duane Wessels
*
#include "tempnam.h"
#endif
-extern void serverConnectionsClose(void);
-extern void shut_down(int);
+extern void serverConnectionsClose __P((void));
+extern void shut_down __P((int));
extern time_t squid_starttime; /* main.c */
#define CONNECT_PORT 443
-extern int objcacheStart(int, char *, StoreEntry *);
-extern void send_announce(void);
-extern int sslStart(int fd, char *, request_t *, char *, int *sz);
-extern char *storeToString(StoreEntry *);
-extern void ttlSet(StoreEntry *);
-extern void ttlFreeList(void);
-extern void ttlAddToList(char *, int, int, time_t, int, time_t);
-extern void ttlAddToForceList(char *, time_t, time_t);
-extern int waisStart(int, char *, method_t, char *, StoreEntry *);
-extern void storeDirClean(void);
+extern int objcacheStart __P((int, char *, StoreEntry *));
+extern void send_announce __P((void));
+extern int sslStart __P((int fd, char *, request_t *, char *, int *sz));
+extern char *storeToString __P((StoreEntry *));
+extern void ttlSet __P((StoreEntry *));
+extern void ttlFreeList __P((void));
+extern void ttlAddToList __P((char *, int, int, time_t, int, time_t));
+extern void ttlAddToForceList __P((char *, time_t, time_t));
+extern int waisStart __P((int, char *, method_t, char *, StoreEntry *));
+extern void storeDirClean __P((void));
extern char *dash_str;
/*
- * $Id: ssl.cc,v 1.14 1996/09/14 08:46:24 wessels Exp $
+ * $Id: ssl.cc,v 1.15 1996/09/15 05:04:42 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
static char conn_established[] = "HTTP/1.0 200 Connection established\r\n\r\n";
-static void sslLifetimeExpire(int fd, SslStateData * sslState);
-static void sslReadTimeout(int fd, SslStateData * sslState);
-static void sslReadServer(int fd, SslStateData * sslState);
-static void sslReadClient(int fd, SslStateData * sslState);
-static void sslWriteServer(int fd, SslStateData * sslState);
-static void sslWriteClient(int fd, SslStateData * sslState);
-static void sslConnected(int fd, SslStateData * sslState);
-static void sslProxyConnected(int fd, SslStateData * sslState);
-static int sslConnect(int fd, struct hostent *, SslStateData *);
-static void sslConnInProgress(int fd, SslStateData * sslState);
-static void sslErrorComplete(int, char *, int, int, void *);
-static void sslClose(SslStateData * sslState);
-static int sslClientClosed(int fd, SslStateData * sslState);
+static void sslLifetimeExpire __P((int fd, SslStateData * sslState));
+static void sslReadTimeout __P((int fd, SslStateData * sslState));
+static void sslReadServer __P((int fd, SslStateData * sslState));
+static void sslReadClient __P((int fd, SslStateData * sslState));
+static void sslWriteServer __P((int fd, SslStateData * sslState));
+static void sslWriteClient __P((int fd, SslStateData * sslState));
+static void sslConnected __P((int fd, SslStateData * sslState));
+static void sslProxyConnected __P((int fd, SslStateData * sslState));
+static int sslConnect __P((int fd, struct hostent *, SslStateData *));
+static void sslConnInProgress __P((int fd, SslStateData * sslState));
+static void sslErrorComplete __P((int, char *, int, int, void *));
+static void sslClose __P((SslStateData * sslState));
+static int sslClientClosed __P((int fd, SslStateData * sslState));
static void
sslClose(SslStateData * sslState)
/*
- * $Id: stat.cc,v 1.67 1996/09/14 08:46:26 wessels Exp $
+ * $Id: stat.cc,v 1.68 1996/09/15 05:04:43 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
char *open_bracket = "{\n";
char *close_bracket = "}\n";
-static void dummyhandler(cacheinfo *, StoreEntry *);
-static void info_get(cacheinfo *, StoreEntry *);
-static void info_get_mallstat(int, int, StoreEntry *);
-static void logReadEndHandler(int, int, log_read_data_t *);
-static void log_clear(cacheinfo *, StoreEntry *);
-static void log_disable(cacheinfo *, StoreEntry *);
-static void log_enable(cacheinfo *, StoreEntry *);
-static void log_get_start(cacheinfo *, StoreEntry *);
-static void log_status_get(cacheinfo *, StoreEntry *);
-static void parameter_get(cacheinfo *, StoreEntry *);
-static void proto_count(cacheinfo *, protocol_t, log_type);
-static void proto_newobj(cacheinfo *, protocol_t, int, int);
-static void proto_purgeobj(cacheinfo *, protocol_t, int);
-static void proto_touchobj(cacheinfo *, protocol_t, int);
-static void server_list(cacheinfo *, StoreEntry *);
-static void squidReadEndHandler(int, int, squid_read_data_t *);
-static void squid_get_start(cacheinfo *, StoreEntry *);
-static void statFiledescriptors(StoreEntry *);
-static void stat_get(cacheinfo *, char *req, StoreEntry *);
-static void stat_io_get(StoreEntry *);
-static void stat_obj(cacheinfo *, StoreEntry *, int vm_or_not);
-static void stat_utilization_get(cacheinfo *, StoreEntry *, char *desc);
-static int cache_size_get(cacheinfo *);
-static int logReadHandler(int, char *, int, log_read_data_t *);
-static int squidReadHandler(int, char *, int, squid_read_data_t *);
-static int memoryAccounted(void);
-static int mallinfoTotal(void);
+static void dummyhandler __P((cacheinfo *, StoreEntry *));
+static void info_get __P((cacheinfo *, StoreEntry *));
+static void info_get_mallstat __P((int, int, StoreEntry *));
+static void logReadEndHandler __P((int, int, log_read_data_t *));
+static void log_clear __P((cacheinfo *, StoreEntry *));
+static void log_disable __P((cacheinfo *, StoreEntry *));
+static void log_enable __P((cacheinfo *, StoreEntry *));
+static void log_get_start __P((cacheinfo *, StoreEntry *));
+static void log_status_get __P((cacheinfo *, StoreEntry *));
+static void parameter_get __P((cacheinfo *, StoreEntry *));
+static void proto_count __P((cacheinfo *, protocol_t, log_type));
+static void proto_newobj __P((cacheinfo *, protocol_t, int, int));
+static void proto_purgeobj __P((cacheinfo *, protocol_t, int));
+static void proto_touchobj __P((cacheinfo *, protocol_t, int));
+static void server_list __P((cacheinfo *, StoreEntry *));
+static void squidReadEndHandler __P((int, int, squid_read_data_t *));
+static void squid_get_start __P((cacheinfo *, StoreEntry *));
+static void statFiledescriptors __P((StoreEntry *));
+static void stat_get __P((cacheinfo *, char *req, StoreEntry *));
+static void stat_io_get __P((StoreEntry *));
+static void stat_obj __P((cacheinfo *, StoreEntry *, int vm_or_not));
+static void stat_utilization_get __P((cacheinfo *, StoreEntry *, char *desc));
+static int cache_size_get __P((cacheinfo *));
+static int logReadHandler __P((int, char *, int, log_read_data_t *));
+static int squidReadHandler __P((int, char *, int, squid_read_data_t *));
+static int memoryAccounted __P((void));
+static int mallinfoTotal __P((void));
/* process utilization information */
static void
/*
- * $Id: stmem.cc,v 1.21 1996/09/14 16:05:49 wessels Exp $
+ * $Id: stmem.cc,v 1.22 1996/09/15 05:04:44 wessels Exp $
*
* DEBUG: section 19 Memory Primitives
* AUTHOR: Harvest Derived
#define USE_MEMALIGN 0
#endif
-static void *get_free_thing(stmem_stats * thing);
-static void put_free_thing(stmem_stats * thing, void *p);
+static void *get_free_thing __P((stmem_stats * thing));
+static void put_free_thing __P((stmem_stats * thing, void *p));
void
/*
- * $Id: store.cc,v 1.109 1996/09/14 08:46:30 wessels Exp $
+ * $Id: store.cc,v 1.110 1996/09/15 05:04:46 wessels Exp $
*
* DEBUG: section 20 Storeage Manager
* AUTHOR: Harvest Derived
int store_rebuilding = STORE_REBUILDING_SLOW;
/* Static Functions */
-static int storeSwapInStart(StoreEntry *, SIH, void *);
-static void destroy_MemObject(MemObject *);
-static void destroy_MemObjectData(MemObject *);
-static void destroy_StoreEntry(StoreEntry *);
-static MemObject *new_MemObject(void);
-static mem_ptr new_MemObjectData(void);
-static StoreEntry *new_StoreEntry(int mem_obj_flag);
-static int storeCheckPurgeMem(StoreEntry * e);
-static int storeCheckExpired(StoreEntry * e);
-static void storeSwapLog(StoreEntry *);
-static int storeHashDelete(StoreEntry *);
-static char *storeDescribeStatus(StoreEntry *);
-static int compareLastRef(StoreEntry ** e1, StoreEntry ** e2);
-static int compareSize(StoreEntry ** e1, StoreEntry ** e2);
-static int storeClientListSearch(MemObject *, int fd);
-static void storeHashMemInsert(StoreEntry *);
-static void storeHashMemDelete(StoreEntry *);
-static int storeCopy(StoreEntry *, int, int, char *, int *);
+static int storeSwapInStart __P((StoreEntry *, SIH, void *));
+static void destroy_MemObject __P((MemObject *));
+static void destroy_MemObjectData __P((MemObject *));
+static void destroy_StoreEntry __P((StoreEntry *));
+static MemObject *new_MemObject __P((void));
+static mem_ptr new_MemObjectData __P((void));
+static StoreEntry *new_StoreEntry __P((int mem_obj_flag));
+static int storeCheckPurgeMem __P((StoreEntry * e));
+static int storeCheckExpired __P((StoreEntry * e));
+static void storeSwapLog __P((StoreEntry *));
+static int storeHashDelete __P((StoreEntry *));
+static char *storeDescribeStatus __P((StoreEntry *));
+static int compareLastRef __P((StoreEntry ** e1, StoreEntry ** e2));
+static int compareSize __P((StoreEntry ** e1, StoreEntry ** e2));
+static int storeClientListSearch __P((MemObject *, int fd));
+static void storeHashMemInsert __P((StoreEntry *));
+static void storeHashMemDelete __P((StoreEntry *));
+static int storeCopy __P((StoreEntry *, int, int, char *, int *));
/* Now, this table is inaccessible to outsider. They have to use a method
* to access a value in internal storage data structure. */
/*
- * $Id: tunnel.cc,v 1.14 1996/09/14 08:46:24 wessels Exp $
+ * $Id: tunnel.cc,v 1.15 1996/09/15 05:04:42 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
static char conn_established[] = "HTTP/1.0 200 Connection established\r\n\r\n";
-static void sslLifetimeExpire(int fd, SslStateData * sslState);
-static void sslReadTimeout(int fd, SslStateData * sslState);
-static void sslReadServer(int fd, SslStateData * sslState);
-static void sslReadClient(int fd, SslStateData * sslState);
-static void sslWriteServer(int fd, SslStateData * sslState);
-static void sslWriteClient(int fd, SslStateData * sslState);
-static void sslConnected(int fd, SslStateData * sslState);
-static void sslProxyConnected(int fd, SslStateData * sslState);
-static int sslConnect(int fd, struct hostent *, SslStateData *);
-static void sslConnInProgress(int fd, SslStateData * sslState);
-static void sslErrorComplete(int, char *, int, int, void *);
-static void sslClose(SslStateData * sslState);
-static int sslClientClosed(int fd, SslStateData * sslState);
+static void sslLifetimeExpire __P((int fd, SslStateData * sslState));
+static void sslReadTimeout __P((int fd, SslStateData * sslState));
+static void sslReadServer __P((int fd, SslStateData * sslState));
+static void sslReadClient __P((int fd, SslStateData * sslState));
+static void sslWriteServer __P((int fd, SslStateData * sslState));
+static void sslWriteClient __P((int fd, SslStateData * sslState));
+static void sslConnected __P((int fd, SslStateData * sslState));
+static void sslProxyConnected __P((int fd, SslStateData * sslState));
+static int sslConnect __P((int fd, struct hostent *, SslStateData *));
+static void sslConnInProgress __P((int fd, SslStateData * sslState));
+static void sslErrorComplete __P((int, char *, int, int, void *));
+static void sslClose __P((SslStateData * sslState));
+static int sslClientClosed __P((int fd, SslStateData * sslState));
static void
sslClose(SslStateData * sslState)
/*
- * $Id: wais.cc,v 1.40 1996/09/14 08:46:38 wessels Exp $
+ * $Id: wais.cc,v 1.41 1996/09/15 05:04:49 wessels Exp $
*
* DEBUG: section 24 WAIS Relay
* AUTHOR: Harvest Derived
char request[MAX_URL + 1];
} WaisStateData;
-static int waisStateFree(int, WaisStateData *);
-static void waisReadReplyTimeout(int, WaisStateData *);
-static void waisLifetimeExpire(int, WaisStateData *);
-static void waisReadReply(int, WaisStateData *);
-static void waisSendComplete(int, char *, int, int, void *);
-static void waisSendRequest(int, WaisStateData *);
-static void waisConnInProgress(int, WaisStateData *);
-static int waisConnect(int, struct hostent *, WaisStateData *);
+static int waisStateFree __P((int, WaisStateData *));
+static void waisReadReplyTimeout __P((int, WaisStateData *));
+static void waisLifetimeExpire __P((int, WaisStateData *));
+static void waisReadReply __P((int, WaisStateData *));
+static void waisSendComplete __P((int, char *, int, int, void *));
+static void waisSendRequest __P((int, WaisStateData *));
+static void waisConnInProgress __P((int, WaisStateData *));
+static int waisConnect __P((int, struct hostent *, WaisStateData *));
static int
waisStateFree(int fd, WaisStateData * waisState)