forwards non-blocking IP cache lookup results to either IPH or IpReciever More...
Classes | |
struct | firstLookupStart |
struct | lastLookupEnd |
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::IpReceiver > | receiverObj |
gets incremental and final results More... | |
IPH * | receiverFun = nullptr |
gets final results More... | |
CallbackData | receiverData |
caller-specific data for the handler (optional) More... | |
Detailed Description
Definition at line 82 of file ipcache.cc.
Constructor & Destructor Documentation
◆ IpCacheLookupForwarder() [1/3]
|
inline |
Definition at line 85 of file ipcache.cc.
◆ IpCacheLookupForwarder() [2/3]
|
explicit |
Definition at line 220 of file ipcache.cc.
◆ IpCacheLookupForwarder() [3/3]
IpCacheLookupForwarder::IpCacheLookupForwarder | ( | IPH * | fun, |
void * | data | ||
) |
Definition at line 225 of file ipcache.cc.
Member Function Documentation
◆ additionalLookupDelay()
|
inlineprotected |
- Returns
- not yet reported lookup delay in milliseconds
Definition at line 110 of file ipcache.cc.
References current_time, and tvSubMsec().
Referenced by forwardLookup().
◆ finalCallback()
void IpCacheLookupForwarder::finalCallback | ( | const Dns::CachedIps * | addrs, |
const Dns::LookupDetails & | details | ||
) |
Definition at line 231 of file ipcache.cc.
References CbcPointer< Cbc >::clear(), debugs, receiverData, receiverFun, receiverObj, CallbackData::valid(), and CallbackData::validDone().
Referenced by ipcache_nbgethostbyname_(), and ipcacheCallback().
◆ forwardHits()
void IpCacheLookupForwarder::forwardHits | ( | const Dns::CachedIps & | ips | ) |
Definition at line 268 of file ipcache.cc.
References forwardIp(), Dns::CachedIps::good(), and receiverObj.
Referenced by ipcache_nbgethostbyname_(), and ipcacheCallback().
◆ forwardIp()
bool IpCacheLookupForwarder::forwardIp | ( | const Ip::Address & | ip | ) |
forwards an IP notification
- Returns
- whether it may be possible to deliver more notifications
Definition at line 252 of file ipcache.cc.
References debugs, and receiverObj.
Referenced by ipcache_entry::addGood(), and forwardHits().
◆ forwardLookup()
void IpCacheLookupForwarder::forwardLookup | ( | const char * | error | ) |
Definition at line 280 of file ipcache.cc.
References additionalLookupDelay(), current_time, error(), and receiverObj.
Referenced by ipcacheHandleReply().
◆ lookupsStarting()
|
inline |
Definition at line 100 of file ipcache.cc.
References current_time.
Referenced by ipcache_nbgethostbyname_().
◆ totalResponseTime()
|
inline |
- Returns
- milliseconds since the first lookup start
Definition at line 106 of file ipcache.cc.
References current_time, and tvSubMsec().
Referenced by ipcacheHandleReply().
Member Data Documentation
◆ receiverData
|
private |
Definition at line 116 of file ipcache.cc.
Referenced by finalCallback().
◆ receiverFun
|
private |
Definition at line 115 of file ipcache.cc.
Referenced by finalCallback().
◆ receiverObj
|
private |
Definition at line 114 of file ipcache.cc.
Referenced by finalCallback(), forwardHits(), forwardIp(), and forwardLookup().
The documentation for this class was generated from the following file:
- src/ipcache.cc
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products