]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ipcache.h
Fix rev.13879
[thirdparty/squid.git] / src / ipcache.h
CommitLineData
bbc27441 1/*
bde978a6 2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
bbc27441
AJ
3 *
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.
7 */
8
714e68b7
AJ
9#ifndef _SQUID_IPCACHE_H
10#define _SQUID_IPCACHE_H
11
dc49061a
A
12namespace Ip
13{
714e68b7
AJ
14class Address;
15}
16
17class DnsLookupDetails;
18
19typedef struct _ipcache_addrs {
20 Ip::Address *in_addrs;
21 unsigned char *bad_mask;
22 unsigned char count;
23 unsigned char cur;
24 unsigned char badcount;
25} ipcache_addrs;
26
27typedef void IPH(const ipcache_addrs *, const DnsLookupDetails &details, void *);
28
8a648e8d
FC
29void ipcache_purgelru(void *);
30void ipcache_nbgethostbyname(const char *name, IPH * handler, void *handlerData);
31const ipcache_addrs *ipcache_gethostbyname(const char *, int flags);
32void ipcacheInvalidate(const char *);
33void ipcacheInvalidateNegative(const char *);
34void ipcache_init(void);
35void ipcacheCycleAddr(const char *name, ipcache_addrs *);
36void ipcacheMarkBadAddr(const char *name, const Ip::Address &);
37void ipcacheMarkGoodAddr(const char *name, const Ip::Address &);
38void ipcacheMarkAllGood(const char *name);
39void ipcacheFreeMemory(void);
40ipcache_addrs *ipcacheCheckNumeric(const char *name);
41void ipcache_restart(void);
42int ipcacheAddEntryFromHosts(const char *name, const char *ipaddr);
714e68b7
AJ
43
44#endif /* _SQUID_IPCACHE_H */
f53969cc 45