]>
Commit | Line | Data |
---|---|---|
a8258824 | 1 | |
9cef6668 | 2 | /* |
c8f4eac4 | 3 | * $Id: typedefs.h,v 1.177 2005/01/03 16:08:26 robertc Exp $ |
9cef6668 | 4 | * |
5 | * | |
2b6662ba | 6 | * SQUID Web Proxy Cache http://www.squid-cache.org/ |
9cef6668 | 7 | * ---------------------------------------------------------- |
8 | * | |
2b6662ba | 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. | |
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 | ||
528b2c61 | 34 | #include "squid.h" |
35 | ||
b5638623 | 36 | #ifndef SQUID_TYPEDEFS_H |
37 | #define SQUID_TYPEDEFS_H | |
c8366e06 | 38 | |
a8258824 | 39 | typedef unsigned int store_status_t; |
a8258824 | 40 | typedef unsigned int ping_status_t; |
41 | typedef unsigned int swap_status_t; | |
69f72d8b | 42 | typedef signed int sfileno; |
43 | typedef signed int sdirno; | |
a8258824 | 44 | |
62e76326 | 45 | typedef struct |
46 | { | |
0e473d70 | 47 | size_t bytes; |
48 | size_t kb; | |
62e76326 | 49 | } |
50 | ||
51 | kb_t; | |
a7c05555 | 52 | |
a8258824 | 53 | typedef struct _acl_time_data acl_time_data; |
62e76326 | 54 | |
a8258824 | 55 | typedef struct _acl_name_list acl_name_list; |
62e76326 | 56 | |
a8258824 | 57 | typedef struct _acl_deny_info_list acl_deny_info_list; |
62e76326 | 58 | |
7d9b0628 | 59 | typedef class AuthUser auth_user_t; |
62e76326 | 60 | |
b67e2c8c | 61 | class AuthUserRequest; |
62 | typedef AuthUserRequest auth_user_request_t; | |
62e76326 | 63 | |
e6ccf245 | 64 | typedef struct AuthUserHashPointer auth_user_hash_pointer; |
62e76326 | 65 | |
e6ccf245 | 66 | typedef struct AuthUserIP auth_user_ip_t; |
62e76326 | 67 | |
94439e4e | 68 | typedef struct _acl_proxy_auth_match_cache acl_proxy_auth_match_cache; |
62e76326 | 69 | |
f5691f9c | 70 | /* temporary: once Config is fully hidden, this shouldn't be needed */ |
71 | #include "Array.h" | |
62e76326 | 72 | |
f5691f9c | 73 | class AuthConfig; |
74 | typedef Vector<AuthConfig *> authConfig; | |
62e76326 | 75 | |
43d4303e | 76 | typedef struct _acl_snmp_comm acl_snmp_comm; |
62e76326 | 77 | |
8000a965 | 78 | typedef class ACLList acl_list; |
62e76326 | 79 | |
d6827718 | 80 | typedef struct _acl_address acl_address; |
62e76326 | 81 | |
d6827718 | 82 | typedef struct _acl_tos acl_tos; |
62e76326 | 83 | |
ef1955a5 | 84 | typedef struct _acl_size_t acl_size_t; |
85 | ||
4fb35c3c | 86 | class ACLChecklist; |
62e76326 | 87 | |
a8258824 | 88 | typedef struct _wordlist wordlist; |
62e76326 | 89 | |
a8258824 | 90 | typedef struct _ushortlist ushortlist; |
62e76326 | 91 | |
a8258824 | 92 | typedef struct _relist relist; |
62e76326 | 93 | |
7e3ce7b9 | 94 | typedef struct _sockaddr_in_list sockaddr_in_list; |
62e76326 | 95 | |
fbdba7c4 | 96 | typedef struct _http_port_list http_port_list; |
97 | ||
d193a436 | 98 | typedef struct _https_port_list https_port_list; |
62e76326 | 99 | |
a8258824 | 100 | typedef struct _SquidConfig SquidConfig; |
62e76326 | 101 | |
a8258824 | 102 | typedef struct _SquidConfig2 SquidConfig2; |
62e76326 | 103 | |
a8258824 | 104 | typedef struct _close_handler close_handler; |
62e76326 | 105 | |
a8258824 | 106 | typedef struct _dread_ctrl dread_ctrl; |
62e76326 | 107 | |
a8258824 | 108 | typedef struct _dnsserver_t dnsserver_t; |
62e76326 | 109 | |
a8258824 | 110 | typedef struct _dwrite_q dwrite_q; |
62e76326 | 111 | |
a9771e51 | 112 | typedef struct _ETag ETag; |
62e76326 | 113 | |
528b2c61 | 114 | class fde; |
62e76326 | 115 | |
a8258824 | 116 | typedef struct _fileMap fileMap; |
62e76326 | 117 | |
de336bbe | 118 | typedef struct _HttpHeaderFieldAttrs HttpHeaderFieldAttrs; |
62e76326 | 119 | |
0353e724 | 120 | class HttpHeaderFieldInfo; |
62e76326 | 121 | |
924f73bc | 122 | class HttpHeader; |
62e76326 | 123 | |
7faf2bdb | 124 | typedef struct _HttpHdrCc HttpHdrCc; |
62e76326 | 125 | |
edce4d98 | 126 | typedef struct _HttpHdrSc HttpHdrSc; |
62e76326 | 127 | |
edce4d98 | 128 | typedef struct _HttpHdrScTarget HttpHdrScTarget; |
62e76326 | 129 | |
a9771e51 | 130 | typedef struct _TimeOrTag TimeOrTag; |
62e76326 | 131 | |
0353e724 | 132 | class HttpHeaderEntry; |
62e76326 | 133 | |
0353e724 | 134 | class HttpHeaderFieldStat; |
62e76326 | 135 | |
fcd2d3ef | 136 | typedef struct _HttpHeaderStat HttpHeaderStat; |
62e76326 | 137 | |
adba4a64 | 138 | typedef struct _HttpBody HttpBody; |
62e76326 | 139 | |
0353e724 | 140 | class HttpReply; |
62e76326 | 141 | |
94439e4e | 142 | typedef struct _ConnCloseHelperData ConnCloseHelperData; |
62e76326 | 143 | |
a8258824 | 144 | typedef struct _ipcache_addrs ipcache_addrs; |
62e76326 | 145 | |
a8258824 | 146 | typedef struct _domain_ping domain_ping; |
62e76326 | 147 | |
a8258824 | 148 | typedef struct _domain_type domain_type; |
62e76326 | 149 | |
7021844c | 150 | typedef struct _DynPool DynPool; |
62e76326 | 151 | |
adba4a64 | 152 | typedef struct _Packer Packer; |
62e76326 | 153 | |
7eabe1e8 | 154 | typedef struct _StoreDigestCBlock StoreDigestCBlock; |
62e76326 | 155 | |
7eabe1e8 | 156 | typedef struct _DigestFetchState DigestFetchState; |
62e76326 | 157 | |
0353e724 | 158 | class PeerDigest; |
62e76326 | 159 | |
a8258824 | 160 | typedef struct _peer peer; |
62e76326 | 161 | |
a8258824 | 162 | typedef struct _net_db_name net_db_name; |
62e76326 | 163 | |
a8258824 | 164 | typedef struct _net_db_peer net_db_peer; |
62e76326 | 165 | |
a8258824 | 166 | typedef struct _netdbEntry netdbEntry; |
62e76326 | 167 | |
a8258824 | 168 | typedef struct _pingerEchoData pingerEchoData; |
62e76326 | 169 | |
a8258824 | 170 | typedef struct _pingerReplyData pingerReplyData; |
62e76326 | 171 | |
a8258824 | 172 | typedef struct _icp_common_t icp_common_t; |
62e76326 | 173 | |
a8258824 | 174 | typedef struct _Meta_data Meta_data; |
62e76326 | 175 | |
a8258824 | 176 | typedef struct _iostats iostats; |
62e76326 | 177 | |
528b2c61 | 178 | class MemBuf; |
62e76326 | 179 | |
528b2c61 | 180 | class store_client; |
62e76326 | 181 | |
3b13a8fd | 182 | class StoreEntry; |
62e76326 | 183 | |
d3b3ab85 | 184 | class SwapDir; |
62e76326 | 185 | |
cd196bc8 | 186 | typedef struct _helper_flags helper_flags; |
62e76326 | 187 | |
94439e4e | 188 | typedef struct _helper_stateful_flags helper_stateful_flags; |
62e76326 | 189 | |
b515fc11 | 190 | typedef struct _http_state_flags http_state_flags; |
62e76326 | 191 | |
6bccf575 | 192 | typedef struct _header_mangler header_mangler; |
62e76326 | 193 | |
a560ee93 | 194 | typedef struct _body_size body_size; |
62e76326 | 195 | |
edb9bfd5 | 196 | class HttpRequest; |
62e76326 | 197 | |
a8258824 | 198 | typedef struct _cachemgr_passwd cachemgr_passwd; |
62e76326 | 199 | |
a8258824 | 200 | typedef struct _refresh_t refresh_t; |
62e76326 | 201 | |
a8258824 | 202 | typedef struct _CommWriteStateData CommWriteStateData; |
62e76326 | 203 | |
9b312a19 | 204 | typedef struct _ErrorState ErrorState; |
62e76326 | 205 | |
2d8c0b1a | 206 | class dlink_node; |
62e76326 | 207 | |
b93bcace | 208 | typedef struct _dlink_list dlink_list; |
62e76326 | 209 | |
f2908497 | 210 | typedef struct _StatCounters StatCounters; |
62e76326 | 211 | |
07304bf9 | 212 | typedef struct _storeSwapLogData storeSwapLogData; |
62e76326 | 213 | |
12cf1be2 | 214 | typedef struct _StatHist StatHist; |
62e76326 | 215 | |
59c4d35b | 216 | typedef struct _ClientInfo ClientInfo; |
62e76326 | 217 | |
7eabe1e8 | 218 | typedef struct _cd_guess_stats cd_guess_stats; |
62e76326 | 219 | |
c411be12 | 220 | typedef struct _CacheDigest CacheDigest; |
62e76326 | 221 | |
7eabe1e8 | 222 | typedef struct _Version Version; |
62e76326 | 223 | |
910169e5 | 224 | typedef struct _FwdState FwdState; |
62e76326 | 225 | |
910169e5 | 226 | typedef struct _FwdServer FwdServer; |
62e76326 | 227 | |
74addf6c | 228 | typedef struct _helper helper; |
62e76326 | 229 | |
94439e4e | 230 | typedef struct _helper_stateful statefulhelper; |
62e76326 | 231 | |
74addf6c | 232 | typedef struct _helper_server helper_server; |
62e76326 | 233 | |
94439e4e | 234 | typedef struct _helper_stateful_server helper_stateful_server; |
62e76326 | 235 | |
74addf6c | 236 | typedef struct _generic_cbdata generic_cbdata; |
62e76326 | 237 | |
d3b3ab85 | 238 | class storeIOState; |
62e76326 | 239 | |
d03d26fb | 240 | typedef struct _link_list link_list; |
62e76326 | 241 | |
22d38e05 | 242 | typedef struct _storerepl_entry storerepl_entry_t; |
62e76326 | 243 | |
cd748f27 | 244 | typedef struct _diskd_queue diskd_queue; |
62e76326 | 245 | |
5673c2e2 | 246 | typedef struct _Logfile Logfile; |
62e76326 | 247 | |
7684c4b1 | 248 | typedef struct _logformat_token logformat_token; |
249 | ||
250 | typedef struct _logformat logformat; | |
251 | ||
252 | typedef struct _customlog customlog; | |
253 | ||
6a566b9c | 254 | typedef struct _RemovalPolicy RemovalPolicy; |
62e76326 | 255 | |
6a566b9c | 256 | typedef struct _RemovalPolicyWalker RemovalPolicyWalker; |
62e76326 | 257 | |
6a566b9c | 258 | typedef struct _RemovalPurgeWalker RemovalPurgeWalker; |
62e76326 | 259 | |
a9ddb359 | 260 | #if SQUID_SNMP |
dba79ac5 | 261 | typedef variable_list *(oid_ParseFn) (variable_list *, snint *); |
62e76326 | 262 | |
a9ddb359 | 263 | typedef struct _snmp_request_t snmp_request_t; |
a9ddb359 | 264 | #endif |
265 | ||
3d7e9d7c | 266 | typedef void CWCB(int fd, char *, size_t size, comm_err_t flag, void *data); |
f3400a93 | 267 | typedef void CNCB(int fd, comm_err_t status, int xerrno, void *data); |
268 | ||
c4b7a5a9 | 269 | typedef void IOCB(int fd, char *, size_t size, comm_err_t flag, int xerrno, void *data); |
2246b732 | 270 | |
f5b8bbc4 | 271 | typedef void FREE(void *); |
28c60158 | 272 | typedef void CBDUNL(void *); |
6cf028ab | 273 | typedef void FOCB(void *, int fd, int errcode); |
f5b8bbc4 | 274 | typedef void EVH(void *); |
275 | typedef void PF(int, void *); | |
cd748f27 | 276 | |
277 | /* disk.c / diskd.c callback typedefs */ | |
278 | typedef void DRCB(int, const char *buf, int size, int errflag, void *data); | |
62e76326 | 279 | /* Disk read CB */ |
a4b8110e | 280 | typedef void DWCB(int, int, size_t, void *); /* disk write CB */ |
cd748f27 | 281 | typedef void DOCB(int, int errflag, void *data); /* disk open CB */ |
282 | typedef void DCCB(int, int errflag, void *data); /* disk close CB */ | |
a4b8110e | 283 | typedef void DUCB(int errflag, void *data); /* disk unlink CB */ |
284 | typedef void DTCB(int errflag, void *data); /* disk trunc CB */ | |
cd748f27 | 285 | |
f5b8bbc4 | 286 | typedef void FQDNH(const char *, void *); |
05832ae1 | 287 | typedef void IDCB(const char *ident, void *data); |
f5b8bbc4 | 288 | typedef void IPH(const ipcache_addrs *, void *); |
86aebcda | 289 | typedef void IRCB(peer *, peer_t, protocol_t, void *, void *data); |
db1cd23c | 290 | typedef void PSC(FwdServer *, void *); |
23d92c64 | 291 | typedef void RH(void *data, char *); |
292 | typedef void UH(void *data, wordlist *); | |
1f7c9178 | 293 | typedef int READ_HANDLER(int, char *, int); |
294 | typedef int WRITE_HANDLER(int, const char *, int); | |
e6ccf245 | 295 | typedef void CBCB(char *buf, ssize_t size, void *data); |
a8258824 | 296 | |
2391a162 | 297 | typedef void STIOCB(void *their_data, int errflag, storeIOState *); |
cd748f27 | 298 | typedef void STFNCB(void *their_data, int errflag, storeIOState *); |
5bd1abac | 299 | typedef void STRCB(void *their_data, const char *buf, ssize_t len); |
2391a162 | 300 | |
301 | typedef void SIH(storeIOState *, void *); /* swap in */ | |
f5b8bbc4 | 302 | typedef int QS(const void *, const void *); /* qsort */ |
f5b8bbc4 | 303 | typedef void STABH(void *); |
79a15e0a | 304 | typedef void ERCB(int fd, void *, size_t); |
f5b8bbc4 | 305 | typedef void OBJH(StoreEntry *); |
306 | typedef void SIGHDLR(int sig); | |
f09f5b26 | 307 | typedef void STVLDCB(void *, int, int); |
74addf6c | 308 | typedef void HLPCB(void *, char *buf); |
94439e4e | 309 | typedef stateful_helper_callback_t HLPSCB(void *, void *lastserver, char *buf); |
310 | typedef int HLPSAVAIL(void *); | |
311 | typedef void HLPSONEQ(void *); | |
74addf6c | 312 | typedef void HLPCMDOPTS(int *argc, char **argv); |
7ba8d0b8 | 313 | typedef void IDNSCB(void *, rfc1035_rr *, int, const char *); |
9fb13bb6 | 314 | |
95c297ec | 315 | typedef double hbase_f(double); |
ba4f8e5a | 316 | typedef void StatHistBinDumper(StoreEntry *, int idx, double val, double size, int count); |
adba4a64 | 317 | |
318 | /* append/vprintf's for Packer */ | |
2ac76861 | 319 | typedef void (*append_f) (void *, const char *buf, int size); |
6de2df60 | 320 | #if STDC_HEADERS |
c68e9c6b | 321 | typedef void (*vprintf_f) (void *, const char *fmt, va_list args); |
adba4a64 | 322 | #else |
2ac76861 | 323 | typedef void (*vprintf_f) (); |
adba4a64 | 324 | #endif |
325 | ||
f09f5b26 | 326 | /* MD5 cache keys */ |
6507d007 | 327 | typedef unsigned char cache_key; |
123abbe1 | 328 | |
329 | /* context-based debugging, the actual type is subject to change */ | |
330 | typedef int Ctx; | |
1a3db59c | 331 | |
332 | /* in case we want to change it later */ | |
9bc73deb | 333 | typedef ssize_t mb_size_t; |
02922e76 | 334 | |
de336bbe | 335 | /*iteration for headers; use HttpHeaderPos as opaque type, do not interpret */ |
336 | typedef ssize_t HttpHeaderPos; | |
d8b249ef | 337 | |
338 | /* big mask for http headers */ | |
b8ef0239 | 339 | typedef char HttpHeaderMask[12]; |
5d2a8c13 | 340 | |
341 | /* a common objPackInto interface; used by debugObj */ | |
0cdcddb9 | 342 | typedef void (*ObjPackMethod) (void *obj, Packer * p); |
447e176b | 343 | |
c1dd71ae | 344 | typedef RemovalPolicy *REMOVALPOLICYCREATE(wordlist * args); |
65a53c8e | 345 | |
346 | typedef int STDIRSELECT(const StoreEntry *); | |
b5638623 | 347 | #endif /* SQUID_TYPEDEFS_H */ |