|
Squid Web Cache master
|
Classes | |
| struct | Flags |
Public Member Functions | |
| CBDATA_DECL_ (ipcache_entry, 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 | |
| int | additionalLookupDelay () const |
| milliseconds since the last lookup start or -1 if there were no lookups | |
| 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 | |
| void | latestError (const char *text) |
| remembers the last error seen, overwriting any previous errors | |
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) |
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 130 of file ipcache.cc.
| ipcache_entry::ipcache_entry | ( | const char * | aName | ) |
Definition at line 409 of file ipcache.cc.
References Config, expires, hash, hash_link::key, SquidConfig::negativeDnsTtl, squid_curtime, Tolower(), and xstrdup.
| ipcache_entry::~ipcache_entry | ( | ) |
Definition at line 1091 of file ipcache.cc.
| void ipcache_entry::addGood | ( | const rfc1035_rr & | rr, |
| Specs & | specs | ||
| ) |
Definition at line 512 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().
| int ipcache_entry::additionalLookupDelay | ( | ) | const |
| ipcache_entry::CBDATA_DECL_ | ( | ipcache_entry | , |
| noexcept | |||
| ) |
| void ipcache_entry::latestError | ( | const char * | text | ) |
Definition at line 458 of file ipcache.cc.
References debugs, error_message, name(), safe_free, text, and xstrdup.
Referenced by ipcacheHandleReply(), and ipcacheParse().
|
inline |
Definition at line 156 of file ipcache.cc.
References hash, and hash_link::key.
Referenced by addGood(), ipcacheHandleReply(), ipcacheParse(), and latestError().
| int ipcache_entry::totalResponseTime | ( | ) | const |
|
protected |
Definition at line 541 of file ipcache.cc.
References addrs, Config, debugs, expires, SquidConfig::negativeDnsTtl, SquidConfig::positiveDnsTtl, Dns::CachedIps::size(), and squid_curtime.
Referenced by addGood().
| ipcache_addrs ipcache_entry::addrs |
Definition at line 141 of file ipcache.cc.
Referenced by addGood(), ipcache_gethostbyname(), ipcacheAddEntryFromHosts(), ipcacheCallback(), ipcacheExpiredEntry(), ipcacheHandleReply(), ipcacheStatPrint(), and updateTtl().
| char* ipcache_entry::error_message |
Definition at line 143 of file ipcache.cc.
Referenced by ipcacheCallback(), ipcacheHandleReply(), and latestError().
| time_t ipcache_entry::expires |
Definition at line 140 of file ipcache.cc.
Referenced by ipcache_entry(), ipcacheExpiredEntry(), ipcacheHandleReply(), ipcacheInvalidate(), ipcacheInvalidateNegative(), ipcacheStatPrint(), and updateTtl().
| struct ipcache_entry::Flags ipcache_entry::flags |
| IpCacheLookupForwarder ipcache_entry::handler |
Definition at line 142 of file ipcache.cc.
Referenced by addGood(), ipcache_nbgethostbyname_(), ipcacheCallback(), and ipcacheHandleReply().
| hash_link ipcache_entry::hash |
Definition at line 138 of file ipcache.cc.
Referenced by ipcache_entry(), ipcache_nbgethostbyname_(), ipcacheAddEntry(), ipcacheRelease(), ipcacheStatPrint(), and name().
| time_t ipcache_entry::lastref |
Definition at line 139 of file ipcache.cc.
Referenced by ipcache_gethostbyname(), ipcacheAddEntry(), ipcacheCallback(), and ipcacheStatPrint().
| unsigned short ipcache_entry::locks |
Definition at line 146 of file ipcache.cc.
Referenced by ipcache_purgelru(), ipcacheAddEntryFromHosts(), ipcacheExpiredEntry(), ipcacheLockEntry(), and ipcacheUnlockEntry().
| dlink_node ipcache_entry::lru |
Definition at line 145 of file ipcache.cc.
Referenced by ipcacheAddEntry(), ipcacheLockEntry(), and ipcacheRelease().
| bool ipcache_entry::sawCname = false |
Definition at line 154 of file ipcache.cc.
Referenced by ipcacheHandleReply(), and ipcacheParse().