|
Squid Web Cache v8/master
|
Modules | |
| FQDN Cache Internals | |
Functions | |
| void | fqdncache_purgelru (void *) |
| static void | purge_entries_fromhosts (void) |
| static void | fqdncacheHandleReply (void *data, const rfc1035_rr *answers, int na, const char *error_message, const bool lastAnswer) |
| void | fqdncache_nbgethostbyaddr (const Ip::Address &addr, FQDNH *handler, void *handlerData) |
| const char * | fqdncache_gethostbyaddr (const Ip::Address &addr, int flags) |
| void | fqdncache_restart (void) |
| void | fqdncache_init (void) |
| variable_list * | snmp_netFqdnFn (variable_list *Var, snint *ErrP) |
| const char * fqdncache_gethostbyaddr | ( | const Ip::Address & | addr, |
| int | flags | ||
| ) |
Is different in that it only checks if an entry exists in it's data-structures and does not by default contact the DNS, unless this is requested, by setting the flags to FQDN_LOOKUP_IF_MISS.
| addr | address of the FQDN being resolved |
| flags | values are NULL or FQDN_LOOKUP_IF_MISS. default is NULL. |
Definition at line 481 of file fqdncache.cc.
References debugs, fqdncache_entry::flags, FQDN_LOOKUP_IF_MISS, fqdncache_get(), fqdncache_nbgethostbyaddr(), fqdncacheExpiredEntry(), fqdncacheRelease(), FqdncacheStats, _fqdn_cache_stats::hits, Ip::Address::isAnyAddr(), Ip::Address::isNoAddr(), fqdncache_entry::lastref, MAX_IPSTRLEN, _fqdn_cache_stats::misses, fqdncache_entry::names, _fqdn_cache_stats::negative_hits, fqdncache_entry::Flags::negcached, _fqdn_cache_stats::requests, squid_curtime, and Ip::Address::toStr().
Referenced by clientdbDump(), AccessLogEntry::getLogClientFqdn(), Acl::DestinationDomainCheck::match(), Acl::SourceDomainCheck::match(), and ConnStateData::whenClientIpKnown().
| void fqdncache_init | ( | void | ) |
Initialize the fqdncache. Called after IP cache initialization.
Definition at line 685 of file fqdncache.cc.
References Config, debugs, FQDN_HIGH_WATER, FQDN_LOW_WATER, fqdn_table, SquidConfig::fqdncache, fqdncache_high, fqdncache_low, fqdncacheRegisterWithCacheManager(), FqdncacheStats, hash4, hash_create(), hashPrime(), lru_list, and SquidConfig::size.
Referenced by mainInitialize().
| void fqdncache_nbgethostbyaddr | ( | const Ip::Address & | addr, |
| FQDNH * | handler, | ||
| void * | handlerData | ||
| ) |
| addr | IP address of domain to resolve. |
| handler | A pointer to the function to be called when the reply from the FQDN cache (or the DNS if the FQDN cache misses) |
| handlerData | Information that is passed to the handler and does not affect the FQDN cache. |
Definition at line 414 of file fqdncache.cc.
References cbdataReference, current_time, debugs, fqdncache_entry::flags, fqdncache_get(), fqdncacheCallback(), fqdncacheExpiredEntry(), fqdncacheHandleReply, fqdncacheRelease(), FqdncacheStats, fqdncache_entry::handler, fqdncache_entry::handlerData, _fqdn_cache_stats::hits, idnsPTRLookup(), MAX_IPSTRLEN, _fqdn_cache_stats::misses, _fqdn_cache_stats::negative_hits, fqdncache_entry::Flags::negcached, fqdncache_entry::request_time, _fqdn_cache_stats::requests, and Ip::Address::toStr().
Referenced by fqdncache_gethostbyaddr(), StartLookup(), and StartLookup().
| void fqdncache_purgelru | ( | void * | ) |
Definition at line 200 of file fqdncache.cc.
References dlink_node::data, debugs, eventAdd(), fqdncache_low, fqdncache_purgelru(), fqdncacheCount(), fqdncacheRelease(), fqdncache_entry::locks, lru_list, dlink_node::prev, and dlink_list::tail.
Referenced by fqdncache_purgelru(), and mainInitialize().
| void fqdncache_restart | ( | void | ) |
Recalculate FQDN cache size upon reconfigure. Is called to clear the FQDN cache's data structures, cancel all pending requests.
Definition at line 620 of file fqdncache.cc.
References Config, FQDN_HIGH_WATER, FQDN_LOW_WATER, SquidConfig::fqdncache, fqdncache_high, fqdncache_low, purge_entries_fromhosts(), and SquidConfig::size.
Referenced by mainReconfigureFinish().
|
static |
Callback for handling DNS results.
Definition at line 390 of file fqdncache.cc.
References fqdncache_entry::age(), assert, StatHist::count(), StatCounters::dns, fqdncacheAddEntry(), fqdncacheCallback(), fqdncacheParse(), FqdncacheStats, _fqdn_cache_stats::replies, statCounter, and StatCounters::svcTime.
|
static |
Definition at line 229 of file fqdncache.cc.
References dlink_node::data, fqdncache_entry::flags, fqdncacheRelease(), fqdncache_entry::Flags::fromhosts, dlink_list::head, lru_list, and dlink_node::next.
Referenced by fqdncache_restart(), and ipcache_restart().
| variable_list * snmp_netFqdnFn | ( | variable_list * | Var, |
| snint * | ErrP | ||
| ) |
The function to return the FQDN statistics via SNMP
Definition at line 716 of file fqdncache.cc.
References debugs, FQDN_ENT, FQDN_GHBN, FQDN_HITS, FQDN_MISS, FQDN_NEGHIT, FQDN_PENDHIT, FQDN_REQ, fqdncacheCount(), FqdncacheStats, _fqdn_cache_stats::hits, LEN_SQ_NET, _fqdn_cache_stats::misses, variable_list::name, variable_list::name_length, _fqdn_cache_stats::negative_hits, _fqdn_cache_stats::requests, SMI_COUNTER32, SMI_GAUGE32, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, snmp_var_new_integer(), and snmpDebugOid().
Referenced by snmpInit().