DIRECTORY Arpa USING [Address], CommDriver USING [Network] ; ArpaTranslation: CEDAR DEFINITIONS ~ { Address: TYPE ~ Arpa.Address; Network: TYPE ~ CommDriver.Network; NetAndSubnetMask: TYPE ~ REF NetAndSubnetMaskObject; NetAndSubnetMaskObject: TYPE ~ RECORD [ net: Arpa.Address, subnetMask: Arpa.Address, translation: REF ]; GetNet: PROC [n: Network] RETURNS [Arpa.Address] ~ INLINE { RETURN [NARROW[n.arpa.translation, NetAndSubnetMask].net] }; GetSubnetMask: PROC [n: Network] RETURNS [Arpa.Address] ~ INLINE { RETURN [NARROW[n.arpa.translation, NetAndSubnetMask].subnetMask] }; GetTranslationTable: PROC [n: Network] RETURNS [REF] ~ INLINE { RETURN [NARROW[n.arpa.translation, NetAndSubnetMask].translation] }; PutTranslationTable: PROC [n: Network, table: REF] ~ INLINE { NARROW[n.arpa.translation, NetAndSubnetMask].translation _ table }; DetermineAddressAndSubnetMaskForInterface: PROC [n: Network] RETURNS [ok: BOOL]; }... ArpaTranslation.mesa Demers, August 19, 1987 12:47:51 pm PDT Generic Kludge for Arpa host number and subnet masking. Eventually this will disappear, after we have RARP and Address Mask ICMP servers and can recompile CommDriver to put the net and subnetMask in the Network object where they belong. Storage area for Arpa Net and Subnet Mask Kept in net.arpa.translation. INLINEs to hide how we store net and mask fields Initialization Proc To be called by translation proc for each network. Fills in n.arpa.host, n.arpa.translation.net, n.arpa.translation.subnetMask. (Don't ask how). In the (perhaps distant) future this function will be performed by individual translation modules, e.g. using RARP and Address Mask ICMP messages. This can fail (returning FALSE). สš˜code™K™'K™K™7K™ดK˜—šฯk ˜ Kšœœ ˜Kšœ œ ˜K˜K˜—šฯnœœ ˜"K˜K˜Kšœ œ˜Kšœ œ˜#K˜head™)K™K˜Kšœœœ˜4šœœœ˜'K˜K˜Kšœ ˜K˜K˜——™0šžœœœœ˜;Kšœœ.˜