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 fqdncacheFreeEntry (void *data)
 
static void fqdncacheRegisterWithCacheManager (void)
 

Variables

static struct _fqdn_cache_stats FqdncacheStats
 
static dlink_list lru_list
 
static hash_tablefqdn_table = NULL
 
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 69 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

◆ FQDN_LOW_WATER

#define FQDN_LOW_WATER   90

Definition at line 66 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

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

References hash_lookup(), and NULL.

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

◆ fqdncacheAddEntry()

◆ fqdncacheCallback()

◆ fqdncacheCount()

int fqdncacheCount ( )
inline

Definition at line 141 of file fqdncache.cc.

References hash_table::count.

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

◆ fqdncacheExpiredEntry()

static int fqdncacheExpiredEntry ( const fqdncache_entry f)
static

◆ fqdncacheFreeEntry()

static void fqdncacheFreeEntry ( void *  data)
static

Definition at line 601 of file fqdncache.cc.

◆ fqdncacheLockEntry()

static void fqdncacheLockEntry ( fqdncache_entry f)
static

◆ fqdncacheParse()

◆ fqdncacheRegisterWithCacheManager()

static void fqdncacheRegisterWithCacheManager ( void  )
static

Definition at line 684 of file fqdncache.cc.

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

Referenced by fqdncache_init().

◆ fqdncacheRelease()

static void fqdncacheRelease ( fqdncache_entry f)
static

◆ fqdncacheUnlockEntry()

static void fqdncacheUnlockEntry ( fqdncache_entry f)
static

◆ fqdnStats()

Variable Documentation

◆ fqdn_table

hash_table* fqdn_table = NULL
static

Definition at line 132 of file fqdncache.cc.

◆ fqdncache_high

long fqdncache_high = 200
static

Definition at line 138 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

◆ fqdncache_low

long fqdncache_low = 180
static

Definition at line 135 of file fqdncache.cc.

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

◆ FqdncacheStats

◆ lru_list

dlink_list lru_list
static

Definition at line 118 of file fqdncache.cc.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors