DIRECTORY Basics USING [ Comparison ], BasicTime USING [ GMT ], GVBasics USING [ Password ], Rope USING [ ROPE ], RPC USING [ EncryptionKey, ShortROPE ], RPCPkt USING [ Machine ] ; Names: CEDAR DEFINITIONS = { ROPE: TYPE = RPC.ShortROPE; NetAddress: TYPE = RPCPkt.Machine; Rname: TYPE = ROPE; anonymousRname: Rname = NIL; FileSpec: TYPE = REF FileSpecBody; FileSpecBody: TYPE = RECORD [ server, name, password, dirName, dirPassword, fileName: Rope.ROPE_NIL]; ParseFile: PROCEDURE[ server: ROPE_NIL, dirName: ROPE_NIL, dirPassword: ROPE_NIL, fileName: ROPE_] RETURNS [FileSpec]; CurrentRName: PROC RETURNS [ROPE]; DefaultRegistry: PROC RETURNS [ROPE]; Registrize: PROC[name: ROPE] RETURNS [ROPE]; CurrentPasskey: PROC[passwordText: ROPE_NIL] RETURNS [RPC.EncryptionKey]; CurrentPassword: PROC[passwordText: ROPE_NIL] RETURNS [GVBasics.Password] = INLINE { RETURN[LOOPHOLE[CurrentPasskey[passwordText]]]; }; OwnNetAddress: PROC RETURNS [netAddress: NetAddress]; Rspec: TYPE = REF RspecBody; RspecBody: TYPE = RECORD [ simpleName: ROPE_NIL, registry: ROPE_NIL]; InstanceFromNetAddress: PROC[netAddress: NetAddress, suffix: ROPE_NIL] RETURNS [instance: Rname]; RnameToRspec: PROC[name: Rname, defaultRegistry: ROPE_NIL] RETURNS [spec: Rspec]; RspecToRname: PROC[spec: Rspec] RETURNS [name: Rname]; RspecToSortName: PROC[spec: Rspec] RETURNS [name: ROPE]; MakeAtom: PROC[rName: Rname, case: BOOL_FALSE] RETURNS [ATOM]; GMTComp: PROC[t1, t2: BasicTime.GMT] RETURNS [c: Basics.Comparison]; NetProblem: TYPE = {ok, noSuchName, invalidName, noSuchIndex, noSuchFone, badPassword, notAuthenticated, tryLater, notInitialized, cantImportSmarts}; NetError: ERROR[problem: NetProblem]; }. ¾Names.Mesa Last modified by Swinehart, June 13, 1984 3:24:28 pm PDT Last Edited by: Pier, May 1, 1984 11:13:41 am PDT This interface defines a number of groups of utility functions having to do with file names, Grapevine RNames, network host names, passwords (strings and keys), and the like. Each group is further explained below. File name manipulations. ParseFile will break up an old-style bracketed file name into its components. adds default registry if there's no registry in the input. Simple RName, password, net address manipulations. These just look at local machine global information or do various kinds of parsing; they don't do any communicating. Current logged-in name. Registry of CurrentRName[]. Adds the Default registry to the name if the name doesn't have a registry field. Keys made from logged in password. The two types are based on client needs. Returns instance name, concatenated with suffix. Suffix could be "0" to complete a text version of a socket ID, or ".lark" to complete an RName. Takes the fields of an Rname apart. Puts one back together. Produces a rope of the form registry.name Produces a case-independent (if case=FALSE) unique atom from the RName Some leftovers ÊU˜Jšœ ™ Jšœ8™8J™1J˜J™®J™&J˜šÏk ˜ Jšœœ˜Jšœ œ ˜Jšœ œ˜Jšœœœ˜Jšœœ˜'Jšœœ ˜J˜J˜—šœœ˜J˜Jšœœœ ˜Jšœ œ˜"Jšœœœ˜Jšœœ˜J˜—™gJ˜Jšœ œœ˜"šœœœ˜Jšœ=œœ˜GJ˜—šÏn œ œ˜Jšœœœ˜Jšœ œœ˜Jšœ œœ˜Jšœ œœ ˜$J˜Jšœ:™:——J˜™¨J˜šž œœœœ˜"J™—J˜šžœœœœ˜%Jšœ ž œ™—J˜š ž œœœœœ˜,J™P—J˜Jš žœœœœœœ˜Iš žœœœœœœ˜TJšœœ#˜2JšœL™L—J˜Jšž œœœ˜5—˜Jšœœœ ˜šœ œœ˜Jšœ œœ˜Jšœ œœ˜J˜—šžœœ!œœ˜FJšœ˜J™0J™_J˜—š ž œœœœœ˜QJšÏc"œ™#—šž œœœ˜6J™—šžœœœœ˜8J™)—š žœœœœœœ˜>Jšœ%œ™F—J˜—™J™Jšœ œœ˜DJ˜Jšœ œ…˜•Jšœ œ˜%J˜—J˜J˜—…— ³