DIRECTORY CrRPC, CHNameP2V0, AuthenticationP14V2, CHOpsP2V3, BulkDataP0V1, MailTransportP17V5; MailTransportP17V5ServerImpl: CEDAR PROGRAM IMPORTS CrRPC, MailTransportP17V5 ~ { OPEN MailTransportP17V5; PostOneBodyPartCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { session: Session; bodyPartType: CARD32; contents: CrRPC.BulkDataSource; { FOR i47: CARDINAL IN [0..2) DO session.token[i47] ¬ CrRPC.GetCard16[s]; ENDLOOP; session.verifier ¬ UProc48[h, s]; }; { bodyPartType ¬ CrRPC.GetCard32[s]; }; TRUSTED { contents ¬ CrRPC.GetBulkDataSource[h, s]; }; [] ¬ PostOneBodyPart[h, session, bodyPartType, contents]; beginReturn[h]; }; EndRetrievalCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { session: Session; { FOR i49: CARDINAL IN [0..2) DO session.token[i49] ¬ CrRPC.GetCard16[s]; ENDLOOP; session.verifier ¬ UProc48[h, s]; }; [] ¬ EndRetrieval[h, session]; beginReturn[h]; }; BeginPostCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { envelopeData: PostingData; postIfInvalidNames: BOOLEAN; allowDLRecipients: BOOLEAN; optionalEnvelopeData: OptionalEnvItemSeq; credentials: AuthenticationP14V2.Credentials; verifier: AuthenticationP14V2.SeqWords; session: Session; invalidNames: InvalidNameList; { envelopeData.recipients ¬ UProc50[h, s]; envelopeData.contentsType ¬ CrRPC.GetCard32[s]; envelopeData.contentsSize ¬ CrRPC.GetCard32[s]; envelopeData.bodyPartTypesSequence ¬ UProc51[h, s]; }; { postIfInvalidNames ¬ CrRPC.GetBool[s]; }; { allowDLRecipients ¬ CrRPC.GetBool[s]; }; { optionalEnvelopeData ¬ UProc52[h, s]; }; { credentials.type ¬ VAL[CrRPC.GetCard16[s]]; credentials.value ¬ UProc48[h, s]; }; { verifier ¬ UProc48[h, s]; }; [session, invalidNames] ¬ BeginPost[h, envelopeData, postIfInvalidNames, allowDLRecipients, optionalEnvelopeData, credentials, verifier]; beginReturn[h]; { FOR i53: CARDINAL IN [0..2) DO CrRPC.PutCard16[s, session.token[i53]]; ENDLOOP; MProc54[h, s, session.verifier]; }; { MProc55[h, s, invalidNames]; }; }; AbortRetrievalCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { session: Session; { FOR i56: CARDINAL IN [0..2) DO session.token[i56] ¬ CrRPC.GetCard16[s]; ENDLOOP; session.verifier ¬ UProc48[h, s]; }; [] ¬ AbortRetrieval[h, session]; beginReturn[h]; }; RetrieveContentCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { content: CrRPC.BulkDataSink; session: Session; TRUSTED { content ¬ CrRPC.GetBulkDataSink[h, s]; }; { FOR i57: CARDINAL IN [0..2) DO session.token[i57] ¬ CrRPC.GetCard16[s]; ENDLOOP; session.verifier ¬ UProc48[h, s]; }; [] ¬ RetrieveContent[h, content, session]; beginReturn[h]; }; MailPollCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { deliverySlot: CHNameP2V0.ThreePartName; credentials: AuthenticationP14V2.Credentials; verifier: AuthenticationP14V2.SeqWords; mailPresent: BOOLEAN; { deliverySlot.organization ¬ CrRPC.GetRope[s]; deliverySlot.domain ¬ CrRPC.GetRope[s]; deliverySlot.object ¬ CrRPC.GetRope[s]; }; { credentials.type ¬ VAL[CrRPC.GetCard16[s]]; credentials.value ¬ UProc48[h, s]; }; { verifier ¬ UProc48[h, s]; }; [mailPresent] ¬ MailPoll[h, deliverySlot, credentials, verifier]; beginReturn[h]; { CrRPC.PutBool[s, mailPresent]; }; }; ServerPollCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { willingness: Willingness; address: CHOpsP2V3.NetworkAddressList; serverName: CHNameP2V0.ThreePartName; [willingness, address, serverName] ¬ ServerPoll[h]; beginReturn[h]; { MProc58[h, s, willingness]; }; { MProc59[h, s, address]; }; { CrRPC.PutRope[s, serverName.organization]; CrRPC.PutRope[s, serverName.domain]; CrRPC.PutRope[s, serverName.object]; }; }; RetrieveEnvelopeCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { session: Session; empty: BOOLEAN; envelope: Envelope; { FOR i60: CARDINAL IN [0..2) DO session.token[i60] ¬ CrRPC.GetCard16[s]; ENDLOOP; session.verifier ¬ UProc48[h, s]; }; [empty, envelope] ¬ RetrieveEnvelope[h, session]; beginReturn[h]; { CrRPC.PutBool[s, empty]; }; { MProc61[h, s, envelope]; }; }; BeginRetrievalCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { deliverySlot: CHNameP2V0.ThreePartName; credentials: AuthenticationP14V2.Credentials; verifier: AuthenticationP14V2.SeqWords; session: Session; { deliverySlot.organization ¬ CrRPC.GetRope[s]; deliverySlot.domain ¬ CrRPC.GetRope[s]; deliverySlot.object ¬ CrRPC.GetRope[s]; }; { credentials.type ¬ VAL[CrRPC.GetCard16[s]]; credentials.value ¬ UProc48[h, s]; }; { verifier ¬ UProc48[h, s]; }; [session] ¬ BeginRetrieval[h, deliverySlot, credentials, verifier]; beginReturn[h]; { FOR i62: CARDINAL IN [0..2) DO CrRPC.PutCard16[s, session.token[i62]]; ENDLOOP; MProc54[h, s, session.verifier]; }; }; EndPostCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ { session: Session; abortPost: BOOLEAN; messageID: MessageID; { FOR i63: CARDINAL IN [0..2) DO session.token[i63] ¬ CrRPC.GetCard16[s]; ENDLOOP; session.verifier ¬ UProc48[h, s]; }; { abortPost ¬ CrRPC.GetBool[s]; }; [messageID] ¬ EndPost[h, session, abortPost]; beginReturn[h]; { FOR i64: CARDINAL IN [0..5) DO CrRPC.PutCard16[s, messageID[i64]]; ENDLOOP; }; }; Server: CrRPC.ServerProc ~ { ENABLE { MailTransportP17V5.TransferError => { -- (5 ) beginError[h, 5 ]; CrRPC.PutCard16[s, ORD[problem]]; GOTO Finished; }; MailTransportP17V5.ServiceError => { -- (4 ) beginError[h, 4 ]; CrRPC.PutCard16[s, ORD[problem]]; GOTO Finished; }; MailTransportP17V5.SessionError => { -- (7 ) beginError[h, 7 ]; CrRPC.PutCard16[s, ORD[problem]]; GOTO Finished; }; MailTransportP17V5.OtherError => { -- (6 ) beginError[h, 6 ]; CrRPC.PutCard16[s, ORD[problem]]; GOTO Finished; }; MailTransportP17V5.InvalidRecipients => { -- (3 ) beginError[h, 3 ]; MProc55[h, s, nameList]; GOTO Finished; }; MailTransportP17V5.AuthenticationError => { -- (1 ) beginError[h, 1 ]; CrRPC.PutCard16[s, ORD[problem]]; GOTO Finished; }; MailTransportP17V5.AccessError => { -- (0 ) beginError[h, 0 ]; CrRPC.PutCard16[s, ORD[problem]]; GOTO Finished; }; }; IF (pgmVersion # 5) THEN { beginReject[h, CrRPC.noSuchVersion]; CrRPC.PutCard16[s, 5]; --low CrRPC.PutCard16[s, 5]; --high RETURN }; SELECT proc FROM 8 => PostOneBodyPartCaller[h, s, beginReturn]; 6 => EndRetrievalCaller[h, s, beginReturn]; 1 => BeginPostCaller[h, s, beginReturn]; 3 => AbortRetrievalCaller[h, s, beginReturn]; 4 => RetrieveContentCaller[h, s, beginReturn]; 7 => MailPollCaller[h, s, beginReturn]; 0 => ServerPollCaller[h, s, beginReturn]; 5 => RetrieveEnvelopeCaller[h, s, beginReturn]; 2 => BeginRetrievalCaller[h, s, beginReturn]; 9 => EndPostCaller[h, s, beginReturn]; ENDCASE => { beginReject[h, CrRPC.noSuchProcedure]; }; EXITS Finished => { NULL }; }; MProc54: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: AuthenticationP14V2.SeqWords] ~ { CrRPC.PutCard16[s, val.length]; FOR i65: CARDINAL IN [0..val.length) DO CrRPC.PutCard16[s, val.body[i65]]; ENDLOOP; }; UProc48: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: AuthenticationP14V2.SeqWords] ~ { { length67: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[AuthenticationP14V2.SeqWordsObject[length67]]; FOR i66: CARDINAL IN [0..length67) DO res.body[i66] ¬ CrRPC.GetCard16[s]; ENDLOOP; }; }; UProc52: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: OptionalEnvItemSeq] ~ { { length69: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[OptionalEnvItemSeqObject[length69]]; FOR i68: CARDINAL IN [0..length69) DO res.body[i68].type ¬ CrRPC.GetCard32[s]; res.body[i68].value ¬ UProc70[h, s]; ENDLOOP; }; }; MProc59: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: CHOpsP2V3.NetworkAddressList] ~ { CrRPC.PutCard16[s, val.length]; FOR i71: CARDINAL IN [0..val.length) DO FOR i72: CARDINAL IN [0..6) DO CrRPC.PutCard16[s, val.body[i71][i72]]; ENDLOOP; ENDLOOP; }; MProc55: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: InvalidNameList] ~ { CrRPC.PutCard16[s, val.length]; FOR i73: CARDINAL IN [0..val.length) DO CrRPC.PutCard16[s, val.body[i73].id]; CrRPC.PutCard16[s, ORD[val.body[i73].invalidReason]]; ENDLOOP; }; MProc58: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Willingness] ~ { CrRPC.PutCard16[s, val.length]; FOR i74: CARDINAL IN [0..val.length) DO CrRPC.PutCard16[s, val.body[i74]]; ENDLOOP; }; MProc61: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Envelope] ~ { CrRPC.PutCard16[s, val.length]; FOR i75: CARDINAL IN [0..val.length) DO CrRPC.PutCard32[s, val.body[i75].type]; MProc76[h, s, val.body[i75].value]; ENDLOOP; }; UProc51: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: BPSeq] ~ { { length78: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[BPSeqObject[length78]]; FOR i77: CARDINAL IN [0..length78) DO res.body[i77] ¬ CrRPC.GetCard32[s]; ENDLOOP; }; }; UProc50: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: RecipientList] ~ { { length80: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[RecipientListObject[length80]]; FOR i79: CARDINAL IN [0..length80) DO res.body[i79].name ¬ UProc81[h, s]; res.body[i79].recipientID ¬ CrRPC.GetCard16[s]; res.body[i79].report ¬ VAL[CrRPC.GetCard16[s]]; ENDLOOP; }; }; UProc70: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Opaque] ~ { { length83: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[OpaqueObject[length83]]; FOR i82: CARDINAL IN [0..length83) DO res.body[i82] ¬ CrRPC.GetCard16[s]; ENDLOOP; }; }; MProc76: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Opaque] ~ { CrRPC.PutCard16[s, val.length]; FOR i84: CARDINAL IN [0..val.length) DO CrRPC.PutCard16[s, val.body[i84]]; ENDLOOP; }; UProc81: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: RName] ~ { { tag85: RNameKind ~ VAL[CrRPC.GetCard16[s]]; SELECT tag85 FROM xns => { temp86: CHNameP2V0.ThreePartName; temp86.organization ¬ CrRPC.GetRope[s]; temp86.domain ¬ CrRPC.GetRope[s]; temp86.object ¬ CrRPC.GetRope[s]; res ¬ NEW[RNameObject.xns ¬ [xns[temp86]]] }; gateway => { temp86: GatewayRecord; temp86.country ¬ CrRPC.GetRope[s]; temp86.adminDomain ¬ CrRPC.GetRope[s]; temp86.privateDomain ¬ CrRPC.GetRope[s]; temp86.organization ¬ CrRPC.GetRope[s]; temp86.organizationalUnits ¬ UProc87[h, s]; temp86.personal ¬ UProc88[h, s]; temp86.gatewaySpecificInformation ¬ UProc89[h, s]; res ¬ NEW[RNameObject.gateway ¬ [gateway[temp86]]] }; ENDCASE => ERROR; }; }; UProc87: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: OrgUnits] ~ { { length91: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[OrgUnitsObject[length91]]; FOR i90: CARDINAL IN [0..length91) DO res.body[i90] ¬ CrRPC.GetRope[s]; ENDLOOP; }; }; UProc88: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: PerChoice] ~ { { tag92: PerChoiceKind ~ VAL[CrRPC.GetCard16[s]]; SELECT tag92 FROM whole => { temp93: ROPE; temp93 ¬ CrRPC.GetRope[s]; res ¬ NEW[PerChoiceObject.whole ¬ [whole[temp93]]] }; broken => { temp93: BrokenName; temp93.given ¬ CrRPC.GetRope[s]; temp93.initials ¬ CrRPC.GetRope[s]; temp93.family ¬ CrRPC.GetRope[s]; temp93.generation ¬ CrRPC.GetRope[s]; res ¬ NEW[PerChoiceObject.broken ¬ [broken[temp93]]] }; ENDCASE => ERROR; }; }; UProc89: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: GatewaySpecInfo] ~ { { length95: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[GatewaySpecInfoObject[length95]]; FOR i94: CARDINAL IN [0..length95) DO res.body[i94].type ¬ CrRPC.GetRope[s]; res.body[i94].value ¬ CrRPC.GetRope[s]; ENDLOOP; }; }; CrRPC.RegisterServerProcs[pgm~17, serverProc~Server, pgmLoVersion~5, pgmHiVersion~5]; CrRPC.EnsureListener[class~$SPP]; }... œ MailTransportP17V5ServerImpl.Mesa Copyright Σ 1989, 1991 by Xerox Corporation. All rights reserved. Generated by Willie-sue.pa at December 10, 1991 4:34 pm PST using Sirocco [2.0] of February 10, 1989 6:26:26 pm PST [h: Handle, s: STREAM, pgm: CARD32, pgmVersion: CARD16, proc: CARD16, beginReturn: BeginReturnProc, beginError: BeginErrorProc, beginReject: BeginRejectProc] Unmarshal / Marshal Procs -- Κ `–(cedarcode) style•NewlineDelimiter ™šœ!™!Jšœ Οeœ6™BJ™;Jšœ7™7Icode˜—šΟk ˜ K˜K˜ K˜K˜ K˜ K˜—K˜šΟnœžœž˜+Kšžœ˜%Kšžœ˜—K˜šŸœžœžœ)˜fK˜Kšœžœ˜K˜K˜˜šžœžœžœž˜K˜(Kšžœ˜—K˜!K˜—˜K˜"K˜—šžœ˜ K˜)K˜—K˜K˜9K˜K˜K˜K˜K˜—šŸœžœžœ)˜cK˜K˜˜šžœžœžœž˜K˜(Kšžœ˜—K˜!K˜—K˜K˜K˜K˜K˜K˜K˜—šŸœžœžœ)˜`K˜Kšœžœ˜Kšœžœ˜K˜)K˜-K˜'K˜K˜K˜˜K˜(K˜/K˜/K˜3K˜—˜K˜&K˜—˜K˜%K˜—˜K˜%K˜—˜Kšœžœ˜+K˜"K˜—˜K˜K˜—K˜K˜‰K˜K˜K˜˜šžœžœžœž˜K˜'Kšžœ˜—K˜ K˜—˜K˜K˜—K˜K˜—šŸœžœžœ)˜eK˜K˜˜šžœžœžœž˜K˜(Kšžœ˜—K˜!K˜—K˜K˜ K˜K˜K˜K˜K˜—šŸœžœžœ)˜fK˜K˜K˜šžœ˜ K˜&K˜—˜šžœžœžœž˜K˜(Kšžœ˜—K˜!K˜—K˜K˜*K˜K˜K˜K˜K˜—šŸœžœžœ)˜_K˜'K˜-K˜'Kšœ žœ˜K˜˜K˜-K˜'K˜'K˜—˜Kšœžœ˜+K˜"K˜—˜K˜K˜—K˜K˜AK˜K˜K˜˜K˜K˜—K˜K˜—šŸœžœžœ)˜aK˜K˜&K˜%K˜K˜K˜3K˜K˜K˜˜K˜K˜—˜K˜K˜—˜K˜*K˜$K˜$K˜—K˜K˜—šŸœžœžœ)˜gK˜Kšœžœ˜K˜K˜˜šžœžœžœž˜K˜(Kšžœ˜—K˜!K˜—K˜K˜1K˜K˜K˜˜K˜K˜—˜K˜K˜—K˜K˜—šŸœžœžœ)˜eK˜'K˜-K˜'K˜K˜˜K˜-K˜'K˜'K˜—˜Kšœžœ˜+K˜"K˜—˜K˜K˜—K˜K˜CK˜K˜K˜˜šžœžœžœž˜K˜'Kšžœ˜—K˜ K˜—K˜K˜—šŸ œžœžœ)˜^K˜Kšœ žœ˜K˜K˜˜šžœžœžœž˜K˜(Kšžœ˜—K˜!K˜—˜K˜K˜—K˜K˜-K˜K˜K˜˜šžœžœžœž˜K˜#Kšžœ˜—K˜—K˜K˜—šŸœ˜Jšœ™K˜šžœ˜šœ&Οc˜-K˜Kšœžœ ˜!Kšžœ ˜K˜—šœ% ˜,K˜Kšœžœ ˜!Kšžœ ˜K˜—šœ% ˜,K˜Kšœžœ ˜!Kšžœ ˜K˜—šœ# ˜*K˜Kšœžœ ˜!Kšžœ ˜K˜—šœ* ˜1K˜K˜Kšžœ ˜K˜—šœ, ˜3K˜Kšœžœ ˜!Kšžœ ˜K˜—šœ$ ˜+K˜Kšœžœ ˜!Kšžœ ˜K˜—K˜—K˜šžœžœ˜K˜$Kšœ ˜Kšœ ˜Kšž˜K˜—K˜šžœž˜K˜/K˜,K˜)K˜.K˜/K˜(K˜*K˜0K˜.K˜'šžœ˜ K˜&K˜——K˜šž˜Kšœžœ˜—K˜—˜šœ™K˜K˜šŸœžœžœ(˜WK˜šžœžœžœž˜'K˜"Kšžœ˜—K˜—K˜šŸœžœžœžœ(˜`˜Kšœ žœ˜(Kšœžœ/˜9šžœžœžœž˜%K˜#Kšžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜V˜Kšœ žœ˜(Kšœžœ%˜/šžœžœžœž˜%K˜(K˜$Kšžœ˜—K˜—K˜—K˜šŸœžœžœ(˜WK˜šžœžœžœž˜'šžœžœžœž˜K˜'Kšžœ˜—Kšžœ˜—K˜—K˜šŸœžœžœ˜JK˜šžœžœžœž˜'K˜%Kšœžœ˜5Kšžœ˜—K˜—K˜šŸœžœžœ˜FK˜šžœžœžœž˜'K˜"Kšžœ˜—K˜—K˜šŸœžœžœ˜CK˜šžœžœžœž˜'K˜'K˜#Kšžœ˜—K˜—K˜šŸœžœžœžœ˜I˜Kšœ žœ˜(Kšœžœ˜"šžœžœžœž˜%K˜#Kšžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜Q˜Kšœ žœ˜(Kšœžœ ˜*šžœžœžœž˜%K˜#K˜/Kšœžœ˜/Kšžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜J˜Kšœ žœ˜(Kšœžœ˜#šžœžœžœž˜%K˜#Kšžœ˜—K˜—K˜—K˜šŸœžœžœ˜AK˜šžœžœžœž˜'K˜"Kšžœ˜—K˜—K˜šŸœžœžœžœ˜I˜Kšœžœ˜+šžœž˜˜K˜!K˜'K˜!K˜!Kšœžœ$˜-—˜ K˜K˜"K˜&K˜(K˜'K˜+K˜ K˜2Kšœžœ,˜5—Kšžœžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜L˜Kšœ žœ˜(Kšœžœ˜%šžœžœžœž˜%K˜!Kšžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜M˜Kšœžœ˜/šžœž˜˜ Kšœžœ˜ K˜Kšœžœ,˜5—˜ K˜K˜ K˜#K˜!K˜%Kšœžœ.˜7—Kšžœžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜S˜Kšœ žœ˜(Kšœžœ"˜,šžœžœžœž˜%K˜&K˜'Kšžœ˜—K˜—K˜—K˜——˜K˜UK˜!—K˜K˜—…—-x;t