Classes | |
struct | Flags |
Public Member Functions | |
void * | operator new (size_t size) |
void | operator delete (void *address) |
void * | toCbdata () noexcept |
ipcache_entry (const char *) | |
~ipcache_entry () | |
const char * | name () const |
int | totalResponseTime () const |
milliseconds since the first lookup start or -1 if there were no lookups More... | |
int | additionalLookupDelay () const |
milliseconds since the last lookup start or -1 if there were no lookups More... | |
template<class Specs > | |
void | addGood (const rfc1035_rr &rr, Specs &specs) |
adds the contents of a "good" DNS A or AAAA record to stored IPs More... | |
void | latestError (const char *text) |
remembers the last error seen, overwriting any previous errors More... | |
Public Attributes | |
hash_link | hash |
time_t | lastref |
time_t | expires |
ipcache_addrs | addrs |
IpCacheLookupForwarder | handler |
char * | error_message |
dlink_node | lru |
unsigned short | locks |
struct ipcache_entry::Flags | flags |
bool | sawCname = false |
Protected Member Functions | |
void | updateTtl (const unsigned int rrTtl) |
Static Private Attributes | |
static cbdata_type | CBDATA_ipcache_entry = CBDATA_UNKNOWN |
Detailed Description
The data structure used for storing name-address mappings is a small hashtable (static hash_table *ip_table), where structures of type ipcache_entry whose most interesting members are:
Definition at line 129 of file ipcache.cc.
Constructor & Destructor Documentation
◆ ipcache_entry()
ipcache_entry::ipcache_entry | ( | const char * | aName | ) |
Definition at line 408 of file ipcache.cc.
References Config, expires, hash, hash_link::key, SquidConfig::negativeDnsTtl, squid_curtime, Tolower(), and xstrdup.
◆ ~ipcache_entry()
ipcache_entry::~ipcache_entry | ( | ) |
Definition at line 1088 of file ipcache.cc.
Member Function Documentation
◆ addGood()
void ipcache_entry::addGood | ( | const rfc1035_rr & | rr, |
Specs & | specs | ||
) |
Definition at line 511 of file ipcache.cc.
References addrs, DBG_IMPORTANT, debugs, IpCacheLookupForwarder::forwardIp(), handler, Dns::CachedIps::have(), name(), Dns::CachedIps::pushUnique(), Dns::CachedIps::raw(), rfc1035_rr::rdata, rfc1035_rr::rdlength, Dns::CachedIps::size(), rfc1035_rr::ttl, and updateTtl().
Referenced by ipcacheParse().
◆ additionalLookupDelay()
int ipcache_entry::additionalLookupDelay | ( | ) | const |
◆ latestError()
void ipcache_entry::latestError | ( | const char * | text | ) |
Definition at line 457 of file ipcache.cc.
References debugs, error_message, name(), safe_free, text, and xstrdup.
Referenced by ipcacheHandleReply(), and ipcacheParse().
◆ name()
|
inline |
Definition at line 155 of file ipcache.cc.
References hash, and hash_link::key.
Referenced by addGood(), ipcacheHandleReply(), ipcacheParse(), and latestError().
◆ operator delete()
|
inline |
Definition at line 131 of file ipcache.cc.
◆ operator new()
|
inline |
Definition at line 131 of file ipcache.cc.
◆ toCbdata()
|
inlinenoexcept |
Definition at line 131 of file ipcache.cc.
◆ totalResponseTime()
int ipcache_entry::totalResponseTime | ( | ) | const |
◆ updateTtl()
|
protected |
Definition at line 540 of file ipcache.cc.
References addrs, Config, debugs, expires, max(), min(), SquidConfig::negativeDnsTtl, SquidConfig::positiveDnsTtl, Dns::CachedIps::size(), and squid_curtime.
Referenced by addGood().
Member Data Documentation
◆ addrs
ipcache_addrs ipcache_entry::addrs |
Definition at line 140 of file ipcache.cc.
Referenced by addGood(), ipcache_gethostbyname(), ipcacheAddEntryFromHosts(), ipcacheCallback(), ipcacheExpiredEntry(), ipcacheHandleReply(), ipcacheStatPrint(), and updateTtl().
◆ CBDATA_ipcache_entry
|
staticprivate |
Definition at line 131 of file ipcache.cc.
◆ error_message
char* ipcache_entry::error_message |
Definition at line 142 of file ipcache.cc.
Referenced by ipcacheCallback(), ipcacheHandleReply(), and latestError().
◆ expires
time_t ipcache_entry::expires |
Definition at line 139 of file ipcache.cc.
Referenced by ipcache_entry(), ipcacheExpiredEntry(), ipcacheHandleReply(), ipcacheInvalidate(), ipcacheInvalidateNegative(), ipcacheStatPrint(), and updateTtl().
◆ flags
struct ipcache_entry::Flags ipcache_entry::flags |
◆ handler
IpCacheLookupForwarder ipcache_entry::handler |
Definition at line 141 of file ipcache.cc.
Referenced by addGood(), ipcache_nbgethostbyname_(), ipcacheCallback(), and ipcacheHandleReply().
◆ hash
hash_link ipcache_entry::hash |
Definition at line 137 of file ipcache.cc.
Referenced by ipcache_entry(), ipcache_nbgethostbyname_(), ipcacheAddEntry(), ipcacheRelease(), ipcacheStatPrint(), and name().
◆ lastref
time_t ipcache_entry::lastref |
Definition at line 138 of file ipcache.cc.
Referenced by ipcache_gethostbyname(), ipcacheAddEntry(), ipcacheCallback(), and ipcacheStatPrint().
◆ locks
unsigned short ipcache_entry::locks |
Definition at line 145 of file ipcache.cc.
Referenced by ipcache_purgelru(), ipcacheAddEntryFromHosts(), ipcacheExpiredEntry(), ipcacheLockEntry(), and ipcacheUnlockEntry().
◆ lru
dlink_node ipcache_entry::lru |
Definition at line 144 of file ipcache.cc.
Referenced by ipcacheAddEntry(), ipcacheLockEntry(), and ipcacheRelease().
◆ sawCname
bool ipcache_entry::sawCname = false |
Definition at line 153 of file ipcache.cc.
Referenced by ipcacheHandleReply(), and ipcacheParse().
The documentation for this class was generated from the following file:
- src/ipcache.cc