-- AddressTranslation.mesa (last edited by: AOF on: September 10, 1980 9:32 AM)

DIRECTORY
SpecialSystem USING [NetworkNumber],
System USING [NetworkAddress];

AddressTranslation: DEFINITIONS =
BEGIN

-- interface

-- All numbers are in octal.
-- <network address> ::= <net>#<host>#<socket>
-- <system element> ::= <net>#<host>#
-- <network number> ::= <net>.
-- <net> ::= {a 32 bit number, soon to be 48 bits} | <empty>
-- <host> ::= <broadcast> | <Dmachine> | <alto> | <ether1>
-- <broadcast> ::= *
-- <Dmachine> ::= {48 bit processor ID}
-- <alto> ::= a{8 bit number representing the ether address}
-- <ether1> ::= e{8 bit number requiring 48 bit translation service}
-- <socket> ::= {16 bit number}

SystemElement: TYPE = System.NetworkAddress;
NetworkAddress: TYPE = System.NetworkAddress;

StringToNetworkAddress: PROCEDURE [STRING]
RETURNS [NetworkAddress];
StringToSystemElement: PROCEDURE [STRING]
RETURNS [SystemElement];
StringToNetworkNumber: PROCEDURE [STRING]
RETURNS [SpecialSystem.NetworkNumber];

BadSyntax
: ERROR [field: Field];
Field: TYPE = {net, host, socket};

AppendNetworkAddress
: PROCEDURE
[s: STRING, nA: NetworkAddress];
AppendSystemElement: PROCEDURE
[s: STRING, sE: SystemElement];
AppendNetworkNumber: PROCEDURE
[s: STRING, net: SpecialSystem.NetworkNumber];
AppendMyNetworkNumber: PROCEDURE [STRING]; -- primary network
AppendMyHostNumber: PROCEDURE [STRING];

StringOverflow: ERROR; -- error generated by the above procedures.

END.
-- AddressTranslation
LOG
Time: May 9, 1980 11:56 AM By: Dalal Action: created file.
Time: June 9, 1980 1:22 PM By: AOF Action: Commented on definition of various fields of <network address>.
Time: July 29, 1980 12:10 PM By: AOF Action: SIGNALs => ERRORs
Time: August 21, 1980 2:37 PM By: AOF Action: Fix SystemElement and NetworkAddress so they are opaque.