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