Domain Name Service (DNS)


Class aprDNS

 

Description:

The Domain Name Service (DNS) library provides a way for client applications to resolve host names into IP addresses, as well as provide additional information about the host. Typically, the addresses of one or more nameservers (systems who provide this information to clients) are configured in the client's TCP/IP stack. The aprDNS Class allows an application to query one or more nameservers directly, without depending on the configuration of the client system.

 

Variables

 

cErr

Text description of last error

 

Session

Holds the Initial Session handle value (used as the Default Session handle)

 

Debug

Enable Warning and Error messages

 

DebugTrace

Include Application Call trace with Warning and Errors

 

LastIP

IP Address of last query in Dot Notation (ie 192.168.15.4)

 

LastHostName

Host Name of last query

 

nErr

Last Error number

 

 

Methods

 

New()

Creates a new instance of the aprDNS Class

 

Destroy()

Terminate use of the aprDNS Class

 

 

 

 

Cancel()

Cancel the current blocking operation

 

Connect()

Establish a client connection with a remote server

 

DisConnect()

Disconnect from the current server

 

EnumHostAliases()

Enumerate the aliases for the specified host name or address

 

GetHostAddress()

Return the IP address assigned to the specified hostname

 

GetHostByAddress()

Return a array of data for the specified host IP address

 

GetHostByName()

Return a array of data for the specified host name

 

GetHostInfo()

Return additonal information for the specified host

 

GetHostName()

Return the hostname assigned to the specified IP address

 

GetHostServices()

Return a list of services supported by the specified host

 

GetLocalDomain()

Get the local domain name for the current session

 

GetMailExchange()

Return the hostname assigned to the specified IP address

 

GetRecord()

Return record data for the current host

 

GetAllRecords()

Return all available record data for the current host

 

GetResolverAddress()

Return address of last nameserver that resolved query

 

GetServerAddress()

Return the address of the specified nameserver

 

GetServerPort()

Return the port of the specified nameserver

 

GetSocket()

Return the client socket handle

 

RegisterServer()

Add a nameserver address to the current session

 

Reset()

Reset the client

 

RetryCount()

Return the number of times a query is retried

 

SetLastError()

Set the last error code

 

SetLocalDomain()

Set the local domain name for the current session

 

TimeOut()

Return the number of seconds until an operation times out

 

Trace()

Get/Set the number of seconds until an operation times out

 

UnRegisterServer()

Remove a nameserver address from the current session