#include "squid.h"
#include "CacheManager.h"
#include "cbdata.h"
#include "debug/Messages.h"
#include "dlink.h"
#include "dns/LookupDetails.h"
#include "dns/rfc3596.h"
#include "event.h"
#include "ip/Address.h"
#include "ip/tools.h"
#include "ipcache.h"
#include "mgr/Registration.h"
#include "snmp_agent.h"
#include "SquidConfig.h"
#include "StatCounters.h"
#include "Store.h"
#include "util.h"
#include "wordlist.h"
#include "snmp_core.h"
Go to the source code of this file.
Classes | |
class | RrSpecs< Content > |
metadata for parsing DNS A and AAAA records More... | |
class | IpCacheLookupForwarder |
forwards non-blocking IP cache lookup results to either IPH or IpReciever More... | |
struct | IpCacheLookupForwarder::firstLookupStart |
time of the idnsALookup() call More... | |
struct | IpCacheLookupForwarder::lastLookupEnd |
time of the last noteLookup() call More... | |
class | ipcache_entry |
struct | ipcache_entry::Flags |
struct | _ipcache_stats |
Functions | |
static void | stat_ipcache_get (StoreEntry *) |
static int | ipcacheExpiredEntry (ipcache_entry *i) |
static ipcache_entry * | ipcache_get (const char *name) |
static void | ipcacheLockEntry (ipcache_entry *i) |
static void | ipcacheStatPrint (ipcache_entry *i, StoreEntry *sentry) |
static void | ipcacheUnlockEntry (ipcache_entry *i) |
static void | ipcacheRelease (ipcache_entry *, bool dofree=true) |
static const Dns::CachedIps * | ipcacheCheckNumeric (const char *name) |
static void | ipcache_nbgethostbyname_ (const char *name, IpCacheLookupForwarder handler) |
implements ipcache_nbgethostbyname() and Dns::nbgethostbyname() APIs More... | |
int | ipcacheCount () |
void | ipcache_purgelru (void *) |
static void | purge_entries_fromhosts (void) |
static void | ipcacheAddEntry (ipcache_entry *i) |
static void | ipcacheCallback (ipcache_entry *i, const bool hit, const int wait) |
static void | ipcacheParse (ipcache_entry *i, const rfc1035_rr *answers, int nr, const char *error_message) |
static void | ipcacheHandleReply (void *data, const rfc1035_rr *answers, int na, const char *error_message, const bool lastAnswer) |
void | ipcache_nbgethostbyname (const char *name, IPH *handler, void *handlerData) |
static void | ipcacheRegisterWithCacheManager (void) |
void | ipcache_init (void) |
const ipcache_addrs * | ipcache_gethostbyname (const char *name, int flags) |
void | ipcacheInvalidate (const char *name) |
void | ipcacheInvalidateNegative (const char *name) |
void | ipcacheMarkBadAddr (const char *name, const Ip::Address &addr) |
void | ipcacheMarkGoodAddr (const char *name, const Ip::Address &addr) |
static void | ipcacheFreeEntry (void *data) |
void | ipcache_restart (void) |
int | ipcacheAddEntryFromHosts (const char *name, const char *ipaddr) |
variable_list * | snmp_netIpFn (variable_list *Var, snint *ErrP) |
Variables | |
static struct _ipcache_stats | IpcacheStats |
static dlink_list | lru_list |
static FREE | ipcacheFreeEntry |
static IDNSCB | ipcacheHandleReply |
static hash_table * | ip_table = nullptr |
static long | ipcache_low = 180 |
static long | ipcache_high = 200 |
Function Documentation
◆ ipcache_nbgethostbyname_()
|
static |
Definition at line 623 of file ipcache.cc.
References debugs, ipcache_entry::flags, ipcache_entry::handler, handler(), ipcache_entry::hash, hashKeyStr(), _ipcache_stats::hits, idnsALookup(), _ipcache_stats::invalid, ipcache_get(), ipcacheCallback(), ipcacheCheckNumeric(), ipcacheExpiredEntry(), ipcacheHandleReply, ipcacheRelease(), IpcacheStats, IpCacheLookupForwarder::lookupsStarting(), _ipcache_stats::misses, _ipcache_stats::negative_hits, ipcache_entry::Flags::negcached, _ipcache_stats::numeric_hits, and _ipcache_stats::requests.
Referenced by ipcache_nbgethostbyname(), and Dns::nbgethostbyname().
◆ ipcacheMarkBadAddr()
void ipcacheMarkBadAddr | ( | const char * | name, |
const Ip::Address & | addr | ||
) |
Marks the given address as BAD. Does nothing if the domain name does not exist.
- Parameters
-
name domain name to have an IP marked bad addr specific address to be marked bad
Definition at line 1066 of file ipcache.cc.
References ipcache_get().
Referenced by Comm::ConnOpener::sendAnswer().
◆ ipcacheParse()
|
static |
Definition at line 465 of file ipcache.cc.
References ipcache_entry::addGood(), assert, debugs, Ip::EnableIpv6, IpcacheStats, ipcache_entry::latestError(), ipcache_entry::name(), RFC1035_TYPE_A, RFC1035_TYPE_AAAA, RFC1035_TYPE_CNAME, _ipcache_stats::rr_a, _ipcache_stats::rr_aaaa, _ipcache_stats::rr_cname, and ipcache_entry::sawCname.
Referenced by ipcacheHandleReply().
Variable Documentation
◆ ipcacheFreeEntry
|
static |
Definition at line 194 of file ipcache.cc.
Referenced by ipcacheRelease().
◆ ipcacheHandleReply
|
static |
Definition at line 195 of file ipcache.cc.
Referenced by ipcache_nbgethostbyname_().