]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ipcache.h
2 * Copyright (C) 1996-2016 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.
9 #ifndef _SQUID_IPCACHE_H
10 #define _SQUID_IPCACHE_H
12 #include "dns/forward.h"
13 #include "ip/forward.h"
18 ipcache_addrs() : in_addrs(nullptr), bad_mask(nullptr), count(0), cur(0), badcount(0) {}
20 Ip::Address
*in_addrs
;
21 unsigned char *bad_mask
;
24 unsigned char badcount
;
27 typedef void IPH(const ipcache_addrs
*, const Dns::LookupDetails
&details
, void *);
29 void ipcache_purgelru(void *);
30 void ipcache_nbgethostbyname(const char *name
, IPH
* handler
, void *handlerData
);
31 const ipcache_addrs
*ipcache_gethostbyname(const char *, int flags
);
32 void ipcacheInvalidate(const char *);
33 void ipcacheInvalidateNegative(const char *);
34 void ipcache_init(void);
35 void ipcacheCycleAddr(const char *name
, ipcache_addrs
*);
36 void ipcacheMarkBadAddr(const char *name
, const Ip::Address
&);
37 void ipcacheMarkGoodAddr(const char *name
, const Ip::Address
&);
38 void ipcacheMarkAllGood(const char *name
);
39 void ipcacheFreeMemory(void);
40 ipcache_addrs
*ipcacheCheckNumeric(const char *name
);
41 void ipcache_restart(void);
42 int ipcacheAddEntryFromHosts(const char *name
, const char *ipaddr
);
44 #endif /* _SQUID_IPCACHE_H */