DIRECTORY Arpa USING [Address, nullAddress], Rope USING [ROPE], SunRPCAuth USING [Conversation], SunYP USING [EachMapNameProc] ; SunYPAgent: CEDAR DEFINITIONS ~ { ROPE: TYPE ~ Rope.ROPE; Handle: TYPE ~ REF Object; Object: TYPE; GetDefaultDomain: PROC RETURNS [domainName: ROPE]; SetDefaultDomain: PROC [domainName: ROPE]; ObtainHandle: PROC [domainName: ROPE _ NIL, conversation: SunRPCAuth.Conversation _ NIL, serverAddress: Arpa.Address _ Arpa.nullAddress] RETURNS [h: Handle]; RefreshHandle: PROC [h: Handle, conversation: SunRPCAuth.Conversation _ NIL, serverAddress: Arpa.Address _ Arpa.nullAddress]; ReleaseHandle: PROC [h: Handle]; Match: PROC [h: Handle, map: ROPE, key: ROPE] RETURNS [val: REF TEXT]; First: PROC [h: Handle, map: ROPE] RETURNS [key: ROPE, val: REF TEXT]; Next: PROC [h: Handle, map: ROPE, keyBefore: ROPE] RETURNS [key: ROPE, val: REF TEXT]; MapList: PROC [h: Handle, eachMap: SunYP.EachMapNameProc]; TextSeq: TYPE ~ REF TextSeqObject; TextSeqObject: TYPE ~ RECORD [ length: CARDINAL, refText: SEQUENCE maxLength: CARDINAL OF REF TEXT ]; Tokenize: PROC [in: REF READONLY TEXT] RETURNS [out: TextSeq]; TokenizeUsingSeparator: PROC [in: REF READONLY TEXT, sepChar: CHAR, trimLeadingSpace, trimTrailingSpace: BOOL _ TRUE] RETURNS [out: TextSeq]; Error: ERROR [code: ATOM]; }... φSunYPAgent.mesa Demers, September 19, 1987 3:57:40 pm PDT Types Procedures Manipulate default YP domain name (used by default if a NIL domainName is passed to ObtainHandle). There is an initial default domain that is reasonable for the system site. Obtain a handle to talk to a server for the specified domain (or to the default domain if "domainName" is allowed to default to NIL). If a conversation is specified, that one is used; otherwise null credentials are used to create a conversation. In any case, the conversation is owned by the handle  client should not call SunRPCAuth.Terminate[c]. If a server is specified, that one is used; otherwise the agent tries to find a server. ! Error[$noYP | $domainNotFound | $timeout | $protocol]. Point h at a (another) server for the domain associated with h. If a conversation is specified, that one is used; otherwise null credentials are used to create a conversation. If a server is specified, that one is used; otherwise the agent tries to find a server. ! Error[$noYP | $domainNotFound | $timeout | $protocol]. It's okay to drop one on the floor occasionally. Find entry matching key in the given map. ! Error[$mapNotFound | $keyNotFound | $timeout | $protocol] Return the first entry in the specified map. ! Error[$noMoreEntries | $mapNotFound | $keyNotFound | $timeout | $protocol] Return the next entry in the specified map. ! Error[$noMoreEntries | $mapNotFound | $keyNotFound | $timeout | $protocol] ! Error[$moreEntries | $timeout | $protocol] Utilities For parsing values from the YP data bases Separate into tokens, delimited by white space. Separate into tokens, delimited by occurrences of sepChar. If requested, leading/trailing white space is trimmed from tokens. Error Codes: $domainNameTooLong : see SunYP for max length. $mapNameTooLong: see SunYP for max length. $keyTooLong: see SunYP for max length. $valueTooLong: see SunYP for max length. $noYP : specified server not exporting YP. $domainNotFound : can't find server for specified domain. $mapNotFound : can't find specified map on server. $keyNotFound : can't find entry with given key in map. $noMoreEntries : for Next. $moreEntries : couldn't get them all with MapList. $timeout : timed out without getting a response from server. $protocol : I'm confused. Κ ˜code™K™)K˜—šΟk ˜ Kšœœ˜"Kšœœœ˜Kšœ œ˜ Kšœœ˜K˜K˜—šΟn œœ ˜K˜head™Kšœœœ˜K˜Kšœœœ˜Kšœœ˜ —™ Kšžœœœœ˜2šžœœœ˜*K™bK™J—K˜š ž œœœœ*œ2œ ˜Kšœ…™…KšœΟe œ₯Ÿœ™ΧKšœŸœL™WK™8K˜—šž œœ5œ2˜}KšœŸœ6Ÿœ™?KšœŸ œ^™oKšœŸœL™WK™8K˜—šž œœ ˜ K™0K˜—šžœœœœœœœ˜FKšœŸœŸœ™)K™;K˜—šžœœœœœœœ˜FK™,K™LK™—šžœœœ œœœœœ˜VK™+K™LK˜—šžœœ-˜:K™,——™ K™)K˜Kšœ œœ˜"šœœœ˜Kšœœ˜Kš œ œ œœœ˜1K˜K˜—š žœœœœœœ˜>K™/K™—šžœœœœœ œ'œœœ˜K™:K™B——™šžœœœ˜™K™.K™*K™&K™(K™*K™9K™2K™6K™K™2K™