]>
Commit | Line | Data |
---|---|---|
a8258824 | 1 | |
9cef6668 | 2 | /* |
cd748f27 | 3 | * $Id: typedefs.h,v 1.102 2000/05/03 17:15:44 adrian Exp $ |
9cef6668 | 4 | * |
5 | * | |
6 | * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ | |
7 | * ---------------------------------------------------------- | |
8 | * | |
9 | * Squid is the result of efforts by numerous individuals from the | |
10 | * Internet community. Development is led by Duane Wessels of the | |
11 | * National Laboratory for Applied Network Research and funded by the | |
12 | * National Science Foundation. Squid is Copyrighted (C) 1998 by | |
efd900cb | 13 | * the Regents of the University of California. Please see the |
14 | * COPYRIGHT file for full details. Squid incorporates software | |
15 | * developed and/or copyrighted by other sources. Please see the | |
16 | * CREDITS file for full details. | |
9cef6668 | 17 | * |
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. | |
22 | * | |
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. | |
27 | * | |
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. | |
31 | * | |
32 | */ | |
33 | ||
c8366e06 | 34 | #ifndef _TYPEDEFS_H_ |
35 | #define _TYPEDEFS_H_ | |
36 | ||
a8258824 | 37 | typedef unsigned int store_status_t; |
38 | typedef unsigned int mem_status_t; | |
39 | typedef unsigned int ping_status_t; | |
40 | typedef unsigned int swap_status_t; | |
2391a162 | 41 | typedef int sfileno; |
cd748f27 | 42 | typedef int sdirno; |
a8258824 | 43 | |
a7c05555 | 44 | typedef struct { |
0e473d70 | 45 | size_t bytes; |
46 | size_t kb; | |
a7c05555 | 47 | } kb_t; |
48 | ||
7faf2bdb | 49 | typedef struct { |
50 | size_t count; | |
51 | size_t bytes; | |
52 | size_t gb; | |
53 | } gb_t; | |
54 | ||
a8258824 | 55 | /* |
a47b9029 | 56 | * grep '^struct' structs.h \ |
57 | * | perl -ne '($a,$b)=split;$c=$b;$c=~s/^_//; print "typedef struct $b $c;\n";' | |
58 | */ | |
a8258824 | 59 | |
60 | typedef struct _acl_ip_data acl_ip_data; | |
61 | typedef struct _acl_time_data acl_time_data; | |
62 | typedef struct _acl_name_list acl_name_list; | |
63 | typedef struct _acl_deny_info_list acl_deny_info_list; | |
22f3fd98 | 64 | typedef struct _acl_proxy_auth acl_proxy_auth; |
ec878047 | 65 | typedef struct _acl_proxy_auth_user acl_proxy_auth_user; |
40444bdf | 66 | typedef struct _acl_arp_data acl_arp_data; |
a8258824 | 67 | typedef struct _acl acl; |
43d4303e | 68 | typedef struct _acl_snmp_comm acl_snmp_comm; |
a8258824 | 69 | typedef struct _acl_list acl_list; |
70 | typedef struct _acl_access acl_access; | |
71 | typedef struct _aclCheck_t aclCheck_t; | |
a8258824 | 72 | typedef struct _wordlist wordlist; |
73 | typedef struct _intlist intlist; | |
8f663d72 | 74 | typedef struct _intrange intrange; |
a8258824 | 75 | typedef struct _ushortlist ushortlist; |
76 | typedef struct _relist relist; | |
7e3ce7b9 | 77 | typedef struct _sockaddr_in_list sockaddr_in_list; |
a8258824 | 78 | typedef struct _SquidConfig SquidConfig; |
79 | typedef struct _SquidConfig2 SquidConfig2; | |
80 | typedef struct _close_handler close_handler; | |
81 | typedef struct _dread_ctrl dread_ctrl; | |
82 | typedef struct _dnsserver_t dnsserver_t; | |
83 | typedef struct _dnsStatData dnsStatData; | |
84 | typedef struct _dwrite_q dwrite_q; | |
a9771e51 | 85 | typedef struct _ETag ETag; |
a8258824 | 86 | typedef struct _fde fde; |
87 | typedef struct _fileMap fileMap; | |
88 | typedef struct _fqdncache_entry fqdncache_entry; | |
59c4d35b | 89 | typedef struct _fqdn_pending fqdn_pending; |
cb69b4c7 | 90 | typedef struct _HttpReply http_reply; |
adba4a64 | 91 | typedef struct _HttpStatusLine HttpStatusLine; |
de336bbe | 92 | typedef struct _HttpHeaderFieldAttrs HttpHeaderFieldAttrs; |
93 | typedef struct _HttpHeaderFieldInfo HttpHeaderFieldInfo; | |
4f087419 | 94 | typedef struct _HttpHeader HttpHeader; |
7faf2bdb | 95 | typedef struct _HttpHdrCc HttpHdrCc; |
b5107edb | 96 | typedef struct _HttpHdrRangeSpec HttpHdrRangeSpec; |
97 | typedef struct _HttpHdrRange HttpHdrRange; | |
d192d11f | 98 | typedef struct _HttpHdrRangeIter HttpHdrRangeIter; |
d76fcfa7 | 99 | typedef struct _HttpHdrContRange HttpHdrContRange; |
a9771e51 | 100 | typedef struct _TimeOrTag TimeOrTag; |
4f087419 | 101 | typedef struct _HttpHeaderEntry HttpHeaderEntry; |
7faf2bdb | 102 | typedef struct _HttpHeaderFieldStat HttpHeaderFieldStat; |
fcd2d3ef | 103 | typedef struct _HttpHeaderStat HttpHeaderStat; |
adba4a64 | 104 | typedef struct _HttpBody HttpBody; |
105 | typedef struct _HttpReply HttpReply; | |
a8258824 | 106 | typedef struct _HttpStateData HttpStateData; |
107 | typedef struct _icpUdpData icpUdpData; | |
108 | typedef struct _clientHttpRequest clientHttpRequest; | |
109 | typedef struct _ConnStateData ConnStateData; | |
110 | typedef struct _ipcache_addrs ipcache_addrs; | |
111 | typedef struct _ipcache_entry ipcache_entry; | |
59c4d35b | 112 | typedef struct _ip_pending ip_pending; |
a8258824 | 113 | typedef struct _domain_ping domain_ping; |
114 | typedef struct _domain_type domain_type; | |
7021844c | 115 | typedef struct _DynPool DynPool; |
adba4a64 | 116 | typedef struct _Packer Packer; |
7eabe1e8 | 117 | typedef struct _StoreDigestCBlock StoreDigestCBlock; |
118 | typedef struct _DigestFetchState DigestFetchState; | |
119 | typedef struct _PeerDigest PeerDigest; | |
a8258824 | 120 | typedef struct _peer peer; |
121 | typedef struct _net_db_name net_db_name; | |
122 | typedef struct _net_db_peer net_db_peer; | |
123 | typedef struct _netdbEntry netdbEntry; | |
b4e7f82d | 124 | typedef struct _ping_data ping_data; |
a8258824 | 125 | typedef struct _ps_state ps_state; |
126 | typedef struct _HierarchyLogEntry HierarchyLogEntry; | |
127 | typedef struct _pingerEchoData pingerEchoData; | |
128 | typedef struct _pingerReplyData pingerReplyData; | |
129 | typedef struct _icp_common_t icp_common_t; | |
a8258824 | 130 | typedef struct _Meta_data Meta_data; |
a8258824 | 131 | typedef struct _iostats iostats; |
1a3db59c | 132 | typedef struct _MemBuf MemBuf; |
a8258824 | 133 | typedef struct _mem_node mem_node; |
134 | typedef struct _mem_hdr mem_hdr; | |
a8258824 | 135 | typedef struct _store_client store_client; |
136 | typedef struct _MemObject MemObject; | |
137 | typedef struct _StoreEntry StoreEntry; | |
138 | typedef struct _SwapDir SwapDir; | |
92695e5e | 139 | typedef struct _request_flags request_flags; |
cd196bc8 | 140 | typedef struct _helper_flags helper_flags; |
b515fc11 | 141 | typedef struct _http_state_flags http_state_flags; |
a8258824 | 142 | typedef struct _request_t request_t; |
143 | typedef struct _AccessLogEntry AccessLogEntry; | |
144 | typedef struct _cachemgr_passwd cachemgr_passwd; | |
145 | typedef struct _refresh_t refresh_t; | |
146 | typedef struct _CommWriteStateData CommWriteStateData; | |
9b312a19 | 147 | typedef struct _ErrorState ErrorState; |
b93bcace | 148 | typedef struct _dlink_node dlink_node; |
149 | typedef struct _dlink_list dlink_list; | |
f2908497 | 150 | typedef struct _StatCounters StatCounters; |
69c01cd7 | 151 | typedef struct _tlv tlv; |
07304bf9 | 152 | typedef struct _storeSwapLogData storeSwapLogData; |
56b63fa1 | 153 | typedef struct _cacheSwap cacheSwap; |
12cf1be2 | 154 | typedef struct _StatHist StatHist; |
02922e76 | 155 | typedef struct _String String; |
156 | typedef struct _MemMeter MemMeter; | |
157 | typedef struct _MemPoolMeter MemPoolMeter; | |
158 | typedef struct _MemPool MemPool; | |
59c4d35b | 159 | typedef struct _ClientInfo ClientInfo; |
7eabe1e8 | 160 | typedef struct _cd_guess_stats cd_guess_stats; |
c411be12 | 161 | typedef struct _CacheDigest CacheDigest; |
7eabe1e8 | 162 | typedef struct _Version Version; |
910169e5 | 163 | typedef struct _FwdState FwdState; |
164 | typedef struct _FwdServer FwdServer; | |
74addf6c | 165 | typedef struct _helper helper; |
166 | typedef struct _helper_server helper_server; | |
167 | typedef struct _helper_request helper_request; | |
168 | typedef struct _generic_cbdata generic_cbdata; | |
2391a162 | 169 | typedef struct _storeIOState storeIOState; |
d03d26fb | 170 | typedef struct _link_list link_list; |
cd748f27 | 171 | typedef struct _storefs_entry storefs_entry_t; |
172 | typedef struct _diskd_queue diskd_queue; | |
5673c2e2 | 173 | typedef struct _Logfile Logfile; |
9fb13bb6 | 174 | |
a9ddb359 | 175 | #if SQUID_SNMP |
dba79ac5 | 176 | typedef variable_list *(oid_ParseFn) (variable_list *, snint *); |
a9ddb359 | 177 | typedef struct _snmp_request_t snmp_request_t; |
a9ddb359 | 178 | #endif |
179 | ||
59715b38 | 180 | #if DELAY_POOLS |
181 | typedef struct _delayConfig delayConfig; | |
182 | typedef struct _delaySpecSet delaySpecSet; | |
183 | typedef struct _delaySpec delaySpec; | |
184 | #endif | |
185 | ||
79a15e0a | 186 | typedef void CWCB(int fd, char *, size_t size, int flag, void *data); |
f5b8bbc4 | 187 | typedef void CNCB(int fd, int status, void *); |
2246b732 | 188 | |
f5b8bbc4 | 189 | typedef void FREE(void *); |
db1cd23c | 190 | typedef void CBDUNL(void *, int); |
6cf028ab | 191 | typedef void FOCB(void *, int fd, int errcode); |
f5b8bbc4 | 192 | typedef void EVH(void *); |
193 | typedef void PF(int, void *); | |
cd748f27 | 194 | |
195 | /* disk.c / diskd.c callback typedefs */ | |
196 | typedef void DRCB(int, const char *buf, int size, int errflag, void *data); | |
197 | /* Disk read CB */ | |
198 | typedef void DWCB(int, int, size_t, void *); /* disk write CB */ | |
199 | typedef void DOCB(int, int errflag, void *data); /* disk open CB */ | |
200 | typedef void DCCB(int, int errflag, void *data); /* disk close CB */ | |
201 | typedef void DUCB(int errflag, void *data); /* disk unlink CB */ | |
202 | typedef void DTCB(int errflag, void *data); /* disk trunc CB */ | |
203 | ||
f5b8bbc4 | 204 | typedef void FQDNH(const char *, void *); |
05832ae1 | 205 | typedef void IDCB(const char *ident, void *data); |
f5b8bbc4 | 206 | typedef void IPH(const ipcache_addrs *, void *); |
86aebcda | 207 | typedef void IRCB(peer *, peer_t, protocol_t, void *, void *data); |
db1cd23c | 208 | typedef void PSC(FwdServer *, void *); |
23d92c64 | 209 | typedef void RH(void *data, char *); |
210 | typedef void UH(void *data, wordlist *); | |
da2b3a17 | 211 | typedef int DEFER(int fd, void *data); |
a8258824 | 212 | |
2391a162 | 213 | typedef void STIOCB(void *their_data, int errflag, storeIOState *); |
cd748f27 | 214 | typedef void STFNCB(void *their_data, int errflag, storeIOState *); |
5bd1abac | 215 | typedef void STRCB(void *their_data, const char *buf, ssize_t len); |
2391a162 | 216 | |
217 | typedef void SIH(storeIOState *, void *); /* swap in */ | |
f5b8bbc4 | 218 | typedef int QS(const void *, const void *); /* qsort */ |
219 | typedef void STCB(void *, char *, ssize_t); /* store callback */ | |
220 | typedef void STABH(void *); | |
79a15e0a | 221 | typedef void ERCB(int fd, void *, size_t); |
f5b8bbc4 | 222 | typedef void OBJH(StoreEntry *); |
223 | typedef void SIGHDLR(int sig); | |
f09f5b26 | 224 | typedef void STVLDCB(void *, int, int); |
74addf6c | 225 | typedef void HLPCB(void *, char *buf); |
226 | typedef void HLPCMDOPTS(int *argc, char **argv); | |
7b724b86 | 227 | typedef void IDNSCB(void *, rfc1035_rr *, int); |
9fb13bb6 | 228 | |
b2c141d4 | 229 | typedef void STINIT(SwapDir *); |
230 | typedef void STNEWFS(SwapDir *); | |
cd748f27 | 231 | typedef void STDUMP(StoreEntry *, const char *, SwapDir *); |
232 | typedef void STFREE(SwapDir *); | |
233 | typedef int STDBLCHECK(SwapDir *, StoreEntry *); | |
234 | typedef void STSTATFS(SwapDir *, StoreEntry *); | |
235 | typedef void STMAINTAINFS(SwapDir *); | |
236 | typedef int STCHECKOBJ(SwapDir *, const StoreEntry *); | |
237 | typedef void STREFOBJ(SwapDir *, StoreEntry *); | |
238 | typedef void STUNREFOBJ(SwapDir *, StoreEntry *); | |
239 | typedef void STSETUP(storefs_entry_t *); | |
240 | typedef void STDONE(void); | |
241 | typedef void STCALLBACK(SwapDir *); | |
242 | typedef void STSYNC(SwapDir *); | |
243 | ||
244 | typedef storeIOState *STOBJCREATE(SwapDir *, StoreEntry *, STFNCB *, STIOCB *, void *); | |
245 | typedef storeIOState *STOBJOPEN(SwapDir *, StoreEntry *, STFNCB *, STIOCB *, void *); | |
246 | typedef void STOBJCLOSE(SwapDir *, storeIOState *); | |
247 | typedef void STOBJREAD(SwapDir *, storeIOState *, char *, size_t, off_t, STRCB *, void *); | |
248 | typedef void STOBJWRITE(SwapDir *, storeIOState *, char *, size_t, off_t, FREE *); | |
249 | typedef void STOBJUNLINK(SwapDir *, StoreEntry *); | |
250 | ||
b2c141d4 | 251 | typedef void STLOGOPEN(SwapDir *); |
252 | typedef void STLOGCLOSE(SwapDir *); | |
200ba06e | 253 | typedef void STLOGWRITE(const SwapDir *, const StoreEntry *, int); |
b2c141d4 | 254 | typedef int STLOGCLEANOPEN(SwapDir *); |
255 | typedef void STLOGCLEANWRITE(const StoreEntry *, SwapDir *); | |
0e4e0e7d | 256 | |
cd748f27 | 257 | /* Store dir configuration routines */ |
258 | /* SwapDir *sd, char *path ( + char *opt later when the strtok mess is gone) */ | |
259 | typedef void STFSPARSE(SwapDir *, int, char *); | |
260 | typedef void STFSRECONFIGURE(SwapDir *, int, char *); | |
261 | typedef void STFSSTARTUP(void); | |
262 | typedef void STFSSHUTDOWN(void); | |
263 | ||
95c297ec | 264 | typedef double hbase_f(double); |
ba4f8e5a | 265 | typedef void StatHistBinDumper(StoreEntry *, int idx, double val, double size, int count); |
adba4a64 | 266 | |
267 | /* append/vprintf's for Packer */ | |
2ac76861 | 268 | typedef void (*append_f) (void *, const char *buf, int size); |
6de2df60 | 269 | #if STDC_HEADERS |
c68e9c6b | 270 | typedef void (*vprintf_f) (void *, const char *fmt, va_list args); |
adba4a64 | 271 | #else |
2ac76861 | 272 | typedef void (*vprintf_f) (); |
adba4a64 | 273 | #endif |
274 | ||
f09f5b26 | 275 | /* MD5 cache keys */ |
6507d007 | 276 | typedef unsigned char cache_key; |
123abbe1 | 277 | |
278 | /* context-based debugging, the actual type is subject to change */ | |
279 | typedef int Ctx; | |
1a3db59c | 280 | |
281 | /* in case we want to change it later */ | |
9bc73deb | 282 | typedef ssize_t mb_size_t; |
02922e76 | 283 | |
284 | /* iteration for HttpHdrRange */ | |
285 | typedef int HttpHdrRangePos; | |
de336bbe | 286 | |
287 | /*iteration for headers; use HttpHeaderPos as opaque type, do not interpret */ | |
288 | typedef ssize_t HttpHeaderPos; | |
d8b249ef | 289 | |
290 | /* big mask for http headers */ | |
291 | typedef char HttpHeaderMask[8]; | |
5d2a8c13 | 292 | |
293 | /* a common objPackInto interface; used by debugObj */ | |
0cdcddb9 | 294 | typedef void (*ObjPackMethod) (void *obj, Packer * p); |
447e176b | 295 | |
296 | #if DELAY_POOLS | |
59715b38 | 297 | typedef unsigned int delay_id; |
447e176b | 298 | #endif |
86aebcda | 299 | |
300 | #if USE_HTCP | |
301 | typedef struct _htcpReplyData htcpReplyData; | |
302 | #endif | |
c8366e06 | 303 | |
304 | #endif /* _TYPEDEFS_H_ */ |