Collaboration diagram for FQDN Cache API:

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_listsnmp_netFqdnFn (variable_list *Var, snint *ErrP)
 

Detailed Description

Introduction

The FQDN cache is a built-in component of squid providing Hostname to IP-Number translation functionality and managing the involved data-structures. Efficiency concerns require mechanisms that allow non-blocking access to these mappings. The FQDN cache usually doesn't block on a request except for special cases where this is desired (see below).

Function Documentation

◆ fqdncache_gethostbyaddr()

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.

Parameters
addraddress of the FQDN being resolved
flagsvalues 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().

◆ fqdncache_init()

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().

◆ fqdncache_nbgethostbyaddr()

void fqdncache_nbgethostbyaddr ( const Ip::Address addr,
FQDNH handler,
void *  handlerData 
)

◆ fqdncache_purgelru()

◆ fqdncache_restart()

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().

◆ fqdncacheHandleReply()

static void fqdncacheHandleReply ( void *  data,
const rfc1035_rr answers,
int  na,
const char *  error_message,
const bool  lastAnswer 
)
static

◆ purge_entries_fromhosts()

static void purge_entries_fromhosts ( void  )
static

◆ snmp_netFqdnFn()

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors