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
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,
end of standard Pup header
conv (10): PktConversationID,
For secure conversations, the remainder of the packet must be encrypted
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) } ];
** 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 ]
Machine:
TYPE =
MACHINE
DEPENDENT
RECORD[
Unambiguous name of a host
net: Pup.Net,
host: Pup.Host ];
HostConversationID:
TYPE =
MACHINE
DEPENDENT
RECORD[
Host-relative ID of a conversation; unique for all time
ls(0): CARDINAL,
ms(1): [0..77777B] ];
ConversationID:
TYPE =
RECORD[
Absolute ID of a conversation; unique for all hosts and all time
originator: Machine,
count: HostConversationID];
PktConversationID:
TYPE =
MACHINE
DEPENDENT
RECORD[
Same as ConversationID, but abbreviated for within a packet. Assumes originator is always caller or callee
ls(0): CARDINAL,
originator(1:0..0): { caller, callee },
ms(1:1..15): [0..77777B] ];
ConnectionID:
TYPE =
MACHINE
DEPENDENT
RECORD[
Uniquely identifies an independent sequence of calls
conv(0): PktConversationID,
caller(2): Machine,
activity(3): PrincOps.PsbIndex ];
CallCount:
TYPE =
LONG
CARDINAL;
[ConnectionID,CallCount] uniquely identifies call for all hosts and time
PktID:
TYPE =
MACHINE
DEPENDENT
RECORD[
[ConversationID,PktID] uniquely identifies pkt for all hosts and time.
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;
}.