📄 protos.h
字号:
/* * $Id: protos.h,v 1.314.2.7 1999/07/07 01:52:51 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ * ---------------------------------------------------------- * * Squid is the result of efforts by numerous individuals from the * Internet community. Development is led by Duane Wessels of the * National Laboratory for Applied Network Research and funded by the * National Science Foundation. Squid is Copyrighted (C) 1998 by * Duane Wessels and the University of California San Diego. Please * see the COPYRIGHT file for full details. Squid incorporates * software developed and/or copyrighted by other sources. Please 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. * */extern void accessLogLog(AccessLogEntry *);extern void accessLogRotate(void);extern void accessLogClose(void);extern void accessLogInit(void);extern const char *accessLogTime(time_t);extern void hierarchyNote(HierarchyLogEntry *, hier_code, const char *);#if FORW_VIA_DBextern void fvdbCountVia(const char *key);extern void fvdbCountForw(const char *key);#endifextern aclCheck_t *aclChecklistCreate(const struct _acl_access *, request_t *, struct in_addr src, struct in_addr me, const char *user_agent, const char *ident);extern void aclNBCheck(aclCheck_t *, PF *, void *);extern int aclCheckFast(const struct _acl_access *A, aclCheck_t *);extern void aclChecklistFree(aclCheck_t *);extern int aclMatchAclList(const acl_list * list, aclCheck_t * checklist);extern void aclDestroyAccessList(struct _acl_access **list);extern void aclDestroyAcls(acl **);extern void aclParseAccessLine(struct _acl_access **);extern void aclParseAclLine(acl **);extern int aclIsProxyAuth(const char *name);extern int aclGetDenyInfoPage(acl_deny_info_list ** head, const char *name);extern void aclParseDenyInfoLine(struct _acl_deny_info_list **);extern void aclDestroyDenyInfoList(struct _acl_deny_info_list **);extern void aclDestroyRegexList(struct _relist *data);extern int aclMatchRegex(relist * data, const char *word);extern void aclParseRegexList(void *curlist);extern const char *aclTypeToStr(squid_acl);extern wordlist *aclDumpGeneric(const acl *);#if USE_ASYNC_IOextern int aio_cancel(aio_result_t *);extern int aio_open(const char *, int, mode_t, aio_result_t *);extern int aio_read(int, char *, int, off_t, int, aio_result_t *);extern int aio_write(int, char *, int, off_t, int, aio_result_t *);extern int aio_close(int, aio_result_t *);extern int aio_stat(const char *, struct stat *, aio_result_t *);extern int aio_unlink(const char *, aio_result_t *);extern int aio_opendir(const char *, aio_result_t *);extern aio_result_t *aio_poll_done(void);extern int aio_operations_pending(void);extern void aioCancel(int, void *);extern void aioOpen(const char *, int, mode_t, AIOCB *, void *, void *);extern void aioClose(int);extern void aioWrite(int, int offset, char *, int size, AIOCB *, void *);extern void aioRead(int, int offset, char *, int size, AIOCB *, void *);extern void aioStat(char *, struct stat *, AIOCB *, void *, void *);extern void aioUnlink(const char *, AIOCB *, void *);extern void aioCheckCallbacks(void);extern void aioSync(void);#endifextern int parseConfigFile(const char *file_name);extern void intlistDestroy(intlist **);extern int intlistFind(intlist * list, int i);extern wordlist *wordlistAdd(wordlist **, const char *);extern wordlist *wordlistDup(const wordlist *);extern void wordlistDestroy(wordlist **);extern void configFreeMemory(void);extern void wordlistCat(const wordlist *, MemBuf * mb);extern void cbdataInit(void);#if CBDATA_DEBUGextern void cbdataAddDbg(const void *p, CBDUNL *, int, const char *, int);#elseextern void cbdataAdd(const void *p, CBDUNL *, int);#endifextern void cbdataFree(void *p);extern void cbdataLock(const void *p);extern void cbdataUnlock(const void *p);extern int cbdataValid(const void *p);extern CBDUNL cbdataXfree;extern void clientdbInit(void);extern void clientdbUpdate(struct in_addr, log_type, protocol_t, size_t);extern int clientdbCutoffDenied(struct in_addr);extern void clientdbDump(StoreEntry *);extern void clientdbFreeMemory(void);extern void clientAccessCheck(void *);extern void clientAccessCheckDone(int, void *);extern int modifiedSince(StoreEntry *, request_t *);extern char *clientConstructTraceEcho(clientHttpRequest *);extern void clientPurgeRequest(clientHttpRequest *);extern int checkNegativeHit(StoreEntry *);extern void clientHttpConnectionsOpen(void);extern void clientHttpConnectionsClose(void);extern StoreEntry *clientCreateStoreEntry(clientHttpRequest *, method_t, request_flags);extern int isTcpHit(log_type);extern int commSetNonBlocking(int fd);extern void commSetCloseOnExec(int fd);extern int comm_accept(int fd, struct sockaddr_in *, struct sockaddr_in *);extern void comm_close(int fd);#if LINGERING_CLOSEextern void comm_lingering_close(int fd);#endifextern void commConnectStart(int fd, const char *, u_short, CNCB *, void *);extern int comm_connect_addr(int sock, const struct sockaddr_in *);extern void comm_init(void);extern int comm_listen(int sock);extern int comm_open(int, int, struct in_addr, u_short port, int, const char *note);extern u_short comm_local_port(int fd);extern void commSetSelect(int, unsigned int, PF *, void *, time_t);extern void comm_add_close_handler(int fd, PF *, void *);extern void comm_remove_close_handler(int fd, PF *, void *);extern int comm_udp_sendto(int, const struct sockaddr_in *, int, const void *, int);extern void comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data, FREE *);extern void comm_write_mbuf(int fd, MemBuf mb, CWCB * handler, void *handler_data);extern void commCallCloseHandlers(int fd);extern int commSetTimeout(int fd, int, PF *, void *);extern void commSetDefer(int fd, DEFER * func, void *);extern int ignoreErrno(int);extern void commCloseAllSockets(void);/* * comm_select.c */extern void comm_select_init(void);#if HAVE_POLLextern int comm_poll(int);#elseextern int comm_select(int);#endifextern void commUpdateReadBits(int, PF *);extern void commUpdateWriteBits(int, PF *);extern void packerToStoreInit(Packer * p, StoreEntry * e);extern void packerToMemInit(Packer * p, MemBuf * mb);extern void packerClean(Packer * p);extern void packerAppend(Packer * p, const char *buf, int size);#if STDC_HEADERSextern void packerPrintf(Packer * p, const char *fmt,...);#elseextern void packerPrintf();#endif/* see debug.c for info on context-based debugging */extern Ctx ctx_enter(const char *descr);extern void ctx_exit(Ctx ctx);extern void _db_init(const char *logfile, const char *options);extern void _db_rotate_log(void);#if STDC_HEADERSextern void _db_print(const char *,...);#elseextern void _db_print();#endifextern void xassert(const char *, const char *, int);/* packs, then prints an object using debug() */extern void debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm);extern int file_open(const char *path, int mode, FOCB *, void *callback_data, void *tag);extern void file_close(int fd);extern void file_write(int, off_t, void *, int len, DWCB *, void *, FREE *);extern void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);extern int file_read(int, char *, int, off_t, DRCB *, void *);extern void disk_init(void);extern int diskWriteIsComplete(int);extern void dnsShutdown(void);extern void dnsInit(void);extern void dnsSubmit(const char *lookup, HLPCB * callback, void *data);extern void eventAdd(const char *name, EVH * func, void *arg, double when, int);extern void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int);extern void eventRun(void);extern time_t eventNextTime(void);extern void eventDelete(EVH * func, void *arg);extern void eventInit(void);extern void eventFreeMemory(void);extern int eventFind(EVH *, void *);extern void fd_close(int fd);#if USE_ASYNC_IOextern void fd_was_closed(int fd);#endifextern 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 fdFreeMemory(void);extern void fdDumpOpen(void);extern int fdNFree(void);extern void fdAdjustReserved(void);extern fileMap *file_map_create(int);extern int file_map_allocate(fileMap *, int);extern int file_map_bit_set(fileMap *, int);extern int file_map_bit_test(fileMap *, int);extern void file_map_bit_reset(fileMap *, int);extern void filemapFreeMemory(fileMap *);extern void filemapCopy(fileMap * old, fileMap * new);extern void fqdncache_nbgethostbyaddr(struct in_addr, FQDNH *, void *);extern int fqdncacheUnregister(struct in_addr, void *);extern const char *fqdncache_gethostbyaddr(struct in_addr, int flags);extern void fqdncache_init(void);extern void fqdnStats(StoreEntry *);extern void fqdncacheReleaseInvalid(const char *);extern const char *fqdnFromAddr(struct in_addr);extern int fqdncacheQueueDrain(void);extern void fqdncacheFreeMemory(void);extern void fqdncache_restart(void);extern EVH fqdncache_purgelru;extern void ftpStart(FwdState *);extern char *ftpUrlWith2f(const request_t *);extern void gopherStart(FwdState *);extern int gopherCachable(const char *);extern void whoisStart(FwdState *);extern int httpCachable(method_t);extern void httpStart(FwdState *);extern void httpParseReplyHeaders(const char *, http_reply *);extern void httpProcessReplyHeader(HttpStateData *, const char *, int);extern size_t httpBuildRequestPrefix(request_t * request, request_t * orig_request, StoreEntry * entry, MemBuf * mb, int cfd, http_state_flags);extern void httpAnonInitModule();extern int httpAnonHdrAllowed(http_hdr_type hdr_id);extern int httpAnonHdrDenied(http_hdr_type hdr_id);extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, int, http_state_flags);/* ETag */extern int etagParseInit(ETag * etag, const char *str);extern int etagIsEqual(const ETag * tag1, const ETag * tag2);/* Http Status Line *//* init/clean */extern void httpStatusLineInit(HttpStatusLine * sline);extern void httpStatusLineClean(HttpStatusLine * sline);/* set/get values */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -