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