|
Squid Web Cache master
|
Go to the source code of this file.
Classes | |
| class | net_db_name |
| class | net_db_peer |
| class | netdbEntry |
Functions | |
| void | netdbInit (void) |
| void | netdbHandlePingReply (const Ip::Address &from, int hops, int rtt) |
| void | netdbPingSite (const char *hostname) |
| void | netdbDump (StoreEntry *) |
| int | netdbHostHops (const char *host) |
| int | netdbHostRtt (const char *host) |
| void | netdbUpdatePeer (const AnyP::Uri &, CachePeer *, int rtt, int hops) |
| void | netdbDeleteAddrNetwork (Ip::Address &addr) |
| void | netdbBinaryExchange (StoreEntry *) |
| void | netdbExchangeStart (void *) |
| void | netdbExchangeUpdatePeer (Ip::Address &, CachePeer *, double, double) |
| CachePeer * | netdbClosestParent (PeerSelector *) |
| void | netdbHostData (const char *host, int *samp, int *rtt, int *hops) |
| void netdbBinaryExchange | ( | StoreEntry * | s | ) |
Definition at line 1091 of file net_db.cc.
References addr_table, StoreEntry::append(), assert, StoreEntry::buffer(), StoreEntry::complete(), StoreEntry::flush(), Ip::Address::getInAddr(), hash_first(), hash_next(), netdbEntry::hops, int, Ip::Address::isIPv4(), MEM_4K_BUF, memAllocate(), memFree(), NETDB_EX_HOPS, NETDB_EX_NETWORK, NETDB_EX_RTT, netdbEntry::network, StoreEntry::replaceHttpReply(), netdbEntry::rtt, Http::scBadRequest, Http::scOkay, HttpReply::setHeaders(), squid_curtime, and storeAppendPrintf().
Referenced by internalStart().
| CachePeer * netdbClosestParent | ( | PeerSelector * | ps | ) |
Definition at line 1242 of file net_db.cc.
References assert, Dns::CachedIps::current(), findUsableParentAtHostname(), AnyP::Uri::host(), ipcache_gethostbyname(), netdbEntry::last_use_time, netdbEntry::n_peers, netdbLookupAddr(), netdbLookupHost(), net_db_peer::peername, netdbEntry::peers, PeerSelector::request, net_db_peer::rtt, netdbEntry::rtt, squid_curtime, and HttpRequest::url.
Referenced by PeerSelector::selectSomeNeighbor().
| void netdbDeleteAddrNetwork | ( | Ip::Address & | addr | ) |
Definition at line 1074 of file net_db.cc.
References debugs, netdbLookupAddr(), netdbRelease(), and netdbEntry::network.
Referenced by Comm::ConnOpener::sendAnswer().
| void netdbDump | ( | StoreEntry * | sentry | ) |
Definition at line 861 of file net_db.cc.
References addr_table, DBG_CRITICAL, debugs, hash_first(), hash_next(), hashKeyStr(), net_db_peer::hops, netdbEntry::hops, netdbEntry::hosts, netdbEntry::n_peers, netdbEntry::network, net_db_name::next, net_db_peer::peername, netdbEntry::peers, netdbEntry::pings_recv, netdbEntry::pings_sent, net_db_peer::rtt, netdbEntry::rtt, sortByRtt(), storeAppendPrintf(), xcalloc(), and xfree.
Referenced by netdbInit().
| void netdbExchangeStart | ( | void * | data | ) |
Definition at line 1181 of file net_db.cc.
References assert, DBG_IMPORTANT, debugs, netdbExchangeState::e, Security::PeerOptions::encryptTransport, HttpRequest::flags, HttpRequest::FromUrlXXX(), FwdState::fwdStart(), RefCount< C >::getRaw(), CachePeer::host, CachePeer::http_port, internalRemoteUri(), CachePeer::login, RequestFlags::loopDetected, Store::ParsingBuffer::makeInitialSpace(), Http::METHOD_GET, MYNAME, netdbExchangeHandleReply, netdbExchangeState::parsingBuffer, netdbExchangeState::r, netdbExchangeState::sc, CachePeer::secure, storeClientCopy(), storeClientListAdd(), storeCreateEntry(), HttpRequest::url, and AnyP::Uri::userInfo().
Referenced by peerDNSConfigure().
| void netdbExchangeUpdatePeer | ( | Ip::Address & | addr, |
| CachePeer * | e, | ||
| double | rtt, | ||
| double | hops | ||
| ) |
Definition at line 1027 of file net_db.cc.
References assert, debugs, net_db_peer::expires, net_db_peer::hops, CachePeer::host, Ip::Address::isIPv4(), netdbEntry::n_peers, netdbAdd(), netdbLookupAddr(), netdbPeerAdd(), netdbPeerByName(), netdbEntry::peers, net_db_peer::rtt, sortPeerByRtt(), and squid_curtime.
Referenced by netdbExchangeHandleReply().
| void netdbHandlePingReply | ( | const Ip::Address & | from, |
| int | hops, | ||
| int | rtt | ||
| ) |
Definition at line 828 of file net_db.cc.
References debugs, netdbEntry::hops, netdbLookupAddr(), netdbEntry::network, netdbEntry::pings_recv, and netdbEntry::rtt.
Referenced by IcmpSquid::Recv().
Definition at line 961 of file net_db.cc.
References netdbEntry::hops, int, netdbEntry::last_use_time, netdbLookupHost(), netdbEntry::pings_recv, netdbEntry::rtt, and squid_curtime.
Referenced by htcpTstReply().
| int netdbHostHops | ( | const char * | host | ) |
Definition at line 928 of file net_db.cc.
References netdbEntry::hops, netdbEntry::last_use_time, netdbLookupHost(), and squid_curtime.
Referenced by PeerSelector::checkNetdbDirect(), and doV2Query().
| int netdbHostRtt | ( | const char * | host | ) |
Definition at line 944 of file net_db.cc.
References netdbEntry::last_use_time, netdbLookupHost(), netdbEntry::rtt, and squid_curtime.
Referenced by PeerSelector::checkNetdbDirect(), doV2Query(), neighborsDigestSelect(), and urnParseReply().
| void netdbInit | ( | void | ) |
Definition at line 787 of file net_db.cc.
References addr_table, Config, eventAddIsh(), hash_create(), hash_string, hashPrime(), SquidConfig::high, host_table, SquidConfig::Netdb, netdbDump(), netdbReloadState(), netdbSaveState(), and Mgr::RegisterAction().
Referenced by serverConnectionsOpen().
| void netdbPingSite | ( | const char * | hostname | ) |
Definition at line 811 of file net_db.cc.
References ipcache_nbgethostbyname(), netdbLookupHost(), netdbSendPing, netdbEntry::next_ping_time, squid_curtime, and xstrdup.
Referenced by TunnelStateData::connectDone(), FwdState::dispatch(), doV2Query(), and urnParseReply().
Definition at line 986 of file net_db.cc.
References debugs, double, net_db_peer::expires, net_db_peer::hops, AnyP::Uri::host(), CachePeer::host, netdbEntry::n_peers, netdbLookupHost(), netdbPeerAdd(), netdbPeerByName(), netdbEntry::peers, net_db_peer::rtt, sortPeerByRtt(), and squid_curtime.
Referenced by PeerSelector::handleHtcpParentMiss(), and PeerSelector::handleIcpParentMiss().