Collaboration diagram for FQDN Cache Internals:

Classes

struct  _fqdn_cache_stats
 

Macros

#define FQDN_LOW_WATER   90
 
#define FQDN_HIGH_WATER   95
 

Functions

int fqdncacheCount ()
 
static void fqdncacheRelease (fqdncache_entry *)
 
static fqdncache_entryfqdncache_get (const char *)
 
static int fqdncacheExpiredEntry (const fqdncache_entry *f)
 
static void fqdncacheAddEntry (fqdncache_entry *f)
 
static void fqdncacheCallback (fqdncache_entry *, int wait)
 
static int fqdncacheParse (fqdncache_entry *f, const rfc1035_rr *answers, int nr, const char *error_message)
 
void fqdnStats (StoreEntry *sentry)
 
static void fqdncacheLockEntry (fqdncache_entry *f)
 
static void fqdncacheUnlockEntry (fqdncache_entry *f)
 
static void fqdncacheRegisterWithCacheManager (void)
 

Variables

static struct _fqdn_cache_stats FqdncacheStats
 
static dlink_list lru_list
 
static hash_tablefqdn_table = nullptr
 
static long fqdncache_low = 180
 
static long fqdncache_high = 200
 

Detailed Description

Internally, the execution flow is as follows: On a miss, fqdncache_nbgethostbyaddr() checks whether a request for this name is already pending, and if positive, it creates a new entry using fqdncacheAddEntry(). Then it calls fqdncacheAddPending() to add a request to the queue together with data and handler. Else, ifqdncache_dnsDispatch() is called to directly create a DNS query or to fqdncacheEnqueue() if all no DNS port is free.
fqdncacheCallback() is called regularly to walk down the pending list and call handlers.
LRU clean-up is performed through fqdncache_purgelru() according to the fqdncache_high threshold.

Macro Definition Documentation

◆ FQDN_HIGH_WATER

#define FQDN_HIGH_WATER   95

Definition at line 71 of file fqdncache.cc.

◆ FQDN_LOW_WATER

#define FQDN_LOW_WATER   90

Definition at line 68 of file fqdncache.cc.

Function Documentation

◆ fqdncache_get()

static fqdncache_entry * fqdncache_get ( const char *  name)
static
Parameters
nameFQDN hash string.
Return values
Matchfor given name

Definition at line 169 of file fqdncache.cc.

References fqdn_table, and hash_lookup().

Referenced by fqdncache_gethostbyaddr(), fqdncache_nbgethostbyaddr(), and fqdncacheAddEntryFromHosts().

◆ fqdncacheAddEntry()

◆ fqdncacheCallback()

◆ fqdncacheCount()

int fqdncacheCount ( )
inline

Definition at line 142 of file fqdncache.cc.

References hash_table::count, and fqdn_table.

Referenced by fqdncache_purgelru(), fqdnStats(), and snmp_netFqdnFn().

◆ fqdncacheExpiredEntry()

static int fqdncacheExpiredEntry ( const fqdncache_entry f)
static

◆ fqdncacheLockEntry()

static void fqdncacheLockEntry ( fqdncache_entry f)
static

◆ fqdncacheParse()

◆ fqdncacheRegisterWithCacheManager()

static void fqdncacheRegisterWithCacheManager ( void  )
static

Definition at line 671 of file fqdncache.cc.

References fqdnStats(), and Mgr::RegisterAction().

Referenced by fqdncache_init().

◆ fqdncacheRelease()

◆ fqdncacheUnlockEntry()

static void fqdncacheUnlockEntry ( fqdncache_entry f)
static

◆ fqdnStats()

Variable Documentation

◆ fqdn_table

hash_table* fqdn_table = nullptr
static

◆ fqdncache_high

long fqdncache_high = 200
static

Definition at line 139 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

◆ fqdncache_low

long fqdncache_low = 180
static

Definition at line 136 of file fqdncache.cc.

Referenced by fqdncache_init(), fqdncache_purgelru(), and fqdncache_restart().

◆ FqdncacheStats

◆ lru_list

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors