<> <> <> <<>> <> DIRECTORY Rope USING [ROPE], XNS USING [Address, Host, Net, unknownSocket, Socket]; XNSName: CEDAR DEFINITIONS ~ { ROPE: TYPE ~ Rope.ROPE; Name: TYPE ~ Rope.ROPE; Address: TYPE ~ XNS.Address; Net: TYPE ~ XNS.Net; Host: TYPE ~ XNS.Host; Socket: TYPE ~ XNS.Socket; <> <> <<>> <> <<>> <<.. or>> <<## >> <> <<>> <<1) Decimal: a sequence of characters in ['0..'9] optionally followed by 'D or 'd. The string may also have '- characters embedded, implying product format. A leading '- is not allowed.>> << >> <<2) Octal: a sequence of characters in ['0..'7] followed by 'B or 'b.>> <<>> <<3) Hex: a sequence of characters in {in['0..'9], in ['A..'F], in['a..'f]} beginning with a digit and optionally followed by 'H or 'h.>> <<>> <> <<>> <<4) The special string "ME" (in upper case), which is equivalent to specifing the Processor ID (XNS Host number) of the host where the code is running.>> <<>> <<5) The special string "*", which is equivalent to specifing the broadcast XNS Host number.>> <<>> <<6) A nonempty string not in any of the above formats, which we try to interpret as a Clearinghouse distinguished name:>> <<>> <> <<>> <> <<>> <> <<>> <> <<>> <> <<>> <<74B#25200000016#2>> <> <<25200000016>> <<60.Lassen>> <> <<* >> <<74.*.>> <<#Lassen:Bayhill:Xerox#2B>> <<#25200000016#2>> <<>> <> <<>> <<74#2 >> <> MyAddress: PROC RETURNS [Address]; <> <> <<>> MyName: PROC RETURNS [Name]; <> <> <<>> MyRope: PROC [format: Format _ productSoftware] RETURNS [ROPE]; <> <> <> <> <<>> AddressFromName: PROC [name: Name, default: Socket _ XNS.unknownSocket] RETURNS [Address]; <> <<"ME" (must be upper case) is a special hack for the local machine.>> <> <> <> AddressFromRope: PROC [rope: ROPE, default: Socket _ XNS.unknownSocket] RETURNS [Address]; <> AddressesFromName: PROC [name: Name, default: Socket _ XNS.unknownSocket] RETURNS [LIST OF Address]; <> Format: TYPE ~ { octal, hex, productSoftware }; <> RopeFromAddress: PROC [address: Address, format: Format _ productSoftware] RETURNS [ROPE]; <> < "1.12." (no trailing 0).>> <<>> NameFromAddress: PROC [address: Address, ignoreSocket: BOOL _ TRUE] RETURNS [Name]; <> <> NetFromRope: PROC [rope: ROPE] RETURNS [Net]; HostFromRope: PROC [rope: ROPE] RETURNS [Host]; SocketFromRope: PROC [rope: ROPE] RETURNS [Socket]; RopeFromNet: PROC [net: Net, format: Format _ productSoftware] RETURNS [ROPE]; RopeFromHost: PROC [host: Host, format: Format _ productSoftware] RETURNS [ROPE]; RopeFromSocket: PROC [socket: Socket, format: Format _ productSoftware] RETURNS [ROPE]; <> ErrorCode: TYPE = { syntax, noResponse, errorFromServer, other }; <> Error: ERROR [code: ErrorCode, text: ROPE]; }.