DIRECTORY Rope USING [ROPE]; YggDummyRPC: CEDAR DEFINITIONS = BEGIN maxShortStringLength: CARDINAL = 64; ShortSTRING: TYPE = STRING; ShortROPE: TYPE = Rope.ROPE; ShortATOM: TYPE = ATOM; InterfaceName: TYPE = RECORD [ type: ShortROPE _ NIL, -- e.g., "AlpineAccess.Alpine" instance: ShortROPE _ NIL, -- e.g., "MontBlanc.Alpine" version: VersionRange _ matchAllVersions ]; defaultInterfaceName: InterfaceName = []; VersionRange: TYPE = MACHINE DEPENDENT RECORD[first, last: CARDINAL]; matchAllVersions: VersionRange = [1,0]; Zones: TYPE = RECORD [ gc: ZONE _ NIL, heap: UNCOUNTED ZONE _ NIL, mds: MDSZone _ NIL ]; standardZones: Zones = []; maxPrincipalLength: CARDINAL = MIN[maxShortStringLength, 64]; Principal: TYPE = ShortROPE; EncryptionKey: TYPE = ARRAY[0..3] OF CARDINAL; MakeKey: PROCEDURE [text: Rope.ROPE] RETURNS[EncryptionKey]; Conversation: TYPE = REF ConversationObject; ConversationObject: PRIVATE TYPE; SecurityLevel: TYPE = MACHINE DEPENDENT { none(0), -- unauthenticated, insecure; used for "unencrypted" authOnly(1), -- authenticated, but unencrypted calls ECB(2), -- authenticated, encrypt with ECB mode of DES CBC(3), -- authenticated, encrypt with CBC mode of DES CBCCheck(4) -- authenticated, encrypt with CBC mode of DES + checksum }; ConversationLevel: TYPE = SecurityLevel[authOnly..CBCCheck]; unencrypted: Conversation = NIL; GenerateConversation: PROC RETURNS[Conversation]; StartConversation: PROCEDURE[ caller: Principal, key: EncryptionKey, callee: Principal, level: ConversationLevel ] RETURNS[conversation: Conversation]; EndConversation: PROCEDURE [conversation: Conversation]; GetCaller: PROCEDURE [conversation: Conversation] RETURNS [caller: Principal]; GetLevel: PROCEDURE [conversation: Conversation] RETURNS [level: SecurityLevel]; ConversationID: TYPE[3]; GetConversationID: PROC[conversation: Conversation] RETURNS[id: ConversationID]; TimeoutEnable: TYPE = { dontCare, always, never }; SetMaxTransmissions: PROC[ conversation: Conversation, maxTransmissions: CARDINAL_20, timeoutEnable: TimeoutEnable _ dontCare ]; AuthenticateFailure: TYPE = { communications, -- couldn't contact authentication server(s) -- badCaller, -- invalid caller name -- badKey, -- incorrect caller password -- badCallee -- invalid callee name -- }; ExportFailure: TYPE = { communications, -- couldn't access binding database -- badType, -- unacceptable interface type name -- badInstance, -- unacceptable interface instance name -- badVersion, -- statically silly version range -- tooMany, -- too many exports for local tables -- badCredentials -- not allowed to change the database -- }; ImportFailure: TYPE = { communications, -- couldn't access binding database -- badType, -- unacceptable interface type name -- badInstance, -- unacceptable interface instance name -- badVersion, -- statically silly version range -- wrongVersion, -- exported version not in req'd range -- unbound, -- this instance not exported -- stubProtocol -- exporter protocol incompatible with importer -- }; CallFailure: TYPE = { timeout, -- no acknowledgement within reasonable time -- unbound, -- server no longer exports the interface -- busy, -- server says it's too busy -- runtimeProtocol, -- user/server runtimes don't understand each other -- stubProtocol -- user/server stubs don't understand each other -- }; AuthenticateFailed: ERROR[why: AuthenticateFailure]; ExportFailed: ERROR[why: ExportFailure]; ImportFailed: ERROR[why: ImportFailure]; CallFailed: SIGNAL[why: CallFailure]; END. fYggDummyRPC.mesa Copyright Ó 1985, 1986, 1987, 1988 by Xerox Corporation. All rights reserved. Last Edited by: Swinehart, January 11, 1987 6:01:33 pm PST Birrell, September 7, 1983 3:20 pm BZM 29-Oct-81 11:46:31 Taft 6-Oct-81 18:35:28 Bob Hagmann March 23, 1988 8:52:05 am PST This is a dummy for Yggdrasil! Short string/rope/atom types. Used only by Lupine clients. Types for Import and Export calls. client-defined, closed interval importer: use any version; exporter: no versioning implied Parameter storage zones. Used only by Lupine clients. Encryption and Authentication facilities. Limit on length of ropes used for Principal names Name of authentication principal DES key Dummy conversation; may be passed to RPC runtime. GetConversationID[unencrypted] = ERROR; GetCaller[unencrypted] = NIL; GetLevel[unencrypted] = none; Returns a handle for a previously unused Conversation. This conversation is only for local use, it must not be passed to the RPC runtime. GetConversationID[GenerateConversation[]] = unique ID; GetCaller[GenerateConversation[]] = NIL; GetLevel[GenerateConversation[]] = "none"; Obtains authenticator for conversation, registers it with runtime, and allocates ConversationID Terminates use of this conversation Returns the caller name for a current call. Result is NIL if conversation's security level is "none" (including conversation = "unencrypted"). UID allocated by initiator host Returns permanently unique ID of this conversation For calls made under the aegis of this conversation, overrides the standard parameters controlling timeout behavior. IF timeoutEnable is dontCare, the standard parameters are used. IF never, calls on this connection will not timeout at all (although other failures are still handled). If always, the value of maxTransmissions replaces the standard number of retransmission attempts, typically around 20, that will be made before a call times out. Public signals: Raised by StartConversation Raised by ExportInterface Raised by ImportInterface Raised by any remote call; only why=timeout is resumable Swinehart, January 11, 1987 5:13:16 pm PST Add SetMaxTransmissions Ê®˜codešœ™KšœN™N™K™*K™"Jšœ™Jšœ™K™)——J˜JšÐbx™J™šÏk ˜ Jšœžœžœ˜J˜—JšÐkn œžœž œ˜ J˜Jšž˜J˜Jšœ:™:˜Jšœžœ˜$J˜Jšœ žœžœ˜Jšœ žœžœ˜Jšœ žœžœ˜J˜J˜—Jšœ"™"˜šœžœžœ˜JšœžœÏc˜:Jšœžœ ˜7J˜+—J˜J˜)J˜š œžœžœž œžœžœ˜EJšœ™—J˜˜'Jšœ;™;—J˜J˜—Jšœ6™6˜šœžœžœ˜Jšœžœžœ˜Jšœž œžœžœ˜Jšœžœ˜—J˜J˜J˜J˜—Jšœ)™)˜šœžœžœ˜=Jšœ1™1—J˜šœ žœ ˜Jšœ ™ —J˜š œžœžœžœžœ˜.Jšœ™—J˜JšÏnœž œ žœžœ˜