Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
InetResolver


NAME

InetResolver - resolve domain style names to Internet addresses

SYNOPSIS

PROCEDURE HostByAddr(address: IPv4Addresses.SocketAddress;
                     VAR host: ARRAY OF CHAR;
                     errors: RelatedEvents.Object);
PROCEDURE AddrByHost(host: ARRAY OF CHAR;
                     VAR address: IPv4Addresses.SocketAddress;
                     errors: RelatedEvents.Object) : BOOLEAN;


PROCEDURE HostByIPv6Addr(address: IPv6Addresses.SocketAddress; VAR host: ARRAY OF CHAR; errors: RelatedEvents.Object); PROCEDURE IPv6AddrByHost(host: ARRAY OF CHAR; VAR address: IPv6Addresses.SocketAddress; errors: RelatedEvents.Object) : BOOLEAN;

PROCEDURE GetHostName(VAR hostname: ARRAY OF CHAR); PROCEDURE GetDomainName(VAR domain: ARRAY OF CHAR);

DESCRIPTION

InetResolver allows to map host names to IPv4 or IPv6 addresses and vice versa. This module is based on DNSResolvers and one of its implementations (most likely DNSStdResolvers). Note that this means that a working DNS cache is required. Alternative sources like /etc/hosts or configurations like /etc/nsswitch.conf are not considered.

HostByAddr stores the domain style address of address into host. If the name server is unable to reverse the address, the IPv4 address is returned in the dotted-decimal representation.

AddrByHost tries to convert the domain style address host to an IPv4 address. If successful, the address is stored into address and AddrByHost returns TRUE.

HostByIPv6Addr and IPv6AddrByHost operate like HostByAddr and AddrByHost but convert from or to IPv6 addresses.

GetHostName returns the host name of the calling process. The host name is given without the domain. GetDomainName returns the domain name of the calling process. The concatenation of the host name and the domain name (separated by ".") yields the full qualifying name of the current host machine.

DIAGNOSTICS

In case of failures, error events are generated by the underlying modules.

SEE ALSO

DNSResolvers
general interface for DNS resolvers
DNSStdResolvers
standard implementation of DNSResolvers
IPv4Addresses
IPv4 address type
IPv6Addresses
IPv6 address type

Edited by: borchert, last change: 2006/08/09, revision: 1.7, converted to HTML: 2006/08/09

Oberon || Library || Module Index || Search Engine || Definition || Module