]>
Commit | Line | Data |
---|---|---|
a8258824 | 1 | |
9cef6668 | 2 | /* |
3f38a55e | 3 | * $Id: typedefs.h,v 1.152 2003/02/21 19:53:02 hno 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 | |
a7c05555 | 45 | typedef struct { |
0e473d70 | 46 | size_t bytes; |
47 | size_t kb; | |
a7c05555 | 48 | } kb_t; |
49 | ||
a8258824 | 50 | typedef struct _acl_time_data acl_time_data; |
51 | typedef struct _acl_name_list acl_name_list; | |
52 | typedef struct _acl_deny_info_list acl_deny_info_list; | |
e6ccf245 | 53 | typedef struct AuthUser auth_user_t; |
b67e2c8c | 54 | class AuthUserRequest; |
55 | typedef AuthUserRequest auth_user_request_t; | |
e6ccf245 | 56 | typedef struct AuthUserHashPointer auth_user_hash_pointer; |
57 | typedef struct AuthUserIP auth_user_ip_t; | |
94439e4e | 58 | typedef struct _acl_proxy_auth_match_cache acl_proxy_auth_match_cache; |
59 | typedef struct _authscheme_entry authscheme_entry_t; | |
60 | typedef struct _authScheme authScheme; | |
60d096f4 | 61 | typedef struct _acl_user_ip_data acl_user_ip_data; |
40444bdf | 62 | typedef struct _acl_arp_data acl_arp_data; |
43d4303e | 63 | typedef struct _acl_snmp_comm acl_snmp_comm; |
8000a965 | 64 | typedef class ACLList acl_list; |
d6827718 | 65 | typedef struct _acl_address acl_address; |
66 | typedef struct _acl_tos acl_tos; | |
4fb35c3c | 67 | class ACLChecklist; |
a8258824 | 68 | typedef struct _wordlist wordlist; |
69 | typedef struct _intlist intlist; | |
8f663d72 | 70 | typedef struct _intrange intrange; |
a8258824 | 71 | typedef struct _ushortlist ushortlist; |
72 | typedef struct _relist relist; | |
7e3ce7b9 | 73 | typedef struct _sockaddr_in_list sockaddr_in_list; |
3f38a55e | 74 | typedef struct _http_port_list http_port_list; |
d193a436 | 75 | typedef struct _https_port_list https_port_list; |
a8258824 | 76 | typedef struct _SquidConfig SquidConfig; |
77 | typedef struct _SquidConfig2 SquidConfig2; | |
78 | typedef struct _close_handler close_handler; | |
79 | typedef struct _dread_ctrl dread_ctrl; | |
80 | typedef struct _dnsserver_t dnsserver_t; | |
a8258824 | 81 | typedef struct _dwrite_q dwrite_q; |
a9771e51 | 82 | typedef struct _ETag ETag; |
528b2c61 | 83 | class fde; |
a8258824 | 84 | typedef struct _fileMap fileMap; |
cb69b4c7 | 85 | typedef struct _HttpReply http_reply; |
adba4a64 | 86 | typedef struct _HttpStatusLine HttpStatusLine; |
de336bbe | 87 | typedef struct _HttpHeaderFieldAttrs HttpHeaderFieldAttrs; |
88 | typedef struct _HttpHeaderFieldInfo HttpHeaderFieldInfo; | |
4f087419 | 89 | typedef struct _HttpHeader HttpHeader; |
7faf2bdb | 90 | typedef struct _HttpHdrCc HttpHdrCc; |
edce4d98 | 91 | typedef struct _HttpHdrSc HttpHdrSc; |
92 | typedef struct _HttpHdrScTarget HttpHdrScTarget; | |
a9771e51 | 93 | typedef struct _TimeOrTag TimeOrTag; |
4f087419 | 94 | typedef struct _HttpHeaderEntry HttpHeaderEntry; |
7faf2bdb | 95 | typedef struct _HttpHeaderFieldStat HttpHeaderFieldStat; |
fcd2d3ef | 96 | typedef struct _HttpHeaderStat HttpHeaderStat; |
adba4a64 | 97 | typedef struct _HttpBody HttpBody; |
98 | typedef struct _HttpReply HttpReply; | |
a8258824 | 99 | typedef struct _ConnStateData ConnStateData; |
94439e4e | 100 | typedef struct _ConnCloseHelperData ConnCloseHelperData; |
a8258824 | 101 | typedef struct _ipcache_addrs ipcache_addrs; |
a8258824 | 102 | typedef struct _domain_ping domain_ping; |
103 | typedef struct _domain_type domain_type; | |
7021844c | 104 | typedef struct _DynPool DynPool; |
adba4a64 | 105 | typedef struct _Packer Packer; |
7eabe1e8 | 106 | typedef struct _StoreDigestCBlock StoreDigestCBlock; |
107 | typedef struct _DigestFetchState DigestFetchState; | |
108 | typedef struct _PeerDigest PeerDigest; | |
a8258824 | 109 | typedef struct _peer peer; |
110 | typedef struct _net_db_name net_db_name; | |
111 | typedef struct _net_db_peer net_db_peer; | |
112 | typedef struct _netdbEntry netdbEntry; | |
b4e7f82d | 113 | typedef struct _ping_data ping_data; |
a8258824 | 114 | typedef struct _ps_state ps_state; |
115 | typedef struct _HierarchyLogEntry HierarchyLogEntry; | |
116 | typedef struct _pingerEchoData pingerEchoData; | |
117 | typedef struct _pingerReplyData pingerReplyData; | |
118 | typedef struct _icp_common_t icp_common_t; | |
a8258824 | 119 | typedef struct _Meta_data Meta_data; |
a8258824 | 120 | typedef struct _iostats iostats; |
528b2c61 | 121 | class MemBuf; |
122 | class store_client; | |
3b13a8fd | 123 | class StoreEntry; |
d3b3ab85 | 124 | class SwapDir; |
cd196bc8 | 125 | typedef struct _helper_flags helper_flags; |
94439e4e | 126 | typedef struct _helper_stateful_flags helper_stateful_flags; |
b515fc11 | 127 | typedef struct _http_state_flags http_state_flags; |
6bccf575 | 128 | typedef struct _header_mangler header_mangler; |
a560ee93 | 129 | typedef struct _body_size body_size; |
528b2c61 | 130 | class request_t; |
a8258824 | 131 | typedef struct _AccessLogEntry AccessLogEntry; |
132 | typedef struct _cachemgr_passwd cachemgr_passwd; | |
133 | typedef struct _refresh_t refresh_t; | |
134 | typedef struct _CommWriteStateData CommWriteStateData; | |
9b312a19 | 135 | typedef struct _ErrorState ErrorState; |
b93bcace | 136 | typedef struct _dlink_node dlink_node; |
137 | typedef struct _dlink_list dlink_list; | |
f2908497 | 138 | typedef struct _StatCounters StatCounters; |
07304bf9 | 139 | typedef struct _storeSwapLogData storeSwapLogData; |
94439e4e | 140 | typedef struct _authConfig authConfig; |
56b63fa1 | 141 | typedef struct _cacheSwap cacheSwap; |
12cf1be2 | 142 | typedef struct _StatHist StatHist; |
59c4d35b | 143 | typedef struct _ClientInfo ClientInfo; |
7eabe1e8 | 144 | typedef struct _cd_guess_stats cd_guess_stats; |
c411be12 | 145 | typedef struct _CacheDigest CacheDigest; |
7eabe1e8 | 146 | typedef struct _Version Version; |
910169e5 | 147 | typedef struct _FwdState FwdState; |
148 | typedef struct _FwdServer FwdServer; | |
74addf6c | 149 | typedef struct _helper helper; |
94439e4e | 150 | typedef struct _helper_stateful statefulhelper; |
74addf6c | 151 | typedef struct _helper_server helper_server; |
94439e4e | 152 | typedef struct _helper_stateful_server helper_stateful_server; |
74addf6c | 153 | typedef struct _helper_request helper_request; |
94439e4e | 154 | typedef struct _helper_stateful_request helper_stateful_request; |
74addf6c | 155 | typedef struct _generic_cbdata generic_cbdata; |
d3b3ab85 | 156 | class storeIOState; |
d03d26fb | 157 | typedef struct _link_list link_list; |
cd748f27 | 158 | typedef struct _storefs_entry storefs_entry_t; |
22d38e05 | 159 | typedef struct _storerepl_entry storerepl_entry_t; |
cd748f27 | 160 | typedef struct _diskd_queue diskd_queue; |
5673c2e2 | 161 | typedef struct _Logfile Logfile; |
6a566b9c | 162 | typedef struct _RemovalPolicy RemovalPolicy; |
163 | typedef struct _RemovalPolicyWalker RemovalPolicyWalker; | |
164 | typedef struct _RemovalPurgeWalker RemovalPurgeWalker; | |
165 | typedef struct _RemovalPolicyNode RemovalPolicyNode; | |
166 | typedef struct _RemovalPolicySettings RemovalPolicySettings; | |
ccf44862 | 167 | typedef struct _http_version_t http_version_t; |
168 | ||
a9ddb359 | 169 | #if SQUID_SNMP |
dba79ac5 | 170 | typedef variable_list *(oid_ParseFn) (variable_list *, snint *); |
a9ddb359 | 171 | typedef struct _snmp_request_t snmp_request_t; |
a9ddb359 | 172 | #endif |
173 | ||
3d7e9d7c | 174 | typedef void CWCB(int fd, char *, size_t size, comm_err_t flag, void *data); |
175 | typedef void CNCB(int fd, comm_err_t status, void *); | |
c4b7a5a9 | 176 | typedef void IOCB(int fd, char *, size_t size, comm_err_t flag, int xerrno, void *data); |
2246b732 | 177 | |
f5b8bbc4 | 178 | typedef void FREE(void *); |
28c60158 | 179 | typedef void CBDUNL(void *); |
6cf028ab | 180 | typedef void FOCB(void *, int fd, int errcode); |
f5b8bbc4 | 181 | typedef void EVH(void *); |
182 | typedef void PF(int, void *); | |
cd748f27 | 183 | |
184 | /* disk.c / diskd.c callback typedefs */ | |
185 | typedef void DRCB(int, const char *buf, int size, int errflag, void *data); | |
186 | /* Disk read CB */ | |
a4b8110e | 187 | typedef void DWCB(int, int, size_t, void *); /* disk write CB */ |
cd748f27 | 188 | typedef void DOCB(int, int errflag, void *data); /* disk open CB */ |
189 | typedef void DCCB(int, int errflag, void *data); /* disk close CB */ | |
a4b8110e | 190 | typedef void DUCB(int errflag, void *data); /* disk unlink CB */ |
191 | typedef void DTCB(int errflag, void *data); /* disk trunc CB */ | |
cd748f27 | 192 | |
f5b8bbc4 | 193 | typedef void FQDNH(const char *, void *); |
05832ae1 | 194 | typedef void IDCB(const char *ident, void *data); |
f5b8bbc4 | 195 | typedef void IPH(const ipcache_addrs *, void *); |
86aebcda | 196 | typedef void IRCB(peer *, peer_t, protocol_t, void *, void *data); |
db1cd23c | 197 | typedef void PSC(FwdServer *, void *); |
23d92c64 | 198 | typedef void RH(void *data, char *); |
199 | typedef void UH(void *data, wordlist *); | |
da2b3a17 | 200 | typedef int DEFER(int fd, void *data); |
1f7c9178 | 201 | typedef int READ_HANDLER(int, char *, int); |
202 | typedef int WRITE_HANDLER(int, const char *, int); | |
e6ccf245 | 203 | typedef void CBCB(char *buf, ssize_t size, void *data); |
a8258824 | 204 | |
2391a162 | 205 | typedef void STIOCB(void *their_data, int errflag, storeIOState *); |
cd748f27 | 206 | typedef void STFNCB(void *their_data, int errflag, storeIOState *); |
5bd1abac | 207 | typedef void STRCB(void *their_data, const char *buf, ssize_t len); |
2391a162 | 208 | |
209 | typedef void SIH(storeIOState *, void *); /* swap in */ | |
f5b8bbc4 | 210 | typedef int QS(const void *, const void *); /* qsort */ |
f5b8bbc4 | 211 | typedef void STABH(void *); |
79a15e0a | 212 | typedef void ERCB(int fd, void *, size_t); |
f5b8bbc4 | 213 | typedef void OBJH(StoreEntry *); |
214 | typedef void SIGHDLR(int sig); | |
f09f5b26 | 215 | typedef void STVLDCB(void *, int, int); |
74addf6c | 216 | typedef void HLPCB(void *, char *buf); |
94439e4e | 217 | typedef stateful_helper_callback_t HLPSCB(void *, void *lastserver, char *buf); |
218 | typedef int HLPSAVAIL(void *); | |
219 | typedef void HLPSONEQ(void *); | |
74addf6c | 220 | typedef void HLPCMDOPTS(int *argc, char **argv); |
7b724b86 | 221 | typedef void IDNSCB(void *, rfc1035_rr *, int); |
9fb13bb6 | 222 | |
cd748f27 | 223 | typedef void STFSSHUTDOWN(void); |
d3b3ab85 | 224 | typedef SwapDir *STFSNEW(void); |
cd748f27 | 225 | |
95c297ec | 226 | typedef double hbase_f(double); |
ba4f8e5a | 227 | typedef void StatHistBinDumper(StoreEntry *, int idx, double val, double size, int count); |
adba4a64 | 228 | |
229 | /* append/vprintf's for Packer */ | |
2ac76861 | 230 | typedef void (*append_f) (void *, const char *buf, int size); |
6de2df60 | 231 | #if STDC_HEADERS |
c68e9c6b | 232 | typedef void (*vprintf_f) (void *, const char *fmt, va_list args); |
adba4a64 | 233 | #else |
2ac76861 | 234 | typedef void (*vprintf_f) (); |
adba4a64 | 235 | #endif |
236 | ||
f09f5b26 | 237 | /* MD5 cache keys */ |
6507d007 | 238 | typedef unsigned char cache_key; |
123abbe1 | 239 | |
240 | /* context-based debugging, the actual type is subject to change */ | |
241 | typedef int Ctx; | |
1a3db59c | 242 | |
243 | /* in case we want to change it later */ | |
9bc73deb | 244 | typedef ssize_t mb_size_t; |
02922e76 | 245 | |
de336bbe | 246 | /*iteration for headers; use HttpHeaderPos as opaque type, do not interpret */ |
247 | typedef ssize_t HttpHeaderPos; | |
d8b249ef | 248 | |
249 | /* big mask for http headers */ | |
250 | typedef char HttpHeaderMask[8]; | |
5d2a8c13 | 251 | |
252 | /* a common objPackInto interface; used by debugObj */ | |
0cdcddb9 | 253 | typedef void (*ObjPackMethod) (void *obj, Packer * p); |
447e176b | 254 | |
86aebcda | 255 | #if USE_HTCP |
256 | typedef struct _htcpReplyData htcpReplyData; | |
257 | #endif | |
c8366e06 | 258 | |
c1dd71ae | 259 | typedef RemovalPolicy *REMOVALPOLICYCREATE(wordlist * args); |
65a53c8e | 260 | |
261 | typedef int STDIRSELECT(const StoreEntry *); | |
262 | ||
d9572179 | 263 | typedef struct _external_acl external_acl; |
264 | typedef struct _external_acl_entry external_acl_entry; | |
265 | ||
b5638623 | 266 | #endif /* SQUID_TYPEDEFS_H */ |