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


Ulm's Oberon Library:
IPv4NameSystems


NAME

IPv4NameSystems - import root nodes using IPv4 sockets

SYNOPSIS

CONST errors = 6;
CONST colonExpected = 0;
CONST portExpected = 1;
CONST invalidPortNumber = 2;
CONST hostnameExpected = 3;
CONST unableToFindPort = 4;
CONST tooManyIndirections = 5;
TYPE ErrorCode = SHORTINT; (* colonExpected.. *)
TYPE ErrorEvent = POINTER TO ErrorEventRec;
TYPE ErrorEventRec =
   RECORD
      (Events.EventRec)
      errorcode: ErrorCode;
      source: ARRAY 128 OF CHAR;
   END;
VAR error: Events.EventType;
VAR errormsg: ARRAY errors OF Events.Message;


PROCEDURE Import(ipaddr: IPv4Addresses.SocketAddress; VAR root: Names.Node; errors: RelatedEvents.Object) : BOOLEAN; PROCEDURE ImportFrom(source: ARRAY OF CHAR; VAR root: Names.Node; errors: RelatedEvents.Object) : BOOLEAN;

PROCEDURE Convert(source: ARRAY OF CHAR; VAR address: Networks.Address; errors: RelatedEvents.Object) : BOOLEAN;

DESCRIPTION

IPv4NameSystems is based upon NamesBootService and supports the import of a root node using an IPv4 socket.

Import allows the direct specification of an IPv4 address whereas ImportFrom accepts a specification which can be either

Convert converts a specification as described above for ImportFrom to be converted into a network address that can be passed on to NamesBootService.

DIAGNOSTICS

Following error events are possibly generated by IPv4NameSystems:
colonExpected
A colon was expected but not found in the specification.
portExpected
A port number was expected but not found in the specification.
invalidPortNumber
The port number was out of range.
hostnameExpected
The specification was empty.
unableToFindPort
Just a domain name was given in the specification and a TXT record could not be obtained.
tooManyIndirections
The upper limit of three indirections for TXT record references was exceeded.

In addition, error events can be expected by the underlying modules. This includes mainly events from DNSResolvers and of InetTCP. All error events are related to the errors parameters.

SEE ALSO

NamesBootService
service that provides the address of the root object at a known location.

Edited by: borchert, last change: 2004/09/22, revision: 1.2, converted to HTML: 2004/09/22

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