]> git.ipfire.org Git - thirdparty/squid.git/blob - src/typedefs.h
Summary: Merge from delay-class-4
[thirdparty/squid.git] / src / typedefs.h
1
2 /*
3 * $Id: typedefs.h,v 1.148 2003/02/05 10:36:56 robertc Exp $
4 *
5 *
6 * SQUID Web Proxy Cache http://www.squid-cache.org/
7 * ----------------------------------------------------------
8 *
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.
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
34 #include "squid.h"
35
36 #ifndef SQUID_TYPEDEFS_H
37 #define SQUID_TYPEDEFS_H
38
39 typedef unsigned int store_status_t;
40 typedef unsigned int ping_status_t;
41 typedef unsigned int swap_status_t;
42 typedef signed int sfileno;
43 typedef signed int sdirno;
44
45 typedef struct {
46 size_t bytes;
47 size_t kb;
48 } kb_t;
49
50 /*
51 * grep '^struct' structs.h \
52 * | perl -ne '($a,$b)=split;$c=$b;$c=~s/^_//; print "typedef struct $b $c;\n";'
53 */
54
55 typedef struct _acl_ip_data acl_ip_data;
56 typedef struct _acl_time_data acl_time_data;
57 typedef struct _acl_name_list acl_name_list;
58 typedef struct _acl_deny_info_list acl_deny_info_list;
59 typedef struct AuthUser auth_user_t;
60 class AuthUserRequest;
61 typedef AuthUserRequest auth_user_request_t;
62 typedef struct AuthUserHashPointer auth_user_hash_pointer;
63 typedef struct AuthUserIP auth_user_ip_t;
64 typedef struct _acl_proxy_auth_match_cache acl_proxy_auth_match_cache;
65 typedef struct _authscheme_entry authscheme_entry_t;
66 typedef struct _authScheme authScheme;
67 #if USE_SSL
68 typedef struct _acl_cert_data acl_cert_data;
69 #endif
70 typedef struct _acl_user_data acl_user_data;
71 typedef struct _acl_user_ip_data acl_user_ip_data;
72 typedef struct _acl_arp_data acl_arp_data;
73 typedef struct _acl_snmp_comm acl_snmp_comm;
74 typedef struct _acl_list acl_list;
75 class acl_access;
76 typedef struct _acl_address acl_address;
77 typedef struct _acl_tos acl_tos;
78 typedef struct _acl acl;
79 class ACLChecklist;
80 typedef struct _wordlist wordlist;
81 typedef struct _intlist intlist;
82 typedef struct _intrange intrange;
83 typedef struct _ushortlist ushortlist;
84 typedef struct _relist relist;
85 typedef struct _sockaddr_in_list sockaddr_in_list;
86 typedef struct _https_port_list https_port_list;
87 typedef struct _SquidConfig SquidConfig;
88 typedef struct _SquidConfig2 SquidConfig2;
89 typedef struct _close_handler close_handler;
90 typedef struct _dread_ctrl dread_ctrl;
91 typedef struct _dnsserver_t dnsserver_t;
92 typedef struct _dwrite_q dwrite_q;
93 typedef struct _ETag ETag;
94 class fde;
95 typedef struct _fileMap fileMap;
96 typedef struct _HttpReply http_reply;
97 typedef struct _HttpStatusLine HttpStatusLine;
98 typedef struct _HttpHeaderFieldAttrs HttpHeaderFieldAttrs;
99 typedef struct _HttpHeaderFieldInfo HttpHeaderFieldInfo;
100 typedef struct _HttpHeader HttpHeader;
101 typedef struct _HttpHdrCc HttpHdrCc;
102 typedef struct _HttpHdrSc HttpHdrSc;
103 typedef struct _HttpHdrScTarget HttpHdrScTarget;
104 typedef struct _TimeOrTag TimeOrTag;
105 typedef struct _HttpHeaderEntry HttpHeaderEntry;
106 typedef struct _HttpHeaderFieldStat HttpHeaderFieldStat;
107 typedef struct _HttpHeaderStat HttpHeaderStat;
108 typedef struct _HttpBody HttpBody;
109 typedef struct _HttpReply HttpReply;
110 typedef struct _ConnStateData ConnStateData;
111 typedef struct _ConnCloseHelperData ConnCloseHelperData;
112 typedef struct _ipcache_addrs ipcache_addrs;
113 typedef struct _domain_ping domain_ping;
114 typedef struct _domain_type domain_type;
115 typedef struct _DynPool DynPool;
116 typedef struct _Packer Packer;
117 typedef struct _StoreDigestCBlock StoreDigestCBlock;
118 typedef struct _DigestFetchState DigestFetchState;
119 typedef struct _PeerDigest PeerDigest;
120 typedef struct _peer peer;
121 typedef struct _net_db_name net_db_name;
122 typedef struct _net_db_peer net_db_peer;
123 typedef struct _netdbEntry netdbEntry;
124 typedef struct _ping_data ping_data;
125 typedef struct _ps_state ps_state;
126 typedef struct _HierarchyLogEntry HierarchyLogEntry;
127 typedef struct _pingerEchoData pingerEchoData;
128 typedef struct _pingerReplyData pingerReplyData;
129 typedef struct _icp_common_t icp_common_t;
130 typedef struct _Meta_data Meta_data;
131 typedef struct _iostats iostats;
132 class MemBuf;
133 class store_client;
134 class StoreEntry;
135 class SwapDir;
136 typedef struct _helper_flags helper_flags;
137 typedef struct _helper_stateful_flags helper_stateful_flags;
138 typedef struct _http_state_flags http_state_flags;
139 typedef struct _header_mangler header_mangler;
140 typedef struct _body_size body_size;
141 class request_t;
142 typedef struct _AccessLogEntry AccessLogEntry;
143 typedef struct _cachemgr_passwd cachemgr_passwd;
144 typedef struct _refresh_t refresh_t;
145 typedef struct _CommWriteStateData CommWriteStateData;
146 typedef struct _ErrorState ErrorState;
147 typedef struct _dlink_node dlink_node;
148 typedef struct _dlink_list dlink_list;
149 typedef struct _StatCounters StatCounters;
150 typedef struct _storeSwapLogData storeSwapLogData;
151 typedef struct _authConfig authConfig;
152 typedef struct _cacheSwap cacheSwap;
153 typedef struct _StatHist StatHist;
154 typedef struct _ClientInfo ClientInfo;
155 typedef struct _cd_guess_stats cd_guess_stats;
156 typedef struct _CacheDigest CacheDigest;
157 typedef struct _Version Version;
158 typedef struct _FwdState FwdState;
159 typedef struct _FwdServer FwdServer;
160 typedef struct _helper helper;
161 typedef struct _helper_stateful statefulhelper;
162 typedef struct _helper_server helper_server;
163 typedef struct _helper_stateful_server helper_stateful_server;
164 typedef struct _helper_request helper_request;
165 typedef struct _helper_stateful_request helper_stateful_request;
166 typedef struct _generic_cbdata generic_cbdata;
167 class storeIOState;
168 typedef struct _link_list link_list;
169 typedef struct _storefs_entry storefs_entry_t;
170 typedef struct _storerepl_entry storerepl_entry_t;
171 typedef struct _diskd_queue diskd_queue;
172 typedef struct _Logfile Logfile;
173 typedef struct _RemovalPolicy RemovalPolicy;
174 typedef struct _RemovalPolicyWalker RemovalPolicyWalker;
175 typedef struct _RemovalPurgeWalker RemovalPurgeWalker;
176 typedef struct _RemovalPolicyNode RemovalPolicyNode;
177 typedef struct _RemovalPolicySettings RemovalPolicySettings;
178 typedef struct _http_version_t http_version_t;
179
180 #if SQUID_SNMP
181 typedef variable_list *(oid_ParseFn) (variable_list *, snint *);
182 typedef struct _snmp_request_t snmp_request_t;
183 #endif
184
185 typedef void CWCB(int fd, char *, size_t size, comm_err_t flag, void *data);
186 typedef void CNCB(int fd, comm_err_t status, void *);
187 typedef void IOCB(int fd, char *, size_t size, comm_err_t flag, int xerrno, void *data);
188 typedef void IOACB(int fd, int nfd, struct sockaddr_in *me, struct sockaddr_in
189 *pn, comm_err_t flag, int xerrno, void *data);
190
191 typedef void FREE(void *);
192 typedef void CBDUNL(void *);
193 typedef void FOCB(void *, int fd, int errcode);
194 typedef void EVH(void *);
195 typedef void PF(int, void *);
196
197 /* disk.c / diskd.c callback typedefs */
198 typedef void DRCB(int, const char *buf, int size, int errflag, void *data);
199 /* Disk read CB */
200 typedef void DWCB(int, int, size_t, void *); /* disk write CB */
201 typedef void DOCB(int, int errflag, void *data); /* disk open CB */
202 typedef void DCCB(int, int errflag, void *data); /* disk close CB */
203 typedef void DUCB(int errflag, void *data); /* disk unlink CB */
204 typedef void DTCB(int errflag, void *data); /* disk trunc CB */
205
206 typedef void FQDNH(const char *, void *);
207 typedef void IDCB(const char *ident, void *data);
208 typedef void IPH(const ipcache_addrs *, void *);
209 typedef void IRCB(peer *, peer_t, protocol_t, void *, void *data);
210 typedef void PSC(FwdServer *, void *);
211 typedef void RH(void *data, char *);
212 typedef void UH(void *data, wordlist *);
213 typedef int DEFER(int fd, void *data);
214 typedef int READ_HANDLER(int, char *, int);
215 typedef int WRITE_HANDLER(int, const char *, int);
216 typedef void CBCB(char *buf, ssize_t size, void *data);
217
218 typedef void STIOCB(void *their_data, int errflag, storeIOState *);
219 typedef void STFNCB(void *their_data, int errflag, storeIOState *);
220 typedef void STRCB(void *their_data, const char *buf, ssize_t len);
221
222 typedef void SIH(storeIOState *, void *); /* swap in */
223 typedef int QS(const void *, const void *); /* qsort */
224 typedef void STABH(void *);
225 typedef void ERCB(int fd, void *, size_t);
226 typedef void OBJH(StoreEntry *);
227 typedef void SIGHDLR(int sig);
228 typedef void STVLDCB(void *, int, int);
229 typedef void HLPCB(void *, char *buf);
230 typedef stateful_helper_callback_t HLPSCB(void *, void *lastserver, char *buf);
231 typedef int HLPSAVAIL(void *);
232 typedef void HLPSONEQ(void *);
233 typedef void HLPCMDOPTS(int *argc, char **argv);
234 typedef void IDNSCB(void *, rfc1035_rr *, int);
235
236 typedef void STFSSHUTDOWN(void);
237 typedef SwapDir *STFSNEW(void);
238
239 typedef double hbase_f(double);
240 typedef void StatHistBinDumper(StoreEntry *, int idx, double val, double size, int count);
241
242 /* append/vprintf's for Packer */
243 typedef void (*append_f) (void *, const char *buf, int size);
244 #if STDC_HEADERS
245 typedef void (*vprintf_f) (void *, const char *fmt, va_list args);
246 #else
247 typedef void (*vprintf_f) ();
248 #endif
249
250 /* MD5 cache keys */
251 typedef unsigned char cache_key;
252
253 /* context-based debugging, the actual type is subject to change */
254 typedef int Ctx;
255
256 /* in case we want to change it later */
257 typedef ssize_t mb_size_t;
258
259 /*iteration for headers; use HttpHeaderPos as opaque type, do not interpret */
260 typedef ssize_t HttpHeaderPos;
261
262 /* big mask for http headers */
263 typedef char HttpHeaderMask[8];
264
265 /* a common objPackInto interface; used by debugObj */
266 typedef void (*ObjPackMethod) (void *obj, Packer * p);
267
268 #if USE_HTCP
269 typedef struct _htcpReplyData htcpReplyData;
270 #endif
271
272 typedef RemovalPolicy *REMOVALPOLICYCREATE(wordlist * args);
273
274 typedef int STDIRSELECT(const StoreEntry *);
275
276 typedef struct _external_acl external_acl;
277 typedef struct _external_acl_entry external_acl_entry;
278
279 #endif /* SQUID_TYPEDEFS_H */