<> <> <> <> DIRECTORY CrRPC, CHNameP2V0, AuthenticationP14V2, BulkDataP0V1, CHOpsP2V3; CHOpsP2V3ClientImpl: CEDAR PROGRAM IMPORTS CrRPC EXPORTS CHOpsP2V3 ~ { OPEN CHOpsP2V3; <> ArgumentError: PUBLIC ArgumentErrorType ~ CODE; PropertyError: PUBLIC PropertyErrorType ~ CODE; CallError: PUBLIC CallErrorType ~ CODE; UpdateError: PUBLIC UpdateErrorType ~ CODE; AuthenticationError: PUBLIC AuthenticationErrorType ~ CODE; WrongServer: PUBLIC WrongServerType ~ CODE; <> GetError: CrRPC.GetErrorProc ~ { SELECT errNum FROM 2 => { problem: ArgumentProblem; which: WhichArgument; problem _ VAL[CrRPC.GetCard16[s]]; which _ VAL[CrRPC.GetCard16[s]]; ERROR ArgumentError[problem, which] }; 3 => { problem: PropertyProblem; distinguishedObject: CHNameP2V0.ThreePartName; problem _ VAL[CrRPC.GetCard16[s]]; distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; ERROR PropertyError[problem, distinguishedObject] }; 1 => { problem: CallProblem; problem _ VAL[CrRPC.GetCard16[s]]; ERROR CallError[problem] }; 4 => { problem: UpdateProblem; found: BOOLEAN; which: WhichArgument; distinguishedObject: CHNameP2V0.ThreePartName; problem _ VAL[CrRPC.GetCard16[s]]; found _ CrRPC.GetBool[s]; which _ VAL[CrRPC.GetCard16[s]]; distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; ERROR UpdateError[problem, found, which, distinguishedObject] }; 6 => { problem: AuthenticationP14V2.Problem; problem _ VAL[CrRPC.GetCard16[s]]; ERROR AuthenticationError[problem] }; 5 => { hint: CHNameP2V0.ThreePartName; hint.organization _ CrRPC.GetRope[s]; hint.domain _ CrRPC.GetRope[s]; hint.object _ CrRPC.GetRope[s]; ERROR WrongServer[hint] }; ENDCASE => { ERROR CrRPC.Error[h, remoteError, "Unexpected Remote Error"]; }; }; <> CreateAlias: PUBLIC CreateAliasType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, alias.organization]; CrRPC.PutRope[s, alias.domain]; CrRPC.PutRope[s, alias.object]; CrRPC.PutRope[s, sameAs.organization]; CrRPC.PutRope[s, sameAs.domain]; CrRPC.PutRope[s, sameAs.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~10 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; DeleteProperty: PUBLIC DeletePropertyType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard32[s, property]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~14 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; CreateObject: PUBLIC CreateObjectType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { NULL }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~2 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; ListAliases: PUBLIC ListAliasesType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, pattern.organization]; CrRPC.PutRope[s, pattern.domain]; CrRPC.PutRope[s, pattern.object]; CrRPC.PutBulkDataSink[h, s, list]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { NULL }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~8 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; ListDomainsServed: PUBLIC ListDomainsServedType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutBulkDataSink[h, s, domains]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { NULL }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~1 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; DeleteSelf: PUBLIC DeleteSelfType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard32[s, property]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~22 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; RetrieveItem: PUBLIC RetrieveItemType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, pattern.organization]; CrRPC.PutRope[s, pattern.domain]; CrRPC.PutRope[s, pattern.object]; CrRPC.PutCard32[s, property]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; value _ UProc2[h, s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~16 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; ListOrganizations: PUBLIC ListOrganizationsType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, pattern]; CrRPC.PutBulkDataSink[h, s, list]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { NULL }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~5 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; ListProperties: PUBLIC ListPropertiesType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, pattern.organization]; CrRPC.PutRope[s, pattern.domain]; CrRPC.PutRope[s, pattern.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; properties _ UProc3[h, s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~15 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; ListDomains: PUBLIC ListDomainsType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, pattern.organization]; CrRPC.PutRope[s, pattern.domain]; CrRPC.PutBulkDataSink[h, s, list]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { NULL }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~6 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; RetrieveMembers: PUBLIC RetrieveMembersType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, pattern.organization]; CrRPC.PutRope[s, pattern.domain]; CrRPC.PutRope[s, pattern.object]; CrRPC.PutCard32[s, property]; CrRPC.PutBulkDataSink[h, s, membership]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~18 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; IsMember: PUBLIC IsMemberType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, memberOf.organization]; CrRPC.PutRope[s, memberOf.domain]; CrRPC.PutRope[s, memberOf.object]; CrRPC.PutCard32[s, property]; CrRPC.PutCard32[s, secondaryProperty]; CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { isMember _ CrRPC.GetBool[s]; distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~23 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; ListAliasesOf: PUBLIC ListAliasesOfType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, pattern.organization]; CrRPC.PutRope[s, pattern.domain]; CrRPC.PutRope[s, pattern.object]; CrRPC.PutBulkDataSink[h, s, list]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~9 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; ChangeItem: PUBLIC ChangeItemType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard32[s, property]; MProc4[h, s, newValue]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~17 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; DeleteMember: PUBLIC DeleteMemberType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard32[s, property]; CrRPC.PutRope[s, member.organization]; CrRPC.PutRope[s, member.domain]; CrRPC.PutRope[s, member.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~21 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; AddSelf: PUBLIC AddSelfType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard32[s, property]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~20 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; RetrieveAddresses: PUBLIC RetrieveAddressesType ~ { PutArgs: CrRPC.PutArgsProc ~ { }; GetResults: CrRPC.GetResultsProc ~ { address _ UProc5[h, s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~0 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; DeleteAlias: PUBLIC DeleteAliasType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, alias.organization]; CrRPC.PutRope[s, alias.domain]; CrRPC.PutRope[s, alias.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~11 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; LookupObject: PUBLIC LookupObjectType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~4 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; AddGroupProperty: PUBLIC AddGroupPropertyType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard32[s, newProperty]; CrRPC.PutBulkDataSource[h, s, membership]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~12 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; DeleteObject: PUBLIC DeleteObjectType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { NULL }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~3 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; AddItemProperty: PUBLIC AddItemPropertyType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard32[s, newProperty]; MProc4[h, s, value]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~13 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; AddMember: PUBLIC AddMemberType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, name.organization]; CrRPC.PutRope[s, name.domain]; CrRPC.PutRope[s, name.object]; CrRPC.PutCard32[s, property]; CrRPC.PutRope[s, newMember.organization]; CrRPC.PutRope[s, newMember.domain]; CrRPC.PutRope[s, newMember.object]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { distinguishedObject.organization _ CrRPC.GetRope[s]; distinguishedObject.domain _ CrRPC.GetRope[s]; distinguishedObject.object _ CrRPC.GetRope[s]; }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~19 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; ListObjects: PUBLIC ListObjectsType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutRope[s, pattern.organization]; CrRPC.PutRope[s, pattern.domain]; CrRPC.PutRope[s, pattern.object]; CrRPC.PutCard32[s, property]; CrRPC.PutBulkDataSink[h, s, list]; CrRPC.PutCard16[s, ORD[agent.credentials.type]]; MProc1[h, s, agent.credentials.value]; MProc1[h, s, agent.verifier]; }; GetResults: CrRPC.GetResultsProc ~ { NULL }; CrRPC.Call[h~h, remotePgm~2, remotePgmVersion~3, remoteProc~7 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; <> MProc1: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: AuthenticationP14V2.SeqWords] ~ { CrRPC.PutCard16[s, val.length]; FOR i6: CARDINAL IN [0..val.length) DO CrRPC.PutCard16[s, val.body[i6]]; ENDLOOP; }; MProc4: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Item] ~ { CrRPC.PutCard16[s, val.length]; FOR i7: CARDINAL IN [0..val.length) DO CrRPC.PutCard16[s, val.body[i7]]; ENDLOOP; }; UProc2: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Item] ~ { { length9: CARDINAL ~ CrRPC.GetCard16[s]; res _ NEW[ItemObject[length9]]; FOR i8: CARDINAL IN [0..length9) DO res.body[i8] _ CrRPC.GetCard16[s]; ENDLOOP; }; }; UProc3: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Properties] ~ { { length11: CARDINAL ~ CrRPC.GetCard16[s]; res _ NEW[PropertiesObject[length11]]; FOR i10: CARDINAL IN [0..length11) DO res.body[i10] _ CrRPC.GetCard32[s]; ENDLOOP; }; }; UProc5: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: NetworkAddressList] ~ { { length13: CARDINAL ~ CrRPC.GetCard16[s]; res _ NEW[NetworkAddressListObject[length13]]; FOR i12: CARDINAL IN [0..length13) DO FOR i14: CARDINAL IN [0..2) DO res.body[i12].network[i14] _ CrRPC.GetCard16[s]; ENDLOOP; FOR i15: CARDINAL IN [0..3) DO res.body[i12].host[i15] _ CrRPC.GetCard16[s]; ENDLOOP; res.body[i12].socket _ CrRPC.GetCard16[s]; ENDLOOP; }; }; }...