class Standard . NameServerDirectory {
set domainSuffixList;
int32 nameServerTotal;
set nameServers;
assoc optionFlags;
oid serviceOID;
} inherits from Object;
The NameServerDirectory maintains a list of the nameservers that can be queried for host information and the domain in which the local host operates. Nameservers and the domain name are imported from /etc/resolv.conf or the equivalent. Nameservers can be added or deleted at any time. The related HostTable class allows locally-defined host name mappings to be maintained and is used by systems requiring 100% availability to prevent DNS outages from rendering the system inoperable. The DNSresolver uses NameServerDirectory to obtain the list of DNS servers to use and HostTable for local and static host information.
NameServerDirectory:create(optional string configFile)
See initialize.
NameServerDirectory:initialize(string configFile)
The initialize method takes a list of file names (usually, only one) from which the nameserver and domain information will be read.
NameServerDirectory:getDomainSearchList()
While fully-qualified names are often used by users when browsing the World Wide Web, unqualified host names are the norm within the local environment. In order to resolver such unqualified names, the appropriate domain suffix must be appended. The NameServerDirectory supports the use of multiple domain suffixes.
NameServerDirectory:getNameServers()
Returns a list of known nameservers.
NameServerDirectory:getOptionalSettings()
Returns active options as an associative array representing the respective attribute/value pairs.
NameServerDirectory:getCompleteConfiguration()
A union of getNameServers, getDomainSearchList and getOptionalSettings, the getCompleteConfiguration is an efficient mechanism for obtaining all current information about the local DNS resolver configuration.
NameServerDirectory:addNameServer(string addr)
Adds a new name server to the set of known name servers.
NameServerDirectory:deleteNameServer(string addr)
Deletes a name server from the set of known name servers.
NameServerDirectory:clearNameServers()
Discard knowledge of all nameservers. This method clears the list of known nameservers. It does not change the domain name.