ipcache.cc File Reference
#include "squid.h"
#include "CacheManager.h"
#include "cbdata.h"
#include "debug/Messages.h"
#include "dlink.h"
#include "dns/LookupDetails.h"
#include "dns/rfc3596.h"
#include "event.h"
#include "ip/Address.h"
#include "ip/tools.h"
#include "ipcache.h"
#include "mgr/Registration.h"
#include "snmp_agent.h"
#include "SquidConfig.h"
#include "StatCounters.h"
#include "Store.h"
#include "util.h"
#include "wordlist.h"
#include "snmp_core.h"
Include dependency graph for ipcache.cc:

Go to the source code of this file.

Classes

class  RrSpecs< Content >
 metadata for parsing DNS A and AAAA records More...
 
class  IpCacheLookupForwarder
 forwards non-blocking IP cache lookup results to either IPH or IpReciever More...
 
struct  IpCacheLookupForwarder::firstLookupStart
 time of the idnsALookup() call More...
 
struct  IpCacheLookupForwarder::lastLookupEnd
 time of the last noteLookup() call More...
 
class  ipcache_entry
 
struct  ipcache_entry::Flags
 
struct  _ipcache_stats
 

Functions

static void stat_ipcache_get (StoreEntry *)
 
static int ipcacheExpiredEntry (ipcache_entry *i)
 
static ipcache_entryipcache_get (const char *name)
 
static void ipcacheLockEntry (ipcache_entry *i)
 
static void ipcacheStatPrint (ipcache_entry *i, StoreEntry *sentry)
 
static void ipcacheUnlockEntry (ipcache_entry *i)
 
static void ipcacheRelease (ipcache_entry *, bool dofree=true)
 
static const Dns::CachedIpsipcacheCheckNumeric (const char *name)
 
static void ipcache_nbgethostbyname_ (const char *name, IpCacheLookupForwarder handler)
 implements ipcache_nbgethostbyname() and Dns::nbgethostbyname() APIs More...
 
int ipcacheCount ()
 
void ipcache_purgelru (void *)
 
static void purge_entries_fromhosts (void)
 
static void ipcacheAddEntry (ipcache_entry *i)
 
static void ipcacheCallback (ipcache_entry *i, const bool hit, const int wait)
 
static void ipcacheParse (ipcache_entry *i, const rfc1035_rr *answers, int nr, const char *error_message)
 
static void ipcacheHandleReply (void *data, const rfc1035_rr *answers, int na, const char *error_message, const bool lastAnswer)
 
void ipcache_nbgethostbyname (const char *name, IPH *handler, void *handlerData)
 
static void ipcacheRegisterWithCacheManager (void)
 
void ipcache_init (void)
 
const ipcache_addrsipcache_gethostbyname (const char *name, int flags)
 
void ipcacheInvalidate (const char *name)
 
void ipcacheInvalidateNegative (const char *name)
 
void ipcacheMarkBadAddr (const char *name, const Ip::Address &addr)
 
void ipcacheMarkGoodAddr (const char *name, const Ip::Address &addr)
 
static void ipcacheFreeEntry (void *data)
 
void ipcache_restart (void)
 
int ipcacheAddEntryFromHosts (const char *name, const char *ipaddr)
 
variable_listsnmp_netIpFn (variable_list *Var, snint *ErrP)
 

Variables

static struct _ipcache_stats IpcacheStats
 
static dlink_list lru_list
 
static FREE ipcacheFreeEntry
 
static IDNSCB ipcacheHandleReply
 
static hash_tableip_table = nullptr
 
static long ipcache_low = 180
 
static long ipcache_high = 200
 

Function Documentation

◆ ipcache_nbgethostbyname_()

◆ ipcacheMarkBadAddr()

void ipcacheMarkBadAddr ( const char *  name,
const Ip::Address addr 
)

Marks the given address as BAD. Does nothing if the domain name does not exist.

Parameters
namedomain name to have an IP marked bad
addrspecific address to be marked bad

Definition at line 1066 of file ipcache.cc.

References ipcache_get().

Referenced by Comm::ConnOpener::sendAnswer().

◆ ipcacheParse()

Variable Documentation

◆ ipcacheFreeEntry

FREE ipcacheFreeEntry
static

Definition at line 194 of file ipcache.cc.

Referenced by ipcacheRelease().

◆ ipcacheHandleReply

IDNSCB ipcacheHandleReply
static

Definition at line 195 of file ipcache.cc.

Referenced by ipcache_nbgethostbyname_().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors