#include <AsyncResolverOptions.h>
Public Types | |
| enum | OptionFlagValues { ARES_FLAG_USEVC = (1 << 0), ARES_FLAG_PRIMARY = (1 << 1), ARES_FLAG_IGNTC = (1 << 2), ARES_FLAG_NORECURSE = (1 << 3), ARES_FLAG_STAYOPEN = (1 << 4), ARES_FLAG_NOSEARCH = (1 << 5), ARES_FLAG_NOALIASES = (1 << 6), ARES_FLAG_NOCHECKRESP = (1 << 7) } |
| Option flag values. More... | |
Public Member Functions | |
| CAsyncResolverOptions () | |
| Construct an unconfigured options object. | |
| AsyncResolverError | init (const TCHAR *confPath=NULL) |
| Initialise from all available configuration sources, in prefence order:. | |
| AsyncResolverError | setSearch (const char *domain_list) |
| Set search domains, space separated list. | |
| AsyncResolverError | setDomain (const char *domain) |
| Set a single search domain. | |
| const std::vector< std::string > & | getSearch () const |
| Get the domains search list. | |
| AsyncResolverError | setLookup (const char *lookups) |
| Set lookup order. | |
| const std::string & | getLookup () const |
| Get the lookup order. | |
| AsyncResolverError | setNameServer (const char *ns) |
| Set a nameserver, appends to the current list. | |
| void | clearNameServers () |
| Clear the nameservers list. | |
| const std::vector< in_addr > & | getServers () const |
| Get the nameservers servers list. | |
| AsyncResolverError | setSortList (const char *sl) |
| Set the IP sort list, which is a list of IPs/masks The masks are optional and the natural mask for the address class is computed if omitted. | |
| const std::vector< apattern > | getSortList () const |
| Get the IP sort list. | |
| void | setHostsPath (const TCHAR *path) |
| Set the hosts file path. | |
| const std::_tstring & | getHostsPath () const |
| Get the hosts file path. | |
| void | setDots (int ndots) |
| Set the number of dots threshold for trying the name 'as-is', i.e. | |
| int | getDots () const |
| Get the number of dots threshold for trying the name 'as-is'. | |
| void | setTries (int tries) |
| Set the number of resolution attempts to make for UDP queries. | |
| const int | getTries () const |
| Get the number of resolution attempts to make for UDP queries. | |
| void | setTimeout (int timeout) |
| Set the query timeout (s), defaults to 5s. | |
| const int | getTimeout () const |
| Get the query timeout (s). | |
| void | setUDPPort (unsigned short udp_port) |
| Set the nameserver UDP port, defaults to 53. | |
| const unsigned short | getUDPPort () const |
| Get the nameserver UDP port. | |
| void | setTCPPort (unsigned short tcp_port) |
| const unsigned short | getTCPPort () const |
| Get the nameserver TCP port. | |
| void | setFlags (int flags) |
| Set the global options mask. | |
| const int | getFlags () const |
| Get the resolver global flags. | |
|
|
|
Construct an unconfigured options object. To use this object, either all options should be set, or init should be called. Calling init() is the preferred method. |
|
|
Get the number of dots threshold for trying the name 'as-is'.
|
|
|
Get the resolver global flags. Set setFlags for flag descriptions. |
|
|
Initialise from all available configuration sources, in prefence order:.
|
|
|
Set the number of dots threshold for trying the name 'as-is', i.e. without appending the default search domain. By default this is 1. |
|
|
Set the global options mask. The option flags are as listed above. All options default to off. |
|
|
Set the hosts file path. By default this is derived from the OS. |
|
|
Set lookup order. This can include 'b' for DNS, 'f' for the hosts file and methods are tried in the specified order. The default is 'fb' (hosts, DNS). |
|
|
Set the IP sort list, which is a list of IPs/masks The masks are optional and the natural mask for the address class is computed if omitted. Entries are ; separated and any previous list is overwritten. |
|
|
Set the nameserver UDP port, defaults to 53.
|
1.3.9.1