tfDnsDomainSearchSetDots
Table of Contents >> Application Reference >> DNS Resolver
| #include <trsocket.h> |
| int tfDnsDomainSearchSetDots | (int ndots); |
Function Description
Set the minimum number of dots in a fully qualified domain name. When using the Treck Domain Search option, the ndots setting provides a policy for resolving hostnames. By default, ndots is 1.When resolving a hostname that has at least ndots dots in the name, e.g. "www.treck.com", Treck will first try to resolve the name provided. If that fails, Treck will try appending domains from it's Domain Search sources (domains provided via tfDnsDomainSearchAdd() first, then domains obtained from DHCP and DHCPv6, if available).
When resolving a hostname that has less than ndots dots in the name, e.g. "mailhost", Treck will not try to resolve the name provided before appending domains from it's Domain Search sources.
The Treck domain search feature must be enabled by uncommenting the following compile time macro in your trsystem.h.
#define TM_USE_DNS_DOMAIN_SEARCH
Parameters
- ndots
- The number of dots in a hostname that marks the threshold between partial and fully qualified domain name. Less than ndots means Treck will not attempt to resolve a hostname without appending domain search names. Specify a value in the range: 0 ≤ ndots ≤ 255.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Parameter is out of range.
- TM_EPERM
- tfDnsInit() has not yet been called.