CernVM-FS
2.12.0
|
#include <dns.h>
Public Member Functions | |
virtual bool | SetResolvers (const std::vector< std::string > &resolvers) |
virtual bool | SetSearchDomains (const std::vector< std::string > &domains) |
virtual void | SetSystemResolvers () |
virtual void | SetSystemSearchDomains () |
virtual | ~NormalResolver () |
Public Member Functions inherited from dns::Resolver | |
Resolver (const bool ipv4_only, const unsigned retries, const unsigned timeout_ms) | |
virtual | ~Resolver () |
Host | Resolve (const std::string &name) |
void | ResolveMany (const std::vector< std::string > &names, std::vector< Host > *hosts) |
const std::vector< std::string > & | domains () const |
bool | ipv4_only () const |
const std::vector< std::string > & | resolvers () const |
unsigned | retries () const |
unsigned | timeout_ms () const |
void | set_throttle (const unsigned throttle) |
unsigned | throttle () const |
void | set_min_ttl (unsigned seconds) |
unsigned | min_ttl () const |
void | set_max_ttl (unsigned seconds) |
unsigned | max_ttl () const |
Static Public Member Functions | |
static NormalResolver * | Create (const bool ipv4_only, const unsigned retries, const unsigned timeout_ms) |
Protected Member Functions | |
virtual void | DoResolve (const std::vector< std::string > &names, const std::vector< bool > &skip, std::vector< std::vector< std::string > > *ipv4_addresses, std::vector< std::vector< std::string > > *ipv6_addresses, std::vector< Failures > *failures, std::vector< unsigned > *ttls, std::vector< std::string > *fqdns) |
NormalResolver () | |
Protected Member Functions inherited from dns::Resolver | |
bool | IsIpv4Address (const std::string &address) |
bool | IsIpv6Address (const std::string &address) |
Private Member Functions | |
FRIEND_TEST (T_Dns, NormalResolverConstruct) | |
Private Attributes | |
CaresResolver * | cares_resolver_ |
HostfileResolver * | hostfile_resolver_ |
Additional Inherited Members | |
Static Public Attributes inherited from dns::Resolver | |
static const unsigned | kDefaultMinTtl = 60 |
static const unsigned | kDefaultMaxTtl = 86400 |
Protected Attributes inherited from dns::Resolver | |
std::vector< std::string > | domains_ |
bool | ipv4_only_ |
std::vector< std::string > | resolvers_ |
unsigned | retries_ |
unsigned | timeout_ms_ |
unsigned | throttle_ |
unsigned | min_ttl_ |
unsigned | max_ttl_ |
Prng | prng_ |
The normal resolver combines Hostfile and C-ares resolver. First looks up host names in the host file. All non-matches are looked up by c-ares.
|
protected |
|
static |
Creates hostfile and c-ares resolvers and uses c-ares resolvers search domains for the hostfile resolver.
Definition at line 1269 of file dns.cc.
Referenced by download::DownloadManager::DownloadManager(), and download::DownloadManager::SetDnsParameters().
|
protectedvirtual |
First pass done by the hostfile resolver, all successfully resolved names are skipped by the c-ares resolver.
Implements dns::Resolver.
Definition at line 1340 of file dns.cc.
|
private |
|
virtual |
Makes only sense for the c-ares resolver.
Implements dns::Resolver.
Definition at line 1300 of file dns.cc.
Referenced by download::DownloadManager::SetDnsServer().
|
virtual |
Set new search domains for both resolvers or for none.
Implements dns::Resolver.
Definition at line 1308 of file dns.cc.
|
virtual |
Implements dns::Resolver.
Definition at line 1323 of file dns.cc.
|
virtual |
Implements dns::Resolver.
Definition at line 1328 of file dns.cc.
|
private |
Definition at line 407 of file dns.h.
Referenced by Create(), DoResolve(), SetResolvers(), SetSearchDomains(), SetSystemResolvers(), SetSystemSearchDomains(), and ~NormalResolver().
|
private |
Definition at line 408 of file dns.h.
Referenced by Create(), DoResolve(), SetSearchDomains(), SetSystemSearchDomains(), and ~NormalResolver().