forwards non-blocking IP cache lookup results to either IPH or IpReciever More...

Collaboration diagram for IpCacheLookupForwarder:


struct  firstLookupStart
 time of the idnsALookup() call More...
struct  lastLookupEnd
 time of the last noteLookup() call More...

Public Member Functions

 IpCacheLookupForwarder ()
 IpCacheLookupForwarder (const CbcPointer< Dns::IpReceiver > &receiver)
 IpCacheLookupForwarder (IPH *fun, void *data)
void finalCallback (const Dns::CachedIps *addrs, const Dns::LookupDetails &details)
 forwards notification about the end of the lookup; last method to be called More...
bool forwardIp (const Ip::Address &ip)
void forwardHits (const Dns::CachedIps &ips)
 convenience wrapper to safely forwardIp() for each IP in the container More...
void lookupsStarting ()
 initialize lookup timestamps for Dns::LookupDetails delay calculation More...
void forwardLookup (const char *error)
 inform recipient of a finished lookup More...
int totalResponseTime () const

Protected Member Functions

int additionalLookupDelay () const

Private Attributes

CbcPointer< Dns::IpReceiverreceiverObj
 gets incremental and final results More...
IPHreceiverFun = nullptr
 gets final results More...
CallbackData receiverData
 caller-specific data for the handler (optional) More...

Detailed Description

Definition at line 81 of file

Constructor & Destructor Documentation

◆ IpCacheLookupForwarder() [1/3]

IpCacheLookupForwarder::IpCacheLookupForwarder ( )

Definition at line 84 of file

◆ IpCacheLookupForwarder() [2/3]

IpCacheLookupForwarder::IpCacheLookupForwarder ( const CbcPointer< Dns::IpReceiver > &  receiver)

Definition at line 219 of file

◆ IpCacheLookupForwarder() [3/3]

IpCacheLookupForwarder::IpCacheLookupForwarder ( IPH fun,
void *  data 

Definition at line 224 of file

Member Function Documentation

◆ additionalLookupDelay()

int IpCacheLookupForwarder::additionalLookupDelay ( ) const
not yet reported lookup delay in milliseconds

Definition at line 109 of file

References current_time, and tvSubMsec().

Referenced by forwardLookup().

◆ finalCallback()

void IpCacheLookupForwarder::finalCallback ( const Dns::CachedIps addrs,
const Dns::LookupDetails details 

◆ forwardHits()

void IpCacheLookupForwarder::forwardHits ( const Dns::CachedIps ips)

Definition at line 267 of file

References forwardIp(), Dns::CachedIps::good(), receiverObj, and CbcPointer< Cbc >::set().

Referenced by ipcacheCallback().

◆ forwardIp()

bool IpCacheLookupForwarder::forwardIp ( const Ip::Address ip)

forwards an IP notification

whether it may be possible to deliver more notifications

Definition at line 251 of file

References debugs, receiverObj, CbcPointer< Cbc >::set(), and CbcPointer< Cbc >::valid().

Referenced by ipcache_entry::addGood(), and forwardHits().

◆ forwardLookup()

void IpCacheLookupForwarder::forwardLookup ( const char *  error)

◆ lookupsStarting()

void IpCacheLookupForwarder::lookupsStarting ( )

Definition at line 99 of file

References current_time.

Referenced by ipcache_nbgethostbyname_().

◆ totalResponseTime()

int IpCacheLookupForwarder::totalResponseTime ( ) const
milliseconds since the first lookup start

Definition at line 105 of file

References current_time, and tvSubMsec().

Referenced by ipcacheHandleReply().

Member Data Documentation

◆ receiverData

CallbackData IpCacheLookupForwarder::receiverData

Definition at line 115 of file

Referenced by finalCallback().

◆ receiverFun

IPH* IpCacheLookupForwarder::receiverFun = nullptr

Definition at line 114 of file

Referenced by finalCallback().

◆ receiverObj

CbcPointer<Dns::IpReceiver> IpCacheLookupForwarder::receiverObj

Definition at line 113 of file

Referenced by finalCallback(), forwardHits(), forwardIp(), and forwardLookup().

The documentation for this class was generated from the following file:






Web Site Translations