]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
4ac4a490 | 2 | * Copyright (C) 1996-2017 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 | ||
4a3b98d7 | 12 | #include "dns/forward.h" |
3c670b50 | 13 | #include "ip/forward.h" |
4a3b98d7 | 14 | |
3c670b50 | 15 | class ipcache_addrs |
dc49061a | 16 | { |
3c670b50 AJ |
17 | public: |
18 | ipcache_addrs() : in_addrs(nullptr), bad_mask(nullptr), count(0), cur(0), badcount(0) {} | |
714e68b7 | 19 | |
714e68b7 AJ |
20 | Ip::Address *in_addrs; |
21 | unsigned char *bad_mask; | |
22 | unsigned char count; | |
23 | unsigned char cur; | |
24 | unsigned char badcount; | |
3c670b50 | 25 | }; |
714e68b7 | 26 | |
4a3b98d7 | 27 | typedef void IPH(const ipcache_addrs *, const Dns::LookupDetails &details, void *); |
714e68b7 | 28 | |
8a648e8d FC |
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); | |
714e68b7 AJ |
43 | |
44 | #endif /* _SQUID_IPCACHE_H */ | |
f53969cc | 45 |