Copyright (C) 1983, 1984, 1985 by Xerox Corporation. All rights reserved. The following program was created in 1983 but has not been published within the meaning of the copyright law, is furnished under license, and may not be used, copied and/or disclosed except in accordance with the terms of said license.
IPName.mesa
-- Facilities for translating between names and Internet addresses.
Last Edited by: HGM, June 1, 1984 2:11:40 pm PDT
Last Edited by: Nichols, August 31, 1983 3:54 pm
Last Edited by: Taft, January 23, 1984 5:03:38 pm PST
Hal Murray May 16, 1985 3:03:13 am PDT
John Larson, July 16, 1987 3:06:25 pm PDT
DIRECTORY
IPDefs USING [Address],
Rope USING [ROPE];
IPName: CEDAR DEFINITIONS =
BEGIN
NameState: TYPE = {bogus, down, aliasOk, mxOk, nameOk};
AddressState: TYPE = {bogus, down, addressOk};
Cache preloading
LoadCacheFromName: PROC [name: Rope.ROPE, takeOld, needAddress: BOOLFALSE] RETURNS [state: NameState];
takeOld TRUE will avoid cache refresh
needAddress TRUE causes extended lookup, all addresses loaded
LoadCacheFromAddress: PROC [address: IPDefs.Address, takeOld: BOOLFALSE] RETURNS [state: AddressState];
Lookup operations
NameToAddress: PROC [name: Rope.ROPE, mail: BOOLFALSE] RETURNS [addresses: LIST OF IPDefs.Address];
Returns a sorted list of addresses for the name or NIL if the name is not found. Case is ignored. name is allowed to be an Internet address constant of the form "[a.b.c.d]".
mail TRUE will return MX record addresses.
NameToMXHostList: PROC [name: Rope.ROPE] RETURNS [hosts: LIST OF Rope.ROPE];
Returns sorted list of mail forwarding hosts if MX record exists. NIL otherwise.
AddressToName: PROC [address: IPDefs.Address] RETURNS [Rope.ROPE];
NIL if name is not found.
AddressToRope: PROC [address: IPDefs.Address] RETURNS [Rope.ROPE];
NormalizeName: PROC [name: Rope.ROPE] RETURNS [Rope.ROPE];
Converts alias to official name. NIL if bogus name
ExternalSourceCache: TYPE = {nameCache, aliasCache, mxCache, bogusNameCache, addressCache, bogusAddressCache, zoneCache};
Source: PROC [name: Rope.ROPE, type: ExternalSourceCache] RETURNS [server: Rope.ROPE];
Returns name of server responsible for data. Returns NIL if not in cache.
END.