Question

After an answer by @HansPassant to a previous question, I'm trying to implement Reliable Asynchronous Transfer Protocol as defined in RFC916. In the absence of reference code, or simulations, or in fact anything other than the RFC, there's a couple of things I'm unclear on and clarification would help from anyone familiar with it.

Am I right that the sender determines the sequence numbers of its outbound packets, and when the receiver gets one its next return packet will have its ack number the inverse of the SN that's just been received? So an example conversation would be;

A sends a packet (A1) with SN=0.

B receives it, sends its next packet (B1) with AN=1, and unrelatedly SN=0.

A receives B1, sees that AN is the inverse of the SN of the packet it's just sent and considers A1 to have been received. A sends A2, with SN=1 and AN=1.

B receives A2, considers B1 to have been received and sends B2, with SN=1 and AN=0.

Also, I'm unclear as to what happens when data's not flowing in both directions. If data's going in one direction then there's a flow of data-less ack packets back. But if the link is idle, is the wire running flat out with ack packets just bouncing back and forth? That's what I understand from the spec but it seems somewhat odd to me to keep acking the acks indefinitely.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top