DIRECTORY PrincOps USING [PsbIndex], Pup USING [Host, Net, Socket]; RPCPkt: DEFINITIONS = { Header: TYPE = MACHINE DEPENDENT RECORD[ length (0:0..14): [0..77777B], oddByte (0:15..15): { no(0), yes(1) }, type (1): PktType, destPSB (2): PrincOps.PsbIndex,-- field has 6 extra bits srcePSB (3): PrincOps.PsbIndex,-- field has 6 extra bits destHost (4): Machine, destSoc (5): Pup.Socket, srceHost (7): Machine, srceSoc (8): Pup.Socket, conv (10): PktConversationID, pktID (12): PktID, call (16): SELECT OVERLAID * FROM calling => [ dispatcher (16): DispatcherDetails], responding => [ outcome (16): Outcome, fill (17): ARRAY[SIZE[Outcome]..SIZE[DispatcherDetails]) OF WORD], ENDCASE ]; PktType: TYPE = MACHINE DEPENDENT RECORD[ -- "type" word of a Pup -- transport (0:0..7): [0..255], -- should be zero before sending -- subType (0:8..10): { rpc(3B), decryptedRpc(7B) }, -- ** eom (0:11..11): { end(0), notEnd(1) }, ack (0:12..12): { dontAck(0), pleaseAck(1) }, class (0:13..15): { call(0), data(1), ack(2), rfa(4), (7) } ]; Machine: TYPE = MACHINE DEPENDENT RECORD[ net: Pup.Net, host: Pup.Host ]; HostConversationID: TYPE = MACHINE DEPENDENT RECORD[ ls(0): CARDINAL, ms(1): [0..77777B] ]; ConversationID: TYPE = RECORD[ originator: Machine, count: HostConversationID]; PktConversationID: TYPE = MACHINE DEPENDENT RECORD[ ls(0): CARDINAL, originator(1:0..0): { caller, callee }, ms(1:1..15): [0..77777B] ]; ConnectionID: TYPE = MACHINE DEPENDENT RECORD[ conv(0): PktConversationID, caller(2): Machine, activity(3): PrincOps.PsbIndex ]; CallCount: TYPE = LONG CARDINAL; PktID: TYPE = MACHINE DEPENDENT RECORD[ activity(0): PrincOps.PsbIndex,-- field has 6 extra bits-- callSeq(1): CallCount, pktSeq(3): CARDINAL ]; Outcome: TYPE = MACHINE DEPENDENT { -- possible responses to call or signal -- result(0), -- normal -- unbound(1), -- dispatcher not known -- signal(2), -- signal propagation -- unwind(3), -- signal is unwinding -- protocol(4), -- stub protocol error detected -- (LAST[CARDINAL]) -- room for expansion? -- }; DispatcherDetails: TYPE = MACHINE DEPENDENT RECORD[ mds: CARDINAL, -- crock dispatcherID: DispatcherID, -- exporter-relative UID of interface instance dispatcherHint: ExportHandle]; -- hint to exporter host's export table DispatcherID: TYPE = LONG CARDINAL; noDispatcher: DispatcherID = 0; ExportHandle: TYPE = CARDINAL; }. RPCPkt.mesa Copyright Σ 1985, 1987 by Xerox Corporation. All rights reserved. RPC: layout of packets Andrew Birrell September 7, 1983 3:34 pm Bob Hagmann February 8, 1985 3:32:26 pm PST Hal Murray, April 14, 1986 8:10:23 pm PST Swinehart, January 16, 1987 5:40:29 pm PST ******** Layout of stub-packets ******** end of standard Pup header For secure conversations, the remainder of the packet must be encrypted ** decryptedRpc will not appear on the wire, but is used within the implementation to indicate that the packet has been decrypted if it needs to be. DCS January 16, 1987. Mapping from Pup pkt types to RPC pkt types: 140B = [end, dontAck, call ] 141B = [end, dontAck, data ] 142B = [, dontAck, ack ] (also 162B) 143B = unused (also 163B) 144B = [, dontAck, rfa ] (also 164B) 150B = [end, pleaseAck, call ] 151B = [end, pleaseAck, data ] 152B = [, pleaseAck, ack ] (also 172B) 153B = unused (also 173B) 154B = [, pleaseAck, rfa ] (also 174B) 160B = [notEnd, dontAck, call ] 161B = [notEnd, dontAck, data ] 170B = [notEnd, pleaseAck, call ] 171B = [notEnd, pleaseAck, data ] Unambiguous name of a host Host-relative ID of a conversation; unique for all time Absolute ID of a conversation; unique for all hosts and all time Same as ConversationID, but abbreviated for within a packet. Assumes originator is always caller or callee Uniquely identifies an independent sequence of calls [ConnectionID,CallCount] uniquely identifies call for all hosts and time [ConversationID,PktID] uniquely identifies pkt for all hosts and time. Swinehart, January 16, 1987 5:39:12 pm PST Change packet type for received packets to indicate when they have been decrypted. This avoids having to work so hard to keep track of decryptedness. changes to: PktType Κρ˜headšœ ™ IcodešœB™B—šœ™Jšœ)™)L™+L™)L™*—J˜šΟk ˜ Jšœ œ ˜Jšœœ˜—J˜JšΟnœ œ˜J˜J˜Jšœ(™(˜š œœœ œœ˜(J˜J˜&J˜Jšœ œ Οc˜8Jšœ œ Ÿ˜8J˜J˜J˜J˜Jšœ™J˜JšœG™GJ˜šœ œœ˜!˜ J˜$—˜J˜Jš œ œœ œœœ˜B—Jšœ˜ ——J˜š œ œœ œœŸ˜FJšœŸ#˜AJšœ2Ÿ˜7J˜&J˜-J˜>Jšœͺ™ͺ—J˜šœ,™,Jšœ™Jšœ™Jšœ'™'Jšœ!™!Jšœ'™'Jšœ™Jšœ™Jšœ(™(Jšœ!™!Jšœ(™(Jšœ ™ Jšœ ™ Jšœ!™!Jšœ!™!—J˜š œ œœ œœ˜)Jšœ™J˜ J˜—J˜š œœœ œœ˜4Jšœ7™7Jšœœ˜J˜—J˜šœœœ˜Jšœ@™@J˜J˜—J˜š œœœ œœ˜3Jšœk™kJšœœ˜J˜'J˜—J˜š œœœ œœ˜.Jšœ4™4J˜J˜Jšœ!˜!—J˜šœ œœœ˜ JšœH™H—J˜š œœœ œœ˜'JšœF™FJšœ œ Ÿ˜:J˜Jšœ œ˜—J˜šœ œœ œŸ*˜NJšœ Ÿ œ˜Jšœ Ÿ˜&Jšœ Ÿ˜#Jšœ Ÿ˜$Jšœ Ÿ"˜/JšœœœŸ˜*J˜—J˜š œœœ œœ˜3JšœœŸ ˜JšœŸ.˜JJšœŸ'˜F—J˜Jšœœœœ˜#J˜J˜J˜Jšœœœ˜J˜Jšœ˜—™*L™–Lšœ™—L™—…— F9