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