📄 structs.h
字号:
/* * $Id: structs.h,v 1.276.2.4 1999/02/19 22:35:36 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. * */struct _dlink_node { void *data; dlink_node *prev; dlink_node *next;};struct _dlink_list { dlink_node *head; dlink_node *tail;};struct _acl_ip_data { struct in_addr addr1; /* if addr2 non-zero then its a range */ struct in_addr addr2; struct in_addr mask; acl_ip_data *next; /* used for parsing, not for storing */};struct _acl_snmp_comm { char *name; void *community; acl_snmp_comm *next;};struct _acl_time_data { int weekbits; int start; int stop; acl_time_data *next;};struct _acl_name_list { char name[ACL_NAME_SZ]; acl_name_list *next;};struct _acl_proxy_auth_user { /* first two items must be same as hash_link */ char *user; acl_proxy_auth_user *next; /* extra fields for proxy_auth */ char *passwd; int passwd_ok; /* 1 = passwd checked OK */ long expiretime;};struct _acl_deny_info_list { int err_page_id; char *err_page_name; acl_name_list *acl_list; acl_deny_info_list *next;};#if USE_ARP_ACLstruct _acl_arp_data { char eth[6];};#endifstruct _String { /* never reference these directly! */ unsigned short int size; /* buffer size; 64K limit */ unsigned short int len; /* current length */ char *buf;};#if SQUID_SNMPstruct _snmp_request_t { u_char *buf; u_char *outbuf; int len; int sock; long reqid; int outlen; struct sockaddr_in from; struct snmp_pdu *PDU; aclCheck_t *acl_checklist; u_char *community;};#endifstruct _acl { char name[ACL_NAME_SZ]; squid_acl type; void *data; char *cfgline; acl *next;};struct _acl_list { int op; acl *acl; acl_list *next;};struct _acl_access { int allow; acl_list *acl_list; char *cfgline; acl_access *next;};struct _aclCheck_t { const acl_access *access_list; struct in_addr src_addr; struct in_addr dst_addr; struct in_addr my_addr; request_t *request;#if USE_IDENT ConnStateData *conn; /* hack for ident */ char ident[USER_IDENT_SZ];#endif char browser[BROWSERNAMELEN]; acl_proxy_auth_user *auth_user; acl_lookup_state state[ACL_ENUM_MAX];#if SQUID_SNMP char *snmp_community;#endif PF *callback; void *callback_data;};struct _aio_result_t { int aio_return; int aio_errno;};struct _wordlist { char *key; wordlist *next;};struct _intlist { int i; intlist *next;};struct _intrange { int i; int j; intrange *next;};struct _ushortlist { u_short i; ushortlist *next;};struct _relist { char *pattern; regex_t regex; relist *next;};#if DELAY_POOLSstruct _delaySpec { int restore_bps; int max_bytes;};/* malloc()'d only as far as used (class * sizeof(delaySpec)! * order of elements very important! */struct _delaySpecSet { delaySpec aggregate; delaySpec individual; delaySpec network;};struct _delayConfig { unsigned short pools; unsigned short initial; unsigned char *class; delaySpecSet **rates; acl_access **access;};#endifstruct _SquidConfig { struct { size_t maxSize; int highWaterMark; int lowWaterMark; } Swap; size_t memMaxSize; struct { char *relayHost; u_short relayPort; peer *peer; } Wais; struct { size_t min; int pct; size_t max; } quickAbort; time_t referenceAge; time_t negativeTtl; time_t negativeDnsTtl; time_t positiveDnsTtl; time_t shutdownLifetime; struct { time_t read; time_t lifetime; time_t connect; time_t request; time_t pconn; time_t siteSelect; time_t deadPeer; int icp_query; /* msec */ int mcast_icp_query; /* msec */#if USE_IDENT time_t ident;#endif } Timeout; size_t maxRequestSize; struct { ushortlist *http; u_short icp;#if USE_HTCP u_short htcp;#endif#if SQUID_SNMP u_short snmp;#endif } Port;#if SQUID_SNMP struct { char *configFile; char *agentInfo; u_short localPort; } Snmp;#endif char *as_whois_server; struct { char *log; char *access; char *store; char *swap; char *useragent; int rotateNumber; } Log; char *adminEmail; char *effectiveUser; char *effectiveGroup; struct { char *dnsserver; char *redirect; wordlist *authenticate; char *pinger; char *unlinkd; } Program; int dnsChildren; int redirectChildren; int authenticateChildren; int authenticateTTL; struct { char *host; u_short port; } Accel; char *appendDomain; size_t appendDomainLen; char *debugOptions; char *pidFilename; char *mimeTablePathname; char *visibleHostname; char *uniqueHostname; char *errHtmlText; struct { char *host; char *file; time_t period; u_short port; } Announce; struct { struct in_addr tcp_incoming; struct in_addr tcp_outgoing; struct in_addr udp_incoming; struct in_addr udp_outgoing;#if SQUID_SNMP struct in_addr snmp_incoming; struct in_addr snmp_outgoing;#endif struct in_addr client_netmask; } Addrs; size_t tcpRcvBufsz; size_t udpMaxHitObjsz; wordlist *hierarchy_stoplist; wordlist *mcast_group_list; wordlist *dns_testname_list; wordlist *dns_nameservers; peer *peers; int npeers; struct { int size; int low; int high; } ipcache; struct { int size; } fqdncache; int minDirectHops; cachemgr_passwd *passwd_list; struct { int objectsPerBucket; size_t avgObjectSize; size_t maxObjectSize; } Store; struct { int high; int low; time_t period; } Netdb; struct { int log_udp; int enable_purge; int res_defnames; int anonymizer; int client_db; int query_icmp; int icp_hit_stale; int buffered_logs;#if ALLOW_SOURCE_PING int source_ping;#endif int common_log; int log_mime_hdrs; int log_fqdn; int announce; int accel_with_proxy; int mem_pools; int test_reachability; int half_closed_clients;#if HTTP_VIOLATIONS int reload_into_ims;#endif int offline; int redir_rewrites_host; int persistent_client_posts; int prefer_direct; int strip_query_terms; } onoff; acl *aclList; struct { acl_access *http; acl_access *icp; acl_access *miss; acl_access *NeverDirect; acl_access *AlwaysDirect; acl_access *ASlists; acl_access *noCache;#if SQUID_SNMP acl_access *snmp;#endif acl_access *brokenPosts;#if USE_IDENT acl_access *identLookup;#endif } accessList; acl_deny_info_list *denyInfoList; char *proxyAuthRealm; struct { size_t list_width; int list_wrap; char *anon_user; } Ftp; refresh_t *Refresh; struct _cacheSwap { SwapDir *swapDirs; int n_allocated; int n_configured; } cacheSwap; char *fake_ua; struct { char *directory; } icons; char *errorDirectory; struct { time_t timeout; int maxtries; } retry; struct { size_t limit; } MemPools;#if DELAY_POOLS delayConfig Delay;#endif struct { int icp_average; int http_average; int icp_min_poll; int http_min_poll; } comm_incoming; int max_open_disk_fds; int uri_whitespace; size_t rangeOffsetLimit;#if MULTICAST_MISS_STREAM struct { struct in_addr addr; unsigned short port; char *encode_key; } mcast_miss;#endif HttpHeaderMask anonymize_headers; char *coredump_dir;};struct _SquidConfig2 { struct { char *prefix; int on; } Accel;};struct _close_handler { PF *handler; void *data; close_handler *next;};struct _dread_ctrl { int fd; off_t offset; int req_len; char *buf; int end_of_file; DRCB *handler; void *client_data;};struct _dnsserver_t { int id; int inpipe; int outpipe; time_t answer; off_t offset; size_t size; char ip_inbuf[DNS_INBUF_SZ]; struct timeval dispatch_time; void *data;};struct _dnsStatData { int requests; int replies; int hist[DefaultDnsChildrenMax];};struct _dwrite_q { off_t file_offset; char *buf; int len; off_t buf_offset; dwrite_q *next; FREE *free_func;};/* ETag support is rudimantal; * this struct is likely to change * Note: "str" points to memory in HttpHeaderEntry (for now) * so ETags should be used as tmp variables only (for now) */struct _ETag { const char *str; /* quoted-string */ int weak; /* true if it is a weak validator */};struct _fde { unsigned int type; u_short local_port; u_short remote_port; char ipaddr[16]; /* dotted decimal address of peer */ char desc[FD_DESC_SZ]; struct { unsigned int open:1; unsigned int close_request:1; unsigned int write_daemon:1; unsigned int closing:1; unsigned int socket_eof:1; unsigned int nolinger:1; unsigned int nonblocking:1; unsigned int ipc:1; unsigned int called_connect:1;#ifdef OPTIMISTIC_IO unsigned int calling_io_handler:1;#endif } flags; int bytes_read; int bytes_written; int uses; /* ie # req's over persistent conn */ struct _fde_disk { DWCB *wrt_handle; void *wrt_handle_data; dwrite_q *write_q; dwrite_q *write_q_tail; off_t offset; } disk; PF *read_handler; void *read_data; PF *write_handler; void *write_data; PF *timeout_handler; time_t timeout; void *timeout_data; void *lifetime_data; close_handler *close_handler; /* linked list */ DEFER *defer_check; /* check if we should defer read */ void *defer_data; CommWriteStateData *rwstate; /* State data for comm_write */};struct _fileMap { int max_n_files; int n_files_in_map; int toggle; int nwords; unsigned long *file_map;};/* auto-growing memory-resident buffer with printf interface *//* note: when updating this struct, update MemBufNULL #define */struct _MemBuf {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -