2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
11 #ifndef SQUID_TYPEDEFS_H
12 #define SQUID_TYPEDEFS_H
14 typedef int32_t sfileno
;
15 typedef signed int sdirno
;
17 typedef uint32_t nfmark_t
;
18 typedef unsigned char tos_t
;
25 typedef struct _CommWriteStateData CommWriteStateData
;
28 #include "cache_snmp.h"
29 typedef variable_list
*(oid_ParseFn
) (variable_list
*, snint
*);
32 typedef void FREE(void *);
33 typedef void PF(int, void *);
35 /* disk.c / diskd.c callback typedefs */
36 typedef void DRCB(int, const char *buf
, int size
, int errflag
, void *data
);
38 typedef void DWCB(int, int, size_t, void *); /* disk write CB */
39 typedef void DOCB(int, int errflag
, void *data
); /* disk open CB */
40 typedef void DCCB(int, int errflag
, void *data
); /* disk close CB */
41 typedef void DUCB(int errflag
, void *data
); /* disk unlink CB */
47 typedef void FQDNH(const char *, const Dns::LookupDetails
&details
, void *);
49 #include "anyp/ProtocolType.h"
51 typedef void IRCB(CachePeer
*, peer_t
, AnyP::ProtocolType
, void *, void *data
);
56 typedef void UH(void *data
, wordlist
*);
59 * READ_HANDLER functions return < 0 if, and only if, they fail with an error.
60 * On error, they must pass back an error code in 'errno'.
62 typedef int READ_HANDLER(int, char *, int);
65 * WRITE_HANDLER functions return < 0 if, and only if, they fail with an error.
66 * On error, they must pass back an error code in 'errno'.
68 typedef int WRITE_HANDLER(int, const char *, int);
70 typedef int QS(const void *, const void *); /* qsort */
71 typedef void STABH(void *);
72 typedef void ERCB(int fd
, void *, size_t);
74 typedef void SIGHDLR(int sig
);
75 typedef void STVLDCB(void *, int, int);
76 typedef int HLPSAVAIL(void *);
77 typedef void HLPSONEQ(void *);
78 typedef void HLPCMDOPTS(int *argc
, char **argv
);
81 typedef unsigned char cache_key
;
83 /* in case we want to change it later */
84 typedef ssize_t mb_size_t
;
86 typedef int STDIRSELECT(const StoreEntry
*);
88 /*Use uint64_t to store miliseconds*/
89 typedef uint64_t time_msec_t
;
90 #endif /* SQUID_TYPEDEFS_H */