3 * $Id: structs.h,v 1.446 2003/02/05 10:36:55 robertc Exp $
6 * SQUID Web Proxy Cache http://www.squid-cache.org/
7 * ----------------------------------------------------------
9 * Squid is the result of efforts by numerous individuals from
10 * the Internet community; see the CONTRIBUTORS file for full
11 * details. Many organizations have provided support for Squid's
12 * development; see the SPONSORS file for full details. Squid is
13 * Copyrighted (C) 2001 by the Regents of the University of
14 * California; see the COPYRIGHT file for full details. Squid
15 * incorporates software developed and/or copyrighted by other
16 * sources; see the CREDITS file for full details.
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
34 #ifndef SQUID_STRUCTS_H
35 #define SQUID_STRUCTS_H
52 struct _acl_cert_data
{
58 struct _acl_user_data
{
61 unsigned int case_insensitive
:1;
62 unsigned int required
:1;
66 struct _acl_user_ip_data
{
69 unsigned int strict
:1;
74 struct in_addr addr1
; /* if addr2 non-zero then its a range */
77 acl_ip_data
*next
; /* used for parsing, not for storing */
80 struct _acl_time_data
{
87 struct _acl_name_list
{
88 char name
[ACL_NAME_SZ
];
92 struct _acl_proxy_auth_match_cache
{
98 struct _acl_deny_info_list
{
101 acl_name_list
*acl_list
;
102 acl_deny_info_list
*next
;
107 struct _acl_arp_data
{
114 struct _header_mangler
{
115 acl_access
*access_list
;
121 acl_access
*access_list
;
125 struct _http_version_t
{
132 struct _snmp_request_t
{
139 struct sockaddr_in from
;
140 struct snmp_pdu
*PDU
;
141 ACLChecklist
*acl_checklist
;
148 char name
[ACL_NAME_SZ
];
169 struct _acl_address
{
208 struct _sockaddr_in_list
{
209 struct sockaddr_in s
;
210 sockaddr_in_list
*next
;
214 struct _https_port_list
{
215 https_port_list
*next
;
216 struct sockaddr_in s
;
231 #include "DelayConfig.h"
240 struct _RemovalPolicySettings
{
245 struct _SquidConfig
{
263 RemovalPolicySettings
*replPolicy
;
264 RemovalPolicySettings
*memPolicy
;
266 time_t negativeDnsTtl
;
267 time_t positiveDnsTtl
;
268 time_t shutdownLifetime
;
269 time_t backgroundPingRate
;
276 time_t persistent_request
;
280 int icp_query
; /* msec */
281 int icp_query_max
; /* msec */
282 int icp_query_min
; /* msec */
283 int mcast_icp_query
; /* msec */
288 time_t idns_retransmit
;
292 size_t maxRequestHeaderSize
;
293 size_t maxRequestBodySize
;
294 dlink_list ReplyBodySize
;
305 sockaddr_in_list
*http
;
307 https_port_list
*https
;
318 struct in_addr router
;
319 struct in_addr incoming
;
320 struct in_addr outgoing
;
324 char *as_whois_server
;
330 #if USE_USERAGENT_LOG
343 char *effectiveGroup
;
360 int redirectChildren
;
361 time_t authenticateGCInterval
;
362 time_t authenticateTTL
;
363 time_t authenticateIpTTL
;
370 size_t appendDomainLen
;
373 char *mimeTablePathname
;
375 char *visibleHostname
;
376 char *uniqueHostname
;
377 wordlist
*hostnameAliases
;
386 struct in_addr udp_incoming
;
387 struct in_addr udp_outgoing
;
389 struct in_addr snmp_incoming
;
390 struct in_addr snmp_outgoing
;
392 struct in_addr client_netmask
;
395 size_t udpMaxHitObjsz
;
396 wordlist
*hierarchy_stoplist
;
397 wordlist
*mcast_group_list
;
398 wordlist
*dns_testname_list
;
399 wordlist
*dns_nameservers
;
412 cachemgr_passwd
*passwd_list
;
414 int objectsPerBucket
;
415 size_t avgObjectSize
;
416 size_t maxObjectSize
;
417 size_t minObjectSize
;
418 size_t maxInMemObjSize
;
435 #if ALLOW_SOURCE_PING
442 int accel_with_proxy
;
444 int test_reachability
;
445 int half_closed_clients
;
450 int redir_rewrites_host
;
452 int nonhierarchical_direct
;
453 int strip_query_terms
;
454 int redirector_bypass
;
455 int ignore_unknown_nameservers
;
458 #if USE_CACHE_DIGESTS
459 int digest_generation
;
461 int log_ip_on_direct
;
463 int vary_ignore_expire
;
464 int pipeline_prefetch
;
465 int request_entities
;
475 acl_access
*NeverDirect
;
476 acl_access
*AlwaysDirect
;
482 acl_access
*brokenPosts
;
484 acl_access
*identLookup
;
486 acl_access
*redirector
;
488 acl_address
*outgoing_address
;
489 acl_tos
*outgoing_tos
;
491 acl_deny_info_list
*denyInfoList
;
492 authConfig authConfiguration
;
509 char *errorDirectory
;
528 int max_open_disk_fds
;
530 size_t rangeOffsetLimit
;
531 #if MULTICAST_MISS_STREAM
539 header_mangler header_access
[HDR_ENUM_END
];
542 #if USE_CACHE_DIGESTS
545 time_t rebuild_period
;
546 time_t rewrite_period
;
547 size_t swapout_chunk_size
;
548 int rebuild_chunk_percentage
;
553 int unclean_shutdown
;
557 wordlist
*ext_methods
;
563 char *store_dir_select_algorithm
;
564 int sleep_after_fork
; /* microseconds */
565 external_acl
*externalAclHelperList
;
581 struct _SquidConfig2
{
589 uid_t effectiveUserID
;
590 gid_t effectiveGroupID
;
593 struct _close_handler
{
609 struct _dnsserver_t
{
616 char ip_inbuf
[DNS_INBUF_SZ
];
617 struct timeval dispatch_time
;
631 /* ETag support is rudimantal;
632 * this struct is likely to change
633 * Note: "str" points to memory in HttpHeaderEntry (for now)
634 * so ETags should be used as tmp variables only (for now) */
636 const char *str
; /* quoted-string */
637 int weak
; /* true if it is a weak validator */
642 void *wrt_handle_data
;
644 dwrite_q
*write_q_tail
;
653 unsigned long *file_map
;
656 /* see Packer.c for description */
658 /* protected, use interface functions instead */
661 void *real_handler
; /* first parameter to real append and vprintf */
664 /* http status line */
665 struct _HttpStatusLine
{
666 /* public, read only */
667 http_version_t version
;
668 const char *reason
; /* points to a _constant_ string (default or supplied), never free()d */
673 * Note: HttpBody is used only for messages with a small content that is
674 * known a priory (e.g., error messages).
682 #include "SquidString.h"
683 /* http header extention field */
684 struct _HttpHdrExtField
{
685 String name
; /* field-name from HTTP/1.1 (no column after name) */
686 String value
; /* field-value from HTTP/1.1 */
689 /* http cache control header field */
697 /* some fields can hold either time or etag specs (e.g. If-Range) */
699 ETag tag
; /* entity tag */
701 int valid
; /* true if struct is usable */
704 /* per field statistics */
705 struct _HttpHeaderFieldStat
{
706 int aliveCount
; /* created but not destroyed (count) */
707 int seenCount
; /* #fields we've seen */
708 int parsCount
; /* #parsing attempts */
709 int errCount
; /* #pasring errors */
710 int repCount
; /* #repetitons */
713 /* compiled version of HttpHeaderFieldAttrs plus stats */
714 struct _HttpHeaderFieldInfo
{
718 HttpHeaderFieldStat stat
;
721 struct _HttpHeaderEntry
{
728 /* protected, do not use these, use interface functions instead */
729 Array entries
; /* parsed fields in raw format */
730 HttpHeaderMask mask
; /* bit set <=> entry present */
731 http_hdr_owner_type owner
; /* request or reply */
732 int len
; /* length when packed, not counting terminating '\0' */
735 class HttpHdrContRange
;
737 /* unsupported, writable, may disappear/change in the future */
738 int hdr_sz
; /* sums _stored_ status-line, headers, and <CRLF> */
740 /* public, readable; never update these or their .hdr equivalents directly */
743 time_t last_modified
;
746 HttpHdrCc
*cache_control
;
747 HttpHdrContRange
*content_range
;
748 short int keep_alive
;
750 /* public, readable */
751 HttpMsgParseState pstate
; /* the current parsing state */
753 /* public, writable, but use httpReply* interfaces when possible */
754 HttpStatusLine sline
;
756 HttpBody body
; /* for small constant memory-resident text bodies only */
760 struct _http_state_flags
{
761 unsigned int proxying
:1;
762 unsigned int keepalive
:1;
763 unsigned int only_if_cached
:1;
764 unsigned int headers_pushed
:1;
765 unsigned int front_end_https
:2;
769 struct timeval start
;
773 int n_replies_expected
;
774 int timeout
; /* msec */
780 struct _HierarchyLogEntry
{
782 char host
[SQUIDHOSTNAMELEN
];
784 char cd_host
[SQUIDHOSTNAMELEN
]; /* the host of selected by cd peer */
785 lookup_t cd_lookup
; /* cd prediction: none, miss, hit */
786 int n_choices
; /* #peers we selected from (cd only) */
787 int n_ichoices
; /* #peers with known rtt we selected from (cd only) */
788 struct timeval peer_select_start
;
789 struct timeval store_complete_stop
;
792 struct _AccessLogEntry
{
797 const char *content_type
;
798 http_version_t version
;
804 struct in_addr caddr
;
809 const char *authuser
;
819 const char *method_str
;
821 HierarchyLogEntry hier
;
824 struct _ConnStateData
{
829 size_t allocatedSize
;
832 size_t size_left
; /* How much body left to process */
833 request_t
*request
; /* Parameters passed to clientReadBody */
839 auth_type_t auth_type
; /* Is this connection based authentication ? if so
840 * what type it is. */
841 /* note this is ONLY connection based because NTLM is against HTTP spec */
842 /* the user details for connection based authentication */
843 auth_user_request_t
*auth_user_request
;
844 void *currentobject
; /* used by the owner of the connection. Opaque otherwise */
845 struct sockaddr_in peer
;
846 struct sockaddr_in me
;
847 struct in_addr log_addr
;
848 char rfc931
[USER_IDENT_SZ
];
855 int readMoreRequests
:1;
860 struct _ipcache_addrs
{
861 struct in_addr
*in_addrs
;
862 unsigned char *bad_mask
;
865 unsigned char badcount
;
868 struct _domain_ping
{
870 int do_ping
; /* boolean */
874 struct _domain_type
{
880 #if USE_CACHE_DIGESTS
882 short int current
; /* current version */
883 short int required
; /* minimal version that can safely handle current version */
886 /* digest control block; used for transmission and storage */
887 struct _StoreDigestCBlock
{
893 unsigned char bits_per_entry
;
894 unsigned char hash_func_count
;
895 short int reserved_short
;
896 int reserved
[32 - 6];
899 struct _DigestFetchState
{
902 StoreEntry
*old_entry
;
904 store_client
*old_sc
;
915 char buf
[SM_PAGE_SIZE
];
917 digest_read_state_t state
;
920 /* statistics for cache digests and other hit "predictors" */
921 struct _cd_guess_stats
{
922 /* public, read-only */
927 int close_hits
; /* tmp, remove it later */
931 struct _peer
*peer
; /* pointer back to peer structure, argh */
932 CacheDigest
*cd
; /* actual digest structure */
933 String host
; /* copy of peer->host */
934 const char *req_result
; /* text status of the last request */
936 unsigned int needed
:1; /* there were requests for this digest */
937 unsigned int usable
:1; /* can be used for lookups */
938 unsigned int requested
:1; /* in process of receiving [fresh] digest */
941 /* all times are absolute unless augmented with _delay */
942 time_t initialized
; /* creation */
943 time_t needed
; /* first lookup/use by a peer */
944 time_t next_check
; /* next scheduled check/refresh event */
945 time_t retry_delay
; /* delay before re-checking _invalid_ digest */
946 time_t requested
; /* requested a fresh copy of a digest */
947 time_t req_delay
; /* last request response time */
948 time_t received
; /* received the current copy of a digest */
949 time_t disabled
; /* disabled for good */
952 cd_guess_stats guess
;
966 struct sockaddr_in in_addr
;
973 int n_keepalives_sent
;
974 int n_keepalives_recv
;
978 time_t last_connect_failure
;
979 time_t last_connect_probe
;
980 int logged_state
; /* so we can print dead/revived msgs */
981 int conn_open
; /* current opened connections */
996 domain_ping
*peer_domain
;
997 domain_type
*typelist
;
1000 unsigned int proxy_only
:1;
1001 unsigned int no_query
:1;
1002 unsigned int background_ping
:1;
1003 unsigned int no_digest
:1;
1004 unsigned int default_parent
:1;
1005 unsigned int roundrobin
:1;
1006 unsigned int weighted_roundrobin
:1;
1007 unsigned int mcast_responder
:1;
1008 unsigned int closest_only
:1;
1010 unsigned int htcp
:1;
1012 unsigned int no_netdb_exchange
:1;
1014 unsigned int no_delay
:1;
1016 unsigned int allow_miss
:1;
1018 unsigned int carp
:1;
1024 double avg_n_members
;
1025 int n_times_counted
;
1026 int n_replies_expected
;
1030 unsigned int count_event_pending
:1;
1031 unsigned int counting
:1;
1034 #if USE_CACHE_DIGESTS
1038 int tcp_up
; /* 0 if a connect() fails */
1039 struct in_addr addresses
[10];
1048 double load_multiplier
;
1049 double load_factor
; /* normalized weight value */
1052 char *login
; /* Proxy authorization */
1053 time_t connect_timeout
;
1066 SSL_CTX
*sslContext
;
1068 int front_end_https
;
1071 struct _net_db_name
{
1072 hash_link hash
; /* must be first */
1074 netdbEntry
*net_db_entry
;
1077 struct _net_db_peer
{
1078 const char *peername
;
1084 struct _netdbEntry
{
1085 hash_link hash
; /* must be first */
1091 time_t next_ping_time
;
1092 time_t last_use_time
;
1107 void *callback_data
;
1110 * Why are these struct sockaddr_in instead of peer *? Because a
1111 * peer structure can become invalid during the peer selection
1112 * phase, specifically after a reconfigure. Thus we need to lookup
1113 * the peer * based on the address when we are finally ready to
1114 * reference the peer structure.
1116 struct sockaddr_in first_parent_miss
;
1117 struct sockaddr_in closest_parent_miss
;
1119 * ->hit and ->secho can be peer* because they should only be
1120 * accessed during the thread when they are set
1124 #if ALLOW_SOURCE_PING
1128 ACLChecklist
*acl_checklist
;
1132 struct _pingerEchoData
{
1134 unsigned char opcode
;
1136 char payload
[PINGER_PAYLOAD_SZ
];
1139 struct _pingerReplyData
{
1140 struct in_addr from
;
1141 unsigned char opcode
;
1145 char payload
[PINGER_PAYLOAD_SZ
];
1157 } Http
, Ftp
, Gopher
, Wais
;
1160 /* Removal policies */
1162 struct _RemovalPolicyNode
{
1166 struct _RemovalPolicy
{
1169 void (*Free
) (RemovalPolicy
* policy
);
1170 void (*Add
) (RemovalPolicy
* policy
, StoreEntry
* entry
, RemovalPolicyNode
* node
);
1171 void (*Remove
) (RemovalPolicy
* policy
, StoreEntry
* entry
, RemovalPolicyNode
* node
);
1172 void (*Referenced
) (RemovalPolicy
* policy
, const StoreEntry
* entry
, RemovalPolicyNode
* node
);
1173 void (*Dereferenced
) (RemovalPolicy
* policy
, const StoreEntry
* entry
, RemovalPolicyNode
* node
);
1174 RemovalPolicyWalker
*(*WalkInit
) (RemovalPolicy
* policy
);
1175 RemovalPurgeWalker
*(*PurgeInit
) (RemovalPolicy
* policy
, int max_scan
);
1176 void (*Stats
) (RemovalPolicy
* policy
, StoreEntry
* entry
);
1179 struct _RemovalPolicyWalker
{
1180 RemovalPolicy
*_policy
;
1182 const StoreEntry
*(*Next
) (RemovalPolicyWalker
* walker
);
1183 void (*Done
) (RemovalPolicyWalker
* walker
);
1186 struct _RemovalPurgeWalker
{
1187 RemovalPolicy
*_policy
;
1189 int scanned
, max_scan
, locked
;
1190 StoreEntry
*(*Next
) (RemovalPurgeWalker
* walker
);
1191 void (*Done
) (RemovalPurgeWalker
* walker
);
1194 /* To hard to pull this into another file just yet.
1195 * SO, we stop globals.c seeing it
1198 struct request_flags
{
1199 request_flags():range(0),nocache(0),ims(0),auth(0),cachable(0),hierarchical(0),loopdetect(0),proxy_keepalive(0),proxying(0),refresh(0),redirected(0),need_validation(0),accelerated(0),internal(0),internalclient(0),body_sent(0)
1205 unsigned int range
:1;
1206 unsigned int nocache
:1;
1208 unsigned int auth
:1;
1209 unsigned int cachable
:1;
1210 unsigned int hierarchical
:1;
1211 unsigned int loopdetect
:1;
1212 unsigned int proxy_keepalive
:1;
1213 unsigned int proxying
:1;
1214 unsigned int refresh
:1;
1215 unsigned int redirected
:1;
1216 unsigned int need_validation
:1;
1218 unsigned int nocache_hack
:1; /* for changing/ignoring no-cache requests */
1220 unsigned int accelerated
:1;
1221 unsigned int internal
:1;
1222 unsigned int internalclient
:1;
1223 unsigned int body_sent
:1;
1224 bool resetTCP() const;
1226 void clearResetTCP();
1228 unsigned int reset_tcp
:1;
1233 struct _link_list
*next
;
1239 bool multipartRangeRequest() const;
1242 protocol_t protocol
;
1243 char login
[MAX_LOGIN_SZ
];
1244 char host
[SQUIDHOSTNAMELEN
+ 1];
1245 auth_user_request_t
*auth_user_request
;
1249 int link_count
; /* free when zero */
1250 request_flags flags
;
1251 HttpHdrCc
*cache_control
;
1252 HttpHdrRange
*range
;
1253 http_version_t http_ver
;
1257 /* these in_addr's could probably be sockaddr_in's */
1258 struct in_addr client_addr
;
1259 struct in_addr my_addr
;
1260 unsigned short my_port
;
1262 ConnStateData
*body_connection
; /* used by clientReadBody() */
1264 HierarchyLogEntry hier
;
1266 char *peer_login
; /* Configured peer login:password */
1267 time_t lastmod
; /* Used on refreshes */
1268 const char *vary_headers
; /* Used when varying entities are detected. Changes how the store key is calculated */
1271 struct _cachemgr_passwd
{
1274 cachemgr_passwd
*next
;
1278 const char *pattern
;
1279 regex_t compiled_pattern
;
1285 unsigned int icase
:1;
1287 unsigned int override_expire
:1;
1288 unsigned int override_lastmod
:1;
1289 unsigned int reload_into_ims
:1;
1290 unsigned int ignore_reload
:1;
1295 struct _CommWriteStateData
{
1304 struct _ErrorState
{
1307 http_status httpStatus
;
1308 auth_user_request_t
*auth_user_request
;
1314 char *dnsserver_msg
;
1316 struct in_addr src_addr
;
1319 void *callback_data
;
1321 unsigned int flag_cbdata
:1;
1324 wordlist
*server_msg
;
1332 * "very generic" histogram;
1333 * see important comments on hbase_f restrictions in StatHist.c
1341 hbase_f
*val_in
; /* e.g., log() for log-based histogram */
1342 hbase_f
*val_out
; /* e.g., exp() for log based histogram */
1346 * if you add a field to StatCounters,
1347 * you MUST sync statCountersInitSpecial, statCountersClean, and statCountersCopy
1349 struct _StatCounters
{
1359 kb_t hit_kbytes_out
;
1360 StatHist miss_svc_time
;
1361 StatHist nm_svc_time
;
1362 StatHist nh_svc_time
;
1363 StatHist hit_svc_time
;
1364 StatHist all_svc_time
;
1372 } all
, http
, ftp
, other
;
1384 int replies_dropped
;
1391 StatHist query_svc_time
;
1392 StatHist reply_svc_time
;
1409 #if USE_CACHE_DIGESTS
1410 cd_guess_stats guess
;
1412 StatHist on_xition_count
;
1422 struct timeval timestamp
;
1423 StatHist comm_icp_incoming
;
1424 StatHist comm_dns_incoming
;
1425 StatHist comm_http_incoming
;
1426 StatHist select_fds_hist
;
1453 int aborted_requests
;
1461 /* per header statistics */
1462 struct _HttpHeaderStat
{
1464 HttpHeaderMask
*owner_mask
;
1466 StatHist hdrUCountDistr
;
1467 StatHist fieldTypeDistr
;
1468 StatHist ccTypeDistr
;
1473 int busyDestroyedCount
;
1477 * Do we need to have the dirn in here? I don't think so, since we already
1480 struct _storeSwapLogData
{
1487 size_t swap_file_sz
;
1490 unsigned char key
[MD5_DIGEST_CHARS
];
1493 struct _ClientInfo
{
1494 hash_link hash
; /* must be first */
1495 struct in_addr addr
;
1497 int result_hist
[LOG_TYPE_MAX
];
1501 kb_t hit_kbytes_out
;
1508 int n_established
; /* number of current established connections */
1511 struct _CacheDigest
{
1512 /* public, read-only */
1513 char *mask
; /* bit mask */
1514 size_t mask_size
; /* mask size in bytes */
1515 int capacity
; /* expected maximum for .count, not a hard limit */
1516 int bits_per_entry
; /* number of bits allocated for each entry from capacity */
1517 int count
; /* number of digested entries */
1518 int del_count
; /* number of deletions performed so far */
1522 peer
*_peer
; /* NULL --> origin server */
1537 http_status last_status
;
1540 unsigned int dont_retry
:1;
1541 unsigned int ftp_pasv_failed
:1;
1546 struct _htcpReplyData
{
1552 /* cache-to-origin */
1562 struct _helper_request
{
1568 struct _helper_stateful_request
{
1571 int placeholder
; /* if 1, this is a dummy request waiting for a stateful helper
1572 * to become available for deferred requests.*/
1581 const char *id_name
;
1585 time_t last_queue_warn
;
1594 struct _helper_stateful
{
1598 const char *id_name
;
1603 HLPSAVAIL
*IsAvailable
;
1604 HLPSONEQ
*OnEmptyQueue
;
1605 time_t last_queue_warn
;
1614 struct _helper_server
{
1622 struct timeval dispatch_time
;
1623 struct timeval answer_time
;
1626 helper_request
*request
;
1627 struct _helper_flags
{
1628 unsigned int alive
:1;
1629 unsigned int busy
:1;
1630 unsigned int closing
:1;
1631 unsigned int shutdown
:1;
1639 struct _helper_stateful_server
{
1647 struct timeval dispatch_time
;
1648 struct timeval answer_time
;
1651 statefulhelper
*parent
;
1652 helper_stateful_request
*request
;
1653 struct _helper_stateful_flags
{
1654 unsigned int alive
:1;
1655 unsigned int busy
:1;
1656 unsigned int closing
:1;
1657 unsigned int shutdown
:1;
1658 stateful_helper_reserve_t reserved
;
1667 int deferred_requests
; /* current number of deferred requests */
1668 void *data
; /* State data used by the calling routines */
1672 * use this when you need to pass callback data to a blocking
1673 * operation, but you don't want to add that pointer to cbdata
1675 struct _generic_cbdata
{
1679 struct _store_rebuild_data
{
1680 int objcount
; /* # objects successfully reloaded */
1681 int expcount
; /* # objects expired */
1682 int scancount
; /* # entries scanned or read from state file */
1683 int clashcount
; /* # swapfile clashes avoided */
1684 int dupcount
; /* # duplicates purged */
1685 int cancelcount
; /* # SWAP_LOG_DEL objects purged */
1686 int invalid
; /* # bad lines */
1687 int badflags
; /* # bad e->flags */
1693 * This defines an fs type
1696 struct _storefs_entry
{
1697 const char *typestr
;
1698 STFSSHUTDOWN
*donefunc
;
1703 * This defines an repl type
1706 struct _storerepl_entry
{
1707 const char *typestr
;
1708 REMOVALPOLICYCREATE
*create
;
1712 * Async disk IO - this defines a async disk io queue
1715 struct _diskd_queue
{
1716 int smsgid
; /* send sysvmsg id */
1717 int rmsgid
; /* recv sysvmsg id */
1718 int wfd
; /* queue file descriptor ? */
1719 int away
; /* number of requests away */
1720 int sent_count
; /* number of messages sent */
1721 int recv_count
; /* number of messages received */
1723 char *buf
; /* shm buffer */
1725 int id
; /* sysvshm id */
1731 char path
[MAXPATHLEN
];
1736 unsigned int fatal
:1;
1740 struct cache_dir_option
{
1742 void (*parse
) (SwapDir
* sd
, const char *option
, const char *value
, int reconfiguring
);
1743 void (*dump
) (StoreEntry
* e
, const char *option
, SwapDir
const * sd
);
1746 #endif /* SQUID_STRUCTS_H */