<<>> -- CHOpsP2V3ServerImpl.Mesa -- Copyright Ó 1991 by Xerox Corporation. All rights reserved. -- Copyright (C) 1986 by Xerox Corporation. All rights reserved. -- Generated by Demers.pa at January 19, 1987 2:50:23 pm PST -- using Sirocco [2.0] of January 6, 1987 4:07:33 pm PST DIRECTORY CrRPC, CHNameP2V0, AuthenticationP14V2, BulkDataP0V1, CHOpsP2V3; CHOpsP2V3ServerImpl: CEDAR PROGRAM IMPORTS CrRPC, CHOpsP2V3 ~ { OPEN CHOpsP2V3; CreateAliasCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { alias: CHNameP2V0.ThreePartName; sameAs: CHNameP2V0.ThreePartName; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { alias.organization ¬ CrRPC.GetRope[s]; alias.domain ¬ CrRPC.GetRope[s]; alias.object ¬ CrRPC.GetRope[s]; }; { sameAs.organization ¬ CrRPC.GetRope[s]; sameAs.domain ¬ CrRPC.GetRope[s]; sameAs.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ CreateAlias[h, alias, sameAs, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; DeletePropertyCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; property: CARD32; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ DeleteProperty[h, name, property, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; CreateObjectCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; agent: Authenticator; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [] ¬ CreateObject[h, name, agent]; beginReturn[h]; }; ListAliasesCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { pattern: CHNameP2V0.ThreePartName; list: CrRPC.BulkDataSink; agent: Authenticator; { pattern.organization ¬ CrRPC.GetRope[s]; pattern.domain ¬ CrRPC.GetRope[s]; pattern.object ¬ CrRPC.GetRope[s]; }; TRUSTED { list ¬ CrRPC.GetBulkDataSink[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [] ¬ ListAliases[h, pattern, list, agent]; beginReturn[h]; }; ListDomainsServedCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { domains: CrRPC.BulkDataSink; agent: Authenticator; TRUSTED { domains ¬ CrRPC.GetBulkDataSink[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [] ¬ ListDomainsServed[h, domains, agent]; beginReturn[h]; }; DeleteSelfCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; property: CARD32; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ DeleteSelf[h, name, property, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; RetrieveItemCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { pattern: CHNameP2V0.ThreePartName; property: CARD32; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; value: Item; { pattern.organization ¬ CrRPC.GetRope[s]; pattern.domain ¬ CrRPC.GetRope[s]; pattern.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject, value] ¬ RetrieveItem[h, pattern, property, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; { MProc17[h, s, value]; }; }; ListOrganizationsCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { pattern: ROPE; list: CrRPC.BulkDataSink; agent: Authenticator; { pattern ¬ CrRPC.GetRope[s]; }; TRUSTED { list ¬ CrRPC.GetBulkDataSink[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [] ¬ ListOrganizations[h, pattern, list, agent]; beginReturn[h]; }; ListPropertiesCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { pattern: CHNameP2V0.ThreePartName; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; properties: Properties; { pattern.organization ¬ CrRPC.GetRope[s]; pattern.domain ¬ CrRPC.GetRope[s]; pattern.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject, properties] ¬ ListProperties[h, pattern, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; { MProc18[h, s, properties]; }; }; ListDomainsCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { pattern: CHNameP2V0.TwoPartName; list: CrRPC.BulkDataSink; agent: Authenticator; { pattern.organization ¬ CrRPC.GetRope[s]; pattern.domain ¬ CrRPC.GetRope[s]; }; TRUSTED { list ¬ CrRPC.GetBulkDataSink[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [] ¬ ListDomains[h, pattern, list, agent]; beginReturn[h]; }; RetrieveMembersCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { pattern: CHNameP2V0.ThreePartName; property: CARD32; membership: CrRPC.BulkDataSink; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { pattern.organization ¬ CrRPC.GetRope[s]; pattern.domain ¬ CrRPC.GetRope[s]; pattern.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; TRUSTED { membership ¬ CrRPC.GetBulkDataSink[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ RetrieveMembers[h, pattern, property, membership, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; IsMemberCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { memberOf: CHNameP2V0.ThreePartName; property: CARD32; secondaryProperty: CARD32; name: CHNameP2V0.ThreePartName; agent: Authenticator; isMember: BOOLEAN; distinguishedObject: CHNameP2V0.ThreePartName; { memberOf.organization ¬ CrRPC.GetRope[s]; memberOf.domain ¬ CrRPC.GetRope[s]; memberOf.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; { secondaryProperty ¬ CrRPC.GetCard32[s]; }; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [isMember, distinguishedObject] ¬ IsMember[h, memberOf, property, secondaryProperty, name, agent]; beginReturn[h]; { CrRPC.PutBool[s, isMember]; }; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; ListAliasesOfCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { pattern: CHNameP2V0.ThreePartName; list: CrRPC.BulkDataSink; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { pattern.organization ¬ CrRPC.GetRope[s]; pattern.domain ¬ CrRPC.GetRope[s]; pattern.object ¬ CrRPC.GetRope[s]; }; TRUSTED { list ¬ CrRPC.GetBulkDataSink[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ ListAliasesOf[h, pattern, list, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; ChangeItemCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; property: CARD32; newValue: Item; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; { newValue ¬ UProc19[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ ChangeItem[h, name, property, newValue, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; DeleteMemberCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; property: CARD32; member: CHNameP2V0.ThreePartName; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; { member.organization ¬ CrRPC.GetRope[s]; member.domain ¬ CrRPC.GetRope[s]; member.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ DeleteMember[h, name, property, member, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; AddSelfCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; property: CARD32; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ AddSelf[h, name, property, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; RetrieveAddressesCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { address: NetworkAddressList; [address] ¬ RetrieveAddresses[h]; beginReturn[h]; { MProc20[h, s, address]; }; }; DeleteAliasCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { alias: CHNameP2V0.ThreePartName; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { alias.organization ¬ CrRPC.GetRope[s]; alias.domain ¬ CrRPC.GetRope[s]; alias.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ DeleteAlias[h, alias, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; LookupObjectCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ LookupObject[h, name, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; AddGroupPropertyCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; newProperty: CARD32; membership: CrRPC.BulkDataSource; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { newProperty ¬ CrRPC.GetCard32[s]; }; TRUSTED { membership ¬ CrRPC.GetBulkDataSource[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ AddGroupProperty[h, name, newProperty, membership, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; DeleteObjectCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; agent: Authenticator; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [] ¬ DeleteObject[h, name, agent]; beginReturn[h]; }; AddItemPropertyCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; newProperty: CARD32; value: Item; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { newProperty ¬ CrRPC.GetCard32[s]; }; { value ¬ UProc19[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ AddItemProperty[h, name, newProperty, value, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; AddMemberCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { name: CHNameP2V0.ThreePartName; property: CARD32; newMember: CHNameP2V0.ThreePartName; agent: Authenticator; distinguishedObject: CHNameP2V0.ThreePartName; { name.organization ¬ CrRPC.GetRope[s]; name.domain ¬ CrRPC.GetRope[s]; name.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; { newMember.organization ¬ CrRPC.GetRope[s]; newMember.domain ¬ CrRPC.GetRope[s]; newMember.object ¬ CrRPC.GetRope[s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [distinguishedObject] ¬ AddMember[h, name, property, newMember, agent]; beginReturn[h]; { CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; }; }; ListObjectsCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { pattern: CHNameP2V0.ThreePartName; property: CARD32; list: CrRPC.BulkDataSink; agent: Authenticator; { pattern.organization ¬ CrRPC.GetRope[s]; pattern.domain ¬ CrRPC.GetRope[s]; pattern.object ¬ CrRPC.GetRope[s]; }; { property ¬ CrRPC.GetCard32[s]; }; TRUSTED { list ¬ CrRPC.GetBulkDataSink[h, s]; }; { agent.credentials.type ¬ VAL[CrRPC.GetCard16[s]]; agent.credentials.value ¬ UProc16[h, s]; agent.verifier ¬ UProc16[h, s]; }; [] ¬ ListObjects[h, pattern, property, list, agent]; beginReturn[h]; }; Server: CrRPC.ServerProc ~ { -- [h: Handle, s: STREAM, pgm: CARD32, pgmVersion: CARD16, proc: CARD16, beginReturn: BeginReturnProc, beginError: BeginErrorProc, beginReject: BeginRejectProc] ENABLE { CHOpsP2V3.ArgumentError => { -- (2 ) beginError[h, 2 ]; CrRPC.PutCard16[s, ORD[problem]]; CrRPC.PutCard16[s, ORD[which]]; GOTO Finished; }; CHOpsP2V3.PropertyError => { -- (3 ) beginError[h, 3 ]; CrRPC.PutCard16[s, ORD[problem]]; CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; GOTO Finished; }; CHOpsP2V3.CallError => { -- (1 ) beginError[h, 1 ]; CrRPC.PutCard16[s, ORD[problem]]; GOTO Finished; }; CHOpsP2V3.UpdateError => { -- (4 ) beginError[h, 4 ]; CrRPC.PutCard16[s, ORD[problem]]; CrRPC.PutBool[s, found]; CrRPC.PutCard16[s, ORD[which]]; CrRPC.PutRope[s, distinguishedObject.organization]; CrRPC.PutRope[s, distinguishedObject.domain]; CrRPC.PutRope[s, distinguishedObject.object]; GOTO Finished; }; CHOpsP2V3.AuthenticationError => { -- (6 ) beginError[h, 6 ]; CrRPC.PutCard16[s, ORD[problem]]; GOTO Finished; }; CHOpsP2V3.WrongServer => { -- (5 ) beginError[h, 5 ]; CrRPC.PutRope[s, hint.organization]; CrRPC.PutRope[s, hint.domain]; CrRPC.PutRope[s, hint.object]; GOTO Finished; }; }; IF (pgmVersion # 3) THEN { beginReject[h, CrRPC.noSuchVersion]; CrRPC.PutCard16[s, 3]; --low CrRPC.PutCard16[s, 3]; --high RETURN }; SELECT proc FROM 10 => CreateAliasCaller[h, s, beginReturn]; 14 => DeletePropertyCaller[h, s, beginReturn]; 2 => CreateObjectCaller[h, s, beginReturn]; 8 => ListAliasesCaller[h, s, beginReturn]; 1 => ListDomainsServedCaller[h, s, beginReturn]; 22 => DeleteSelfCaller[h, s, beginReturn]; 16 => RetrieveItemCaller[h, s, beginReturn]; 5 => ListOrganizationsCaller[h, s, beginReturn]; 15 => ListPropertiesCaller[h, s, beginReturn]; 6 => ListDomainsCaller[h, s, beginReturn]; 18 => RetrieveMembersCaller[h, s, beginReturn]; 23 => IsMemberCaller[h, s, beginReturn]; 9 => ListAliasesOfCaller[h, s, beginReturn]; 17 => ChangeItemCaller[h, s, beginReturn]; 21 => DeleteMemberCaller[h, s, beginReturn]; 20 => AddSelfCaller[h, s, beginReturn]; 0 => RetrieveAddressesCaller[h, s, beginReturn]; 11 => DeleteAliasCaller[h, s, beginReturn]; 4 => LookupObjectCaller[h, s, beginReturn]; 12 => AddGroupPropertyCaller[h, s, beginReturn]; 3 => DeleteObjectCaller[h, s, beginReturn]; 13 => AddItemPropertyCaller[h, s, beginReturn]; 19 => AddMemberCaller[h, s, beginReturn]; 7 => ListObjectsCaller[h, s, beginReturn]; ENDCASE => { beginReject[h, CrRPC.noSuchProcedure]; }; EXITS Finished => { NULL }; }; -- Unmarshal / Marshal Procs -- UProc16: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: AuthenticationP14V2.SeqWords] ~ { { length22: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[AuthenticationP14V2.SeqWordsObject[length22]]; FOR i21: CARDINAL IN [0..length22) DO res.body[i21] ¬ CrRPC.GetCard16[s]; ENDLOOP; }; }; MProc17: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Item] ~ { CrRPC.PutCard16[s, val.length]; FOR i23: CARDINAL IN [0..val.length) DO CrRPC.PutCard16[s, val.body[i23]]; ENDLOOP; }; UProc19: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Item] ~ { { length25: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[ItemObject[length25]]; FOR i24: CARDINAL IN [0..length25) DO res.body[i24] ¬ CrRPC.GetCard16[s]; ENDLOOP; }; }; MProc18: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Properties] ~ { CrRPC.PutCard16[s, val.length]; FOR i26: CARDINAL IN [0..val.length) DO CrRPC.PutCard32[s, val.body[i26]]; ENDLOOP; }; MProc20: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: NetworkAddressList] ~ { CrRPC.PutCard16[s, val.length]; FOR i27: CARDINAL IN [0..val.length) DO FOR i28: CARDINAL IN [0..2) DO CrRPC.PutCard16[s, val.body[i27].network[i28]]; ENDLOOP; FOR i29: CARDINAL IN [0..3) DO CrRPC.PutCard16[s, val.body[i27].host[i29]]; ENDLOOP; CrRPC.PutCard16[s, val.body[i27].socket]; ENDLOOP; }; CrRPC.RegisterServerProc[pgm~2, serverProc~Server, pgmVersion~3]; CrRPC.EnsureListener[class~$SPP]; }...