3 * $Id: typedefs.h,v 1.134 2002/06/23 13:32:25 hno Exp $
6 * SQUID Web Proxy Cache http://www.squid-cache.org/
7 * ----------------------------------------------------------
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.
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.
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.
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.
34 #ifndef SQUID_TYPEDEFS_H
35 #define SQUID_TYPEDEFS_H
37 typedef unsigned int store_status_t
;
38 typedef unsigned int mem_status_t
;
39 typedef unsigned int ping_status_t
;
40 typedef unsigned int swap_status_t
;
41 typedef signed int sfileno
;
42 typedef signed int sdirno
;
50 * grep '^struct' structs.h \
51 * | perl -ne '($a,$b)=split;$c=$b;$c=~s/^_//; print "typedef struct $b $c;\n";'
54 typedef struct _acl_ip_data acl_ip_data
;
55 typedef struct _acl_time_data acl_time_data
;
56 typedef struct _acl_name_list acl_name_list
;
57 typedef struct _acl_deny_info_list acl_deny_info_list
;
58 typedef struct _auth_user_t auth_user_t
;
59 typedef struct _auth_user_request_t auth_user_request_t
;
60 typedef struct _auth_user_hash_pointer auth_user_hash_pointer
;
61 typedef struct _auth_user_ip_t auth_user_ip_t
;
62 typedef struct _acl_proxy_auth_match_cache acl_proxy_auth_match_cache
;
63 typedef struct _authscheme_entry authscheme_entry_t
;
64 typedef struct _authScheme authScheme
;
65 typedef struct _acl_user_data acl_user_data
;
66 typedef struct _acl_user_ip_data acl_user_ip_data
;
67 typedef struct _acl_arp_data acl_arp_data
;
68 typedef struct _acl acl
;
69 typedef struct _acl_snmp_comm acl_snmp_comm
;
70 typedef struct _acl_list acl_list
;
71 typedef struct _acl_access acl_access
;
72 typedef struct _acl_address acl_address
;
73 typedef struct _acl_tos acl_tos
;
74 typedef struct _aclCheck_t aclCheck_t
;
75 typedef struct _wordlist wordlist
;
76 typedef struct _intlist intlist
;
77 typedef struct _intrange intrange
;
78 typedef struct _ushortlist ushortlist
;
79 typedef struct _relist relist
;
80 typedef struct _sockaddr_in_list sockaddr_in_list
;
81 typedef struct _https_port_list https_port_list
;
82 typedef struct _SquidConfig SquidConfig
;
83 typedef struct _SquidConfig2 SquidConfig2
;
84 typedef struct _close_handler close_handler
;
85 typedef struct _dread_ctrl dread_ctrl
;
86 typedef struct _dnsserver_t dnsserver_t
;
87 typedef struct _dwrite_q dwrite_q
;
88 typedef struct _ETag ETag
;
89 typedef struct _fde fde
;
90 typedef struct _fileMap fileMap
;
91 typedef struct _HttpReply http_reply
;
92 typedef struct _HttpStatusLine HttpStatusLine
;
93 typedef struct _HttpHeaderFieldAttrs HttpHeaderFieldAttrs
;
94 typedef struct _HttpHeaderFieldInfo HttpHeaderFieldInfo
;
95 typedef struct _HttpHeader HttpHeader
;
96 typedef struct _HttpHdrCc HttpHdrCc
;
97 typedef struct _HttpHdrRangeSpec HttpHdrRangeSpec
;
98 typedef struct _HttpHdrRange HttpHdrRange
;
99 typedef struct _HttpHdrRangeIter HttpHdrRangeIter
;
100 typedef struct _HttpHdrContRange HttpHdrContRange
;
101 typedef struct _TimeOrTag TimeOrTag
;
102 typedef struct _HttpHeaderEntry HttpHeaderEntry
;
103 typedef struct _HttpHeaderFieldStat HttpHeaderFieldStat
;
104 typedef struct _HttpHeaderStat HttpHeaderStat
;
105 typedef struct _HttpBody HttpBody
;
106 typedef struct _HttpReply HttpReply
;
107 typedef struct _HttpStateData HttpStateData
;
108 typedef struct _icpUdpData icpUdpData
;
109 typedef struct _clientHttpRequest clientHttpRequest
;
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 typedef struct _MemBuf MemBuf
;
133 typedef struct _mem_node mem_node
;
134 typedef struct _mem_hdr mem_hdr
;
135 typedef struct _store_client store_client
;
136 typedef struct _MemObject MemObject
;
137 typedef struct _StoreEntry StoreEntry
;
138 typedef struct _SwapDir SwapDir
;
139 typedef struct _request_flags request_flags
;
140 typedef struct _helper_flags helper_flags
;
141 typedef struct _helper_stateful_flags helper_stateful_flags
;
142 typedef struct _http_state_flags http_state_flags
;
143 typedef struct _header_mangler header_mangler
;
144 typedef struct _body_size body_size
;
145 typedef struct _request_t request_t
;
146 typedef struct _AccessLogEntry AccessLogEntry
;
147 typedef struct _cachemgr_passwd cachemgr_passwd
;
148 typedef struct _refresh_t refresh_t
;
149 typedef struct _CommWriteStateData CommWriteStateData
;
150 typedef struct _ErrorState ErrorState
;
151 typedef struct _dlink_node dlink_node
;
152 typedef struct _dlink_list dlink_list
;
153 typedef struct _StatCounters StatCounters
;
154 typedef struct _tlv tlv
;
155 typedef struct _storeSwapLogData storeSwapLogData
;
156 typedef struct _authConfig authConfig
;
157 typedef struct _cacheSwap cacheSwap
;
158 typedef struct _StatHist StatHist
;
159 typedef struct _String String
;
160 typedef struct _ClientInfo ClientInfo
;
161 typedef struct _cd_guess_stats cd_guess_stats
;
162 typedef struct _CacheDigest CacheDigest
;
163 typedef struct _Version Version
;
164 typedef struct _FwdState FwdState
;
165 typedef struct _FwdServer FwdServer
;
166 typedef struct _helper helper
;
167 typedef struct _helper_stateful statefulhelper
;
168 typedef struct _helper_server helper_server
;
169 typedef struct _helper_stateful_server helper_stateful_server
;
170 typedef struct _helper_request helper_request
;
171 typedef struct _helper_stateful_request helper_stateful_request
;
172 typedef struct _generic_cbdata generic_cbdata
;
173 typedef struct _storeIOState storeIOState
;
174 typedef struct _queued_read queued_read
;
175 typedef struct _queued_write queued_write
;
176 typedef struct _link_list link_list
;
177 typedef struct _storefs_entry storefs_entry_t
;
178 typedef struct _storerepl_entry storerepl_entry_t
;
179 typedef struct _diskd_queue diskd_queue
;
180 typedef struct _Logfile Logfile
;
181 typedef struct _RemovalPolicy RemovalPolicy
;
182 typedef struct _RemovalPolicyWalker RemovalPolicyWalker
;
183 typedef struct _RemovalPurgeWalker RemovalPurgeWalker
;
184 typedef struct _RemovalPolicyNode RemovalPolicyNode
;
185 typedef struct _RemovalPolicySettings RemovalPolicySettings
;
187 typedef struct _http_version_t http_version_t
;
190 typedef variable_list
*(oid_ParseFn
) (variable_list
*, snint
*);
191 typedef struct _snmp_request_t snmp_request_t
;
195 typedef struct _delayConfig delayConfig
;
196 typedef struct _delaySpecSet delaySpecSet
;
197 typedef struct _delaySpec delaySpec
;
200 typedef void CWCB(int fd
, char *, size_t size
, int flag
, void *data
);
201 typedef void CNCB(int fd
, int status
, void *);
203 typedef void FREE(void *);
204 typedef void CBDUNL(void *);
205 typedef void FOCB(void *, int fd
, int errcode
);
206 typedef void EVH(void *);
207 typedef void PF(int, void *);
209 /* disk.c / diskd.c callback typedefs */
210 typedef void DRCB(int, const char *buf
, int size
, int errflag
, void *data
);
212 typedef void DWCB(int, int, size_t, void *); /* disk write CB */
213 typedef void DOCB(int, int errflag
, void *data
); /* disk open CB */
214 typedef void DCCB(int, int errflag
, void *data
); /* disk close CB */
215 typedef void DUCB(int errflag
, void *data
); /* disk unlink CB */
216 typedef void DTCB(int errflag
, void *data
); /* disk trunc CB */
218 typedef void FQDNH(const char *, void *);
219 typedef void IDCB(const char *ident
, void *data
);
220 typedef void IPH(const ipcache_addrs
*, void *);
221 typedef void IRCB(peer
*, peer_t
, protocol_t
, void *, void *data
);
222 typedef void PSC(FwdServer
*, void *);
223 typedef void RH(void *data
, char *);
224 typedef void UH(void *data
, wordlist
*);
225 typedef int DEFER(int fd
, void *data
);
226 typedef int READ_HANDLER(int, char *, int);
227 typedef int WRITE_HANDLER(int, const char *, int);
228 typedef void CBCB(char *buf
, size_t size
, void *data
);
230 typedef void STIOCB(void *their_data
, int errflag
, storeIOState
*);
231 typedef void STFNCB(void *their_data
, int errflag
, storeIOState
*);
232 typedef void STRCB(void *their_data
, const char *buf
, ssize_t len
);
234 typedef void SIH(storeIOState
*, void *); /* swap in */
235 typedef int QS(const void *, const void *); /* qsort */
236 typedef void STCB(void *, char *, ssize_t
); /* store callback */
237 typedef void STABH(void *);
238 typedef void ERCB(int fd
, void *, size_t);
239 typedef void OBJH(StoreEntry
*);
240 typedef void SIGHDLR(int sig
);
241 typedef void STVLDCB(void *, int, int);
242 typedef void HLPCB(void *, char *buf
);
243 typedef stateful_helper_callback_t
HLPSCB(void *, void *lastserver
, char *buf
);
244 typedef int HLPSAVAIL(void *);
245 typedef void HLPSONEQ(void *);
246 typedef void HLPCMDOPTS(int *argc
, char **argv
);
247 typedef void IDNSCB(void *, rfc1035_rr
*, int);
249 typedef void STINIT(SwapDir
*);
250 typedef void STNEWFS(SwapDir
*);
251 typedef void STDUMP(StoreEntry
*, SwapDir
*);
252 typedef void STFREE(SwapDir
*);
253 typedef int STDBLCHECK(SwapDir
*, StoreEntry
*);
254 typedef void STSTATFS(SwapDir
*, StoreEntry
*);
255 typedef void STMAINTAINFS(SwapDir
*);
256 typedef int STCHECKOBJ(SwapDir
*, const StoreEntry
*);
257 typedef void STREFOBJ(SwapDir
*, StoreEntry
*);
258 typedef void STUNREFOBJ(SwapDir
*, StoreEntry
*);
259 typedef void STSETUP(storefs_entry_t
*);
260 typedef void STDONE(void);
261 typedef int STCALLBACK(SwapDir
*);
262 typedef void STSYNC(SwapDir
*);
264 typedef storeIOState
*STOBJCREATE(SwapDir
*, StoreEntry
*, STFNCB
*, STIOCB
*, void *);
265 typedef storeIOState
*STOBJOPEN(SwapDir
*, StoreEntry
*, STFNCB
*, STIOCB
*, void *);
266 typedef void STOBJCLOSE(SwapDir
*, storeIOState
*);
267 typedef void STOBJREAD(SwapDir
*, storeIOState
*, char *, size_t, off_t
, STRCB
*, void *);
268 typedef void STOBJWRITE(SwapDir
*, storeIOState
*, char *, size_t, off_t
, FREE
*);
269 typedef void STOBJUNLINK(SwapDir
*, StoreEntry
*);
271 typedef void STLOGOPEN(SwapDir
*);
272 typedef void STLOGCLOSE(SwapDir
*);
273 typedef void STLOGWRITE(const SwapDir
*, const StoreEntry
*, int);
274 typedef int STLOGCLEANSTART(SwapDir
*);
275 typedef const StoreEntry
*STLOGCLEANNEXTENTRY(SwapDir
*);
276 typedef void STLOGCLEANWRITE(SwapDir
*, const StoreEntry
*);
277 typedef void STLOGCLEANDONE(SwapDir
*);
279 /* Store dir configuration routines */
280 /* SwapDir *sd, char *path ( + char *opt later when the strtok mess is gone) */
281 typedef void STFSPARSE(SwapDir
*, int, char *);
282 typedef void STFSRECONFIGURE(SwapDir
*, int, char *);
283 typedef void STFSSTARTUP(void);
284 typedef void STFSSHUTDOWN(void);
286 typedef double hbase_f(double);
287 typedef void StatHistBinDumper(StoreEntry
*, int idx
, double val
, double size
, int count
);
289 /* authenticate.c authenticate scheme routines typedefs */
290 typedef int AUTHSACTIVE(void);
291 typedef int AUTHSAUTHED(auth_user_request_t
*);
292 typedef void AUTHSAUTHUSER(auth_user_request_t
*, request_t
*, ConnStateData
*, http_hdr_type
);
293 typedef int AUTHSCONFIGURED(void);
294 typedef void AUTHSDECODE(auth_user_request_t
*, const char *);
295 typedef int AUTHSDIRECTION(auth_user_request_t
*);
296 typedef void AUTHSDUMP(StoreEntry
*, const char *, authScheme
*);
297 typedef void AUTHSFIXERR(auth_user_request_t
*, HttpReply
*, http_hdr_type
, request_t
*);
298 typedef void AUTHSADDHEADER(auth_user_request_t
*, HttpReply
*, int);
299 typedef void AUTHSADDTRAILER(auth_user_request_t
*, HttpReply
*, int);
300 typedef void AUTHSFREE(auth_user_t
*);
301 typedef void AUTHSFREECONFIG(authScheme
*);
302 typedef char *AUTHSUSERNAME(auth_user_t
*);
303 typedef void AUTHSONCLOSEC(ConnStateData
*);
304 typedef void AUTHSPARSE(authScheme
*, int, char *);
305 typedef void AUTHSINIT(authScheme
*);
306 typedef void AUTHSREQFREE(auth_user_request_t
*);
307 typedef void AUTHSSETUP(authscheme_entry_t
*);
308 typedef void AUTHSSHUTDOWN(void);
309 typedef void AUTHSSTART(auth_user_request_t
*, RH
*, void *);
310 typedef void AUTHSSTATS(StoreEntry
*);
311 typedef const char *AUTHSCONNLASTHEADER(auth_user_request_t
*);
313 /* append/vprintf's for Packer */
314 typedef void (*append_f
) (void *, const char *buf
, int size
);
316 typedef void (*vprintf_f
) (void *, const char *fmt
, va_list args
);
318 typedef void (*vprintf_f
) ();
322 typedef unsigned char cache_key
;
324 /* context-based debugging, the actual type is subject to change */
327 /* in case we want to change it later */
328 typedef ssize_t mb_size_t
;
330 /* iteration for HttpHdrRange */
331 typedef int HttpHdrRangePos
;
333 /*iteration for headers; use HttpHeaderPos as opaque type, do not interpret */
334 typedef ssize_t HttpHeaderPos
;
336 /* big mask for http headers */
337 typedef char HttpHeaderMask
[8];
339 /* a common objPackInto interface; used by debugObj */
340 typedef void (*ObjPackMethod
) (void *obj
, Packer
* p
);
343 typedef unsigned int delay_id
;
347 typedef struct _htcpReplyData htcpReplyData
;
350 typedef RemovalPolicy
*REMOVALPOLICYCREATE(wordlist
* args
);
352 typedef int STDIRSELECT(const StoreEntry
*);
354 typedef struct _external_acl external_acl
;
355 typedef struct _external_acl_entry external_acl_entry
;
357 #endif /* SQUID_TYPEDEFS_H */