FQDN Cache Internals
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

#define FQDN_HIGH_WATER   95

Definition at line 71 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

#define FQDN_LOW_WATER   90

Definition at line 68 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

Function Documentation

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

Definition at line 170 of file fqdncache.cc.

References hash_lookup(), and NULL.

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

int fqdncacheCount ( )
inline

Definition at line 143 of file fqdncache.cc.

References hash_table::count.

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

static int fqdncacheExpiredEntry ( const fqdncache_entry f)
static
static void fqdncacheFreeEntry ( void *  data)
static

Definition at line 603 of file fqdncache.cc.

static void fqdncacheLockEntry ( fqdncache_entry f)
static
static void fqdncacheRegisterWithCacheManager ( void  )
static

Definition at line 686 of file fqdncache.cc.

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

Referenced by fqdncache_init().

static void fqdncacheUnlockEntry ( fqdncache_entry f)
static

Variable Documentation

hash_table* fqdn_table = NULL
static

Definition at line 134 of file fqdncache.cc.

long fqdncache_high = 200
static

Definition at line 140 of file fqdncache.cc.

Referenced by fqdncache_init(), and fqdncache_restart().

long fqdncache_low = 180
static

Definition at line 137 of file fqdncache.cc.

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

dlink_list lru_list
static

Definition at line 120 of file fqdncache.cc.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors