4 struct in_addr addr1
; /* if addr2 non-zero then its a range */
12 struct _acl_time_data
{
19 struct _acl_name_list
{
20 char name
[ACL_NAME_SZ
];
24 struct _acl_proxy_auth
{
32 struct _acl_deny_info_list
{
35 acl_name_list
*acl_list
;
36 acl_deny_info_list
*next
;
40 struct _acl_arp_data
{
42 #ifndef USE_SPLAY_TREE
50 /* never reference these directly! */
51 unsigned short int size
; /* buffer size; 64K limit */
52 unsigned short int len
; /* current length */
57 struct _snmp_request_t
{
64 struct sockaddr_in from
;
66 aclCheck_t
*acl_checklist
;
70 typedef struct _viewEntry
{
76 struct _viewEntry
*next
;
79 typedef struct _communityEntry
{
83 struct _acl_access
*acls
;
84 struct _communityEntry
*next
;
87 typedef struct _usecEntry
{
97 struct _usecEntry
*next
;
103 char name
[ACL_NAME_SZ
];
113 struct _acl_list
*next
;
118 struct _acl_list
*acl_list
;
120 struct _acl_access
*next
;
125 const struct _acl_access
*access_list
;
126 struct in_addr src_addr
;
127 struct in_addr dst_addr
;
129 char ident
[ICP_IDENT_SZ
];
130 char browser
[BROWSERNAMELEN
];
131 acl_lookup_state state
[ACL_ENUM_MAX
];
136 struct _aio_result_t
{
143 struct _wordlist
*next
;
148 struct _intlist
*next
;
153 struct _ushortlist
*next
;
159 struct _relist
*next
;
162 struct _SquidConfig
{
179 time_t negativeDnsTtl
;
180 time_t positiveDnsTtl
;
181 time_t shutdownLifetime
;
182 time_t neighborTimeout
;
192 size_t maxRequestSize
;
208 char *trap_community
;
216 communityEntry
*communities
;
219 char *as_whois_server
;
230 char *effectiveGroup
;
238 int redirectChildren
;
244 size_t appendDomainLen
;
247 char *mimeTablePathname
;
248 char *visibleHostname
;
257 struct in_addr tcp_incoming
;
258 struct in_addr tcp_outgoing
;
259 struct in_addr udp_incoming
;
260 struct in_addr udp_outgoing
;
261 struct in_addr snmp_incoming
;
262 struct in_addr snmp_outgoing
;
263 struct in_addr client_netmask
;
266 size_t udpMaxHitObjsz
;
267 wordlist
*cache_stoplist
;
268 wordlist
*hierarchy_stoplist
;
269 wordlist
*mcast_group_list
;
270 wordlist
*dns_testname_list
;
271 wordlist
*dns_nameservers
;
272 relist
*cache_stop_relist
;
281 cachemgr_passwd
*passwd_list
;
283 int objectsPerBucket
;
284 size_t avgObjectSize
;
285 size_t maxObjectSize
;
301 #if ALLOW_SOURCE_PING
309 int accel_with_proxy
;
311 int test_reachability
;
313 struct _acl
*aclList
;
315 struct _acl_access
*http
;
316 struct _acl_access
*icp
;
317 struct _acl_access
*miss
;
318 struct _acl_access
*NeverDirect
;
319 struct _acl_access
*AlwaysDirect
;
320 struct _acl_access
*ASlists
;
322 struct _acl_deny_info_list
*denyInfoList
;
338 char *errorDirectory
;
348 struct _SquidConfig2
{
355 struct _close_handler
{
371 struct _dnsserver_t
{
379 char ip_inbuf
[DNS_INBUF_SZ
];
380 struct timeval dispatch_time
;
384 struct _dnsStatData
{
387 int hist
[DefaultDnsChildrenMax
];
395 struct _dwrite_q
*next
;
404 char ipaddr
[16]; /* dotted decimal address of peer */
405 char desc
[FD_DESC_SZ
];
409 int uses
; /* ie # req's over persistent conn */
412 void *wrt_handle_data
;
414 dwrite_q
*write_q_tail
;
425 close_handler
*close_handler
; /* linked list */
426 DEFER
*defer_check
; /* check if we should defer read */
428 CommWriteStateData
*rwstate
; /* State data for comm_write */
429 time_t connect_timeout
;
437 unsigned long *file_map
;
442 struct _hash_link
*next
;
452 unsigned int current_slot
;
453 hash_link
*current_ptr
;
456 /* http status line */
457 struct _HttpStatusLine
{
458 /* public, read only */
460 const char *reason
; /* points to a _constant_ string (default or supplied), never free()d */
465 * Note: HttpBody is used only for messages with a small text content that is
466 * known a priory (e.g., error messages).
469 /* private, never dereference these */
470 char *buf
; /* null terminating _text_ buffer, not for binary stuff */
471 FREE
*freefunc
; /* used to free() .buf */
475 /* http header extention field */
476 struct _HttpHdrExtField
{
477 String name
; /* field-name from HTTP/1.1 (no column after name) */
478 String value
; /* field-value from HTTP/1.1 */
481 /* http cache control header field */
487 /* http byte-range-spec */
488 struct _HttpHdrRangeSpec
{
493 /* There may be more than one byte range specified in the request.
494 * This object holds all range specs in order of their appearence
495 * in the request because we SHOULD preserve that order.
497 struct _HttpHdrRange
{
501 /* http content-range header field */
502 struct _HttpHdrContRange
{
503 HttpHdrRangeSpec spec
;
504 size_t elength
; /* entity length, not content length */
508 /* per field statistics */
509 struct _HttpHeaderFieldStat
{
510 int aliveCount
; /* created but not destroyed (count) */
511 int seenCount
; /* #fields we've seen */
512 int parsCount
; /* #parsing attempts */
513 int errCount
; /* #pasring errors */
514 int repCount
; /* #repetitons */
517 /* constant attributes of http header fields */
518 struct _HttpHeaderFieldAttrs
{
524 /* compiled version of HttpHeaderFieldAttrs plus stats */
525 struct _HttpHeaderFieldInfo
{
529 HttpHeaderFieldStat stat
;
532 struct _HttpHeaderEntry
{
539 /* protected, do not use these, use interface functions instead */
540 Array entries
; /* parsed fields in raw format */
541 HttpHeaderMask mask
; /* bit set <=> entry present */
545 /* unsupported, writable, may disappear/change in the future */
546 int hdr_sz
; /* sums _stored_ status-line, headers, and <CRLF> */
548 /* public, readable; never update these or their .hdr equivalents directly */
551 time_t last_modified
;
554 HttpHdrCc
*cache_control
;
555 HttpHdrContRange
*content_range
;
556 short int pconn_keep_alive
;
558 /* public, readable */
559 HttpMsgParseState pstate
; /* the current parsing state */
561 /* public, writable, but use httpReply* interfaces when possible */
562 HttpStatusLine sline
;
564 HttpBody body
; /* for small constant memory-resident text bodies only */
568 struct _HttpStateData
{
573 peer
*peer
; /* peer request made to */
574 int eof
; /* reached end-of-object? */
575 request_t
*orig_request
;
581 struct sockaddr_in address
;
586 struct timeval start
;
592 struct _icp_ping_data
{
593 struct timeval start
;
597 int n_replies_expected
;
603 struct _HierarchyLogEntry
{
605 char host
[SQUIDHOSTNAMELEN
];
609 struct _AccessLogEntry
{
614 const char *content_type
;
620 struct in_addr caddr
;
626 struct _HierarchyLogEntry hier
;
632 const char *method_str
;
636 struct _clientHttpRequest
{
638 request_t
*request
; /* Parsed URL ... */
648 StoreEntry
*old_entry
;
650 http_status http_code
;
652 int internal
; /* Set to true on /squid-internal/ request, to prevent looping */
653 struct timeval start
;
656 aclCheck_t
*acl_checklist
; /* need ptr back so we can unreg if needed */
657 clientHttpRequest
*next
;
658 struct _AccessLogEntry al
;
661 struct _ConnStateData
{
668 clientHttpRequest
*chr
;
669 struct sockaddr_in peer
;
670 struct sockaddr_in me
;
671 struct in_addr log_addr
;
674 char ident
[ICP_IDENT_SZ
];
679 CommWriteStateData
*commWriteState
;
699 struct _ipcache_addrs
{
700 struct in_addr
*in_addrs
;
701 unsigned char *bad_mask
;
704 unsigned char badcount
;
713 struct _ipcache_entry
{
714 /* first two items must be equivalent to hash_link in hash.h */
716 struct _ipcache_entry
*next
;
720 ip_pending
*pending_head
;
724 ipcache_status_t status
:3;
727 struct _fqdn_pending
{
733 struct _fqdncache_entry
{
734 /* first two items must be equivalent to hash_link in hash.h */
736 struct _fqdncache_entry
*next
;
739 unsigned char name_count
;
740 char *names
[FQDN_MAX_NAMES
+ 1];
741 fqdn_pending
*pending_head
;
745 fqdncache_status_t status
:3;
748 struct _domain_ping
{
750 int do_ping
; /* boolean */
751 struct _domain_ping
*next
;
754 struct _domain_type
{
757 struct _domain_type
*next
;
763 struct sockaddr_in in_addr
;
771 int n_keepalives_sent
;
772 int n_keepalives_recv
;
775 int logged_state
; /* so we can print dead/revived msgs */
783 struct _domain_ping
*pinglist
;
784 struct _domain_type
*typelist
;
785 struct _acl_list
*acls
;
789 double avg_n_members
;
791 int n_replies_expected
;
796 int tcp_up
; /* 0 if a connect() fails */
797 time_t last_fail_time
;
798 struct in_addr addresses
[10];
802 int ip_lookup_pending
;
803 int ck_conn_event_pend
;
807 struct _net_db_name
{
809 net_db_name
*htbl_next
;
811 netdbEntry
*net_db_entry
;
814 struct _net_db_peer
{
829 time_t next_ping_time
;
830 time_t last_use_time
;
846 peer
*first_parent_miss
;
847 peer
*closest_parent_miss
;
850 aclCheck_t
*acl_checklist
;
853 struct _pingerEchoData
{
855 unsigned char opcode
;
860 struct _pingerReplyData
{
862 unsigned char opcode
;
869 struct _icp_common_t
{
870 unsigned char opcode
; /* opcode */
871 unsigned char version
; /* version number */
872 unsigned short length
; /* total length (bytes) */
873 u_num32 reqnum
; /* req number (req'd for UDP) */
876 u_num32 shostid
; /* sender host id */
886 } Http
, Ftp
, Gopher
, Wais
;
889 /* auto-growing memory-resident buffer with printf interface */
891 /* public, read-only */
893 mb_size_t size
; /* used space, does not count 0-terminator */
895 /* private, stay away; use interface function instead */
896 mb_size_t max_capacity
; /* when grows: assert(new_capacity <= max_capacity) */
897 mb_size_t capacity
; /* allocated space */
898 FREE
*freefunc
; /* what to use to free the buffer, NULL after memBufFreeFunc() is called */
901 /* see Packer.c for description */
903 /* protected, use interface functions instead */
906 void *real_handler
; /* first parameter to real append and vprintf */
922 /* keep track each client receiving data from that particular StoreEntry */
923 struct _store_client
{
931 StoreEntry
*entry
; /* ptr to the parent StoreEntry, argh! */
933 int disk_op_in_progress
;
934 struct _store_client
*next
;
938 /* This structure can be freed while object is purged out from memory */
945 struct _store_client
*clients
;
948 off_t queue_offset
; /* relative to in-mem data */
949 off_t done_offset
; /* relative to swap file with meta headers! */
955 struct timeval start_ping
;
956 IRCB
*icp_reply_callback
;
958 int fd
; /* FD of client creating this entry */
971 /* first two items must be same as hash_link in hash.h */
972 const cache_key
*key
;
973 struct _StoreEntry
*next
;
983 int swap_file_number
;
985 u_char lock_count
; /* Assume < 256! */
986 mem_status_t mem_status
:3;
987 ping_status_t ping_status
:3;
988 store_status_t store_status
:3;
989 swap_status_t swap_status
:3;
1006 protocol_t protocol
;
1007 char login
[MAX_LOGIN_SZ
];
1008 char host
[SQUIDHOSTNAMELEN
+ 1];
1011 int link_count
; /* free when zero */
1013 HttpHdrCc
*cache_control
; /* not used yet */
1019 struct in_addr client_addr
;
1024 struct _HierarchyLogEntry hier
;
1028 struct _cachemgr_passwd
{
1031 struct _cachemgr_passwd
*next
;
1036 regex_t compiled_pattern
;
1040 struct _refresh_t
*next
;
1043 struct _CommWriteStateData
{
1052 struct _ErrorState
{
1055 http_status http_status
;
1061 char *dnsserver_msg
;
1063 struct in_addr src_addr
;
1066 void *callback_data
;
1076 * "very generic" histogram;
1077 * see important comments on hbase_f restrictions in StatHist.c
1085 hbase_f val_in
; /* e.g., log() for log-based histogram */
1086 hbase_f val_out
; /* e.g., exp() for log based histogram */
1090 * if you add a field to StatCounters,
1091 * you MUST sync statCountersInitSpecial, statCountersClean, and statCountersCopy
1093 struct _StatCounters
{
1100 kb_t hit_kbytes_out
;
1101 StatHist miss_svc_time
;
1102 StatHist nm_svc_time
;
1103 StatHist hit_svc_time
;
1104 StatHist all_svc_time
;
1112 } all
, http
, ftp
, other
;
1121 StatHist query_svc_time
;
1122 StatHist reply_svc_time
;
1133 struct timeval timestamp
;
1143 struct _storeSwapLogData
{
1145 int swap_file_number
;
1150 size_t swap_file_sz
;
1153 unsigned char key
[MD5_DIGEST_CHARS
];
1156 /* object to track per-action memory usage (e.g. #idle objects) */
1158 size_t level
; /* current level (count or volume) */
1159 size_t hwater_level
; /* high water mark */
1160 time_t hwater_stamp
; /* timestamp of last high water mark change */
1163 /* object to track per-pool memory usage (alloc = inuse+idle) */
1164 struct _MemPoolMeter
{
1171 /* a pool is a [growing] space for objects of the same size */
1175 Stack pstack
; /* stack for free pointers */
1179 struct _ClientInfo
{
1181 struct client_info
*next
;
1182 struct in_addr addr
;
1184 int result_hist
[LOG_TYPE_MAX
];