+// http://openafs.sinenomine.net/~mmeffie/rfc/draft-zeldovich-rx-spec-00.txt
+// prounounced "jerks"
+
+// typo: "contees" => "contents"
+
+/*
+ Ambiguities:
+ - so, unlimited channels per connection, one call per channel, but only
+ four calls per connection?
+ - who picks the epoch, client or server?
+ */
+
+public class RxConnection {
+
+ // I think this is per-host
+ private static final int epoch;
+
+ /*
+ An Rx connection between two
+ hosts is identified by:
+
+ { Epoch, Connection ID, Peer IP, Peer Port },
+ if the high bit of the epoch (+) is not set
+ { Epoch, Connection ID },
+ if the high bit of the epoch (+) is set
+
+if the high epoch bit is set, the recipient of a
+ packet should accept packets for this Rx connection from any IP
+ address and port number
+ */
+
+ InetAddress host;
+ int port;
+ short serviceid;
+
+ public RxConnection(InetAddress host, int port, short serviceid) {
+ this.host = host;
+ this.port = port;
+ this.serviceId = serviceId;
+ }
+
+
+ // one outstanding call per channel at a time
+ // I think there can only be four active calls per connection
+ public class RxChannel {
+ private int connectionId; // chosen by the client that establishes the
+ connection The last two bits of the same 32-bit field are used by
+ Rx to multiplex between 4 parallel calls on the same connection.
+ Each one of them is called an Rx channel, and therefore the field is
+ denoted "Channel ID". (?!?!)
+
+ public class RxCall {
+ private int callNumber; // initial call number must be nonzero
+ // chosen by the peer that initiates the call
+
+ private int sequenceNumber; // counts packets not bytes, starts at 1
+ private int serialNumber; // starts at one, inc with each transmission
+
+ public class RxPacket {
+ public final int sequenceNumber;
+ // zero checksum means it is not being computed
+ // status field is optional
+ }
+
+ }
+ }
+
+
+}
\ No newline at end of file