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 fqdncacheFreeMemory (void)
 
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).
Todo:
FQDN Cache should have its own API *.h file.

Function Documentation

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 482 of file fqdncache.cc.

References 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, NULL, _fqdn_cache_stats::requests, squid_curtime, and Ip::Address::toStr().

Referenced by Format::Format::assemble(), clientdbDump(), ACLSourceDomainStrategy::match(), ACLDestinationDomainStrategy::match(), Log::Format::SquidIcap(), and ConnStateData::whenClientIpKnown().

void fqdncache_init ( void  )

Initialize the fqdncache. Called after IP cache initialization.

Definition at line 700 of file fqdncache.cc.

References Config, debugs, FQDN_HIGH_WATER, FQDN_LOW_WATER, SquidConfig::fqdncache, fqdncache_high, fqdncache_low, fqdncacheRegisterWithCacheManager(), FqdncacheStats, hash4, hash_create(), hashPrime(), and SquidConfig::size.

Referenced by mainInitialize().

void fqdncache_nbgethostbyaddr ( const Ip::Address addr,
FQDNH handler,
void *  handlerData 
)
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 635 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().

void fqdncacheFreeMemory ( void  )

Definition at line 620 of file fqdncache.cc.

References fqdncacheFreeEntry, hashFreeItems(), hashFreeMemory(), and NULL.

Referenced by SquidShutdown().

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors