Table of Contents

OIL2 Class Standard.NameServerDirectory


class Standard . NameServerDirectory {
        set     domainSuffixList;
        int32   nameServerTotal;
        set     nameServers;
        assoc   optionFlags;
        oid     serviceOID;
inherits from Object;

DESCRIPTION

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.

METHODS


Standard.NameServerDirectory:create

NameServerDirectory:create(optional string configFile)

Method Description

See initialize.


Standard.NameServerDirectory:initialize

NameServerDirectory:initialize(string configFile)

Method Description

The initialize method takes a list of file names (usually, only one) from which the nameserver and domain information will be read.


Standard.NameServerDirectory:getDomainSearchList

NameServerDirectory:getDomainSearchList()

Method Description

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.

Return Value

Returns a set of default domain name suffixes that should searched.


Standard.NameServerDirectory:getNameServers

NameServerDirectory:getNameServers()

Method Description

Returns a list of known nameservers.

Return Value

This method returns an array, each element of which is a string containing the dotted decimal IP address of a name server.


Standard.NameServerDirectory:getOptionalSettings

NameServerDirectory:getOptionalSettings()

Method Description

Returns active options as an associative array representing the respective attribute/value pairs.


Standard.NameServerDirectory:getCompleteConfiguration

NameServerDirectory:getCompleteConfiguration()

Method Description

A union of getNameServers, getDomainSearchList and getOptionalSettings, the getCompleteConfiguration is an efficient mechanism for obtaining all current information about the local DNS resolver configuration.

Return Value

Returns a 3 element array:
0
value obtained from getNameServers
1
value obtained from getDomainSearchList
2
value obtained from getOptionalSettings


Standard.NameServerDirectory:addNameServer

NameServerDirectory:addNameServer(string addr)

Method Description

Adds a new name server to the set of known name servers.

Return Value

This method returns does not return a value.


Standard.NameServerDirectory:deleteNameServer

NameServerDirectory:deleteNameServer(string addr)

Method Description

Deletes a name server from the set of known name servers.

Return Value

This method returns no value.


Standard.NameServerDirectory:clearNameServers

NameServerDirectory:clearNameServers()

Method Description

Discard knowledge of all nameservers. This method clears the list of known nameservers. It does not change the domain name.

Return Value

This method returns no value.