]> git.ipfire.org Git - thirdparty/squid.git/blob - src/typedefs.h
merge from trunk r12441
[thirdparty/squid.git] / src / typedefs.h
1 /*
2 *
3 * SQUID Web Proxy Cache http://www.squid-cache.org/
4 * ----------------------------------------------------------
5 *
6 * Squid is the result of efforts by numerous individuals from
7 * the Internet community; see the CONTRIBUTORS file for full
8 * details. Many organizations have provided support for Squid's
9 * development; see the SPONSORS file for full details. Squid is
10 * Copyrighted (C) 2001 by the Regents of the University of
11 * California; see the COPYRIGHT file for full details. Squid
12 * incorporates software developed and/or copyrighted by other
13 * sources; see the CREDITS file for full details.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
28 *
29 */
30
31 #include "enums.h"
32 #include "rfc1035.h"
33
34 #ifndef SQUID_TYPEDEFS_H
35 #define SQUID_TYPEDEFS_H
36
37 typedef int32_t sfileno;
38 typedef signed int sdirno;
39
40 typedef uint32_t nfmark_t;
41 typedef unsigned char tos_t;
42
43 typedef struct {
44 size_t bytes;
45 size_t kb;
46 } kb_t;
47
48 typedef struct _CommWriteStateData CommWriteStateData;
49
50 #if SQUID_SNMP
51 #include "snmp_vars.h"
52 #include "cache_snmp.h"
53 typedef variable_list *(oid_ParseFn) (variable_list *, snint *);
54 #endif
55
56 typedef void FREE(void *);
57 typedef void CBDUNL(void *);
58 typedef void FOCB(void *, int fd, int errcode);
59 typedef void PF(int, void *);
60
61 /* disk.c / diskd.c callback typedefs */
62 typedef void DRCB(int, const char *buf, int size, int errflag, void *data);
63 /* Disk read CB */
64 typedef void DWCB(int, int, size_t, void *); /* disk write CB */
65 typedef void DOCB(int, int errflag, void *data); /* disk open CB */
66 typedef void DCCB(int, int errflag, void *data); /* disk close CB */
67 typedef void DUCB(int errflag, void *data); /* disk unlink CB */
68 typedef void DTCB(int errflag, void *data); /* disk trunc CB */
69
70 class DnsLookupDetails;
71 typedef void FQDNH(const char *, const DnsLookupDetails &details, void *);
72 typedef void IDCB(const char *ident, void *data);
73
74 #include "anyp/ProtocolType.h"
75 class CachePeer;
76 typedef void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data);
77
78 /* in wordlist.h */
79
80 class wordlist;
81 typedef void UH(void *data, wordlist *);
82 typedef int READ_HANDLER(int, char *, int);
83 typedef int WRITE_HANDLER(int, const char *, int);
84
85 typedef int QS(const void *, const void *); /* qsort */
86 typedef void STABH(void *);
87 typedef void ERCB(int fd, void *, size_t);
88 class StoreEntry;
89 typedef void OBJH(StoreEntry *);
90 typedef void SIGHDLR(int sig);
91 typedef void STVLDCB(void *, int, int);
92 typedef int HLPSAVAIL(void *);
93 typedef void HLPSONEQ(void *);
94 typedef void HLPCMDOPTS(int *argc, char **argv);
95 typedef void IDNSCB(void *, const rfc1035_rr *, int, const char *);
96
97 /* MD5 cache keys */
98 typedef unsigned char cache_key;
99
100 /* in case we want to change it later */
101 typedef ssize_t mb_size_t;
102
103 typedef int STDIRSELECT(const StoreEntry *);
104
105 /*Use uint64_t to store miliseconds*/
106 typedef uint64_t time_msec_t;
107 #endif /* SQUID_TYPEDEFS_H */