fqdncache.cc File Reference
#include "squid.h"
#include "cbdata.h"
#include "dns/forward.h"
#include "dns/LookupDetails.h"
#include "dns/rfc1035.h"
#include "event.h"
#include "fqdncache.h"
#include "helper.h"
#include "mgr/Registration.h"
#include "snmp_agent.h"
#include "SquidConfig.h"
#include "StatCounters.h"
#include "Store.h"
#include "util.h"
#include "snmp_core.h"
Include dependency graph for fqdncache.cc:

Go to the source code of this file.

Classes

class  fqdncache_entry
 
struct  fqdncache_entry::Flags
 
struct  _fqdn_cache_stats
 

Macros

#define FQDN_LOW_WATER   90
 
#define FQDN_HIGH_WATER   95
 

Functions

static int fqdncacheParse (fqdncache_entry *f, const rfc1035_rr *answers, int nr, const char *error_message)
 
static void fqdncacheRelease (fqdncache_entry *)
 
static void fqdncacheCallback (fqdncache_entry *, int wait)
 
static fqdncache_entryfqdncache_get (const char *)
 
static int fqdncacheExpiredEntry (const fqdncache_entry *f)
 
static void fqdncacheLockEntry (fqdncache_entry *f)
 
static void fqdncacheUnlockEntry (fqdncache_entry *f)
 
static void fqdncacheAddEntry (fqdncache_entry *f)
 
int fqdncacheCount ()
 
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 fqdnStats (StoreEntry *sentry)
 
void fqdncache_restart (void)
 
void fqdncacheAddEntryFromHosts (char *addr, SBufList &hostnames)
 
static void fqdncacheRegisterWithCacheManager (void)
 
void fqdncache_init (void)
 
variable_listsnmp_netFqdnFn (variable_list *Var, snint *ErrP)
 

Variables

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

Function Documentation

◆ fqdncacheAddEntryFromHosts()

void fqdncacheAddEntryFromHosts ( char *  addr,
SBufList hostnames 
)

Adds a "static" entry from /etc/hosts.

Parameters
addrFQDN name to be added.
hostnameslist of hostnames for the addr

Definition at line 636 of file fqdncache.cc.

References DBG_IMPORTANT, debugs, fqdncache_entry::flags, FQDN_MAX_NAMES, fqdncache_get(), fqdncacheAddEntry(), fqdncacheLockEntry(), fqdncacheRelease(), fqdncacheUnlockEntry(), fqdncache_entry::Flags::fromhosts, fqdncache_entry::locks, fqdncache_entry::name_count, fqdncache_entry::names, Tolower(), and xstrdup.

Referenced by parseEtcHosts().

Variable Documentation

◆ fqdncacheHandleReply

IDNSCB fqdncacheHandleReply
static

Definition at line 122 of file fqdncache.cc.

Referenced by fqdncache_nbgethostbyaddr().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors