In this illustration, a black arrow extends diagonally downward from left to right and points to a blue circle labeled "Wait for call 0 from above." A blue arrow extends from the top of this circle and arcs rightward to a second blue circle. The arrow has two labels separated by a horizontal line. On top: "rdt_send (data)."
On bottom: "sndpkt=make_pkt (0, data, checksum) udt_send (sndpkt)."
The second blue circle is labeled "Wait for ACK or NAK 0." A smaller blue arrow extends from the upper right side of this circle and travels in a clockwise motion to the bottom right side of the same circle. This arrow has two labels. On top: "rdt_rcv (rcvpkt) &&(corrupt (rcvpkt) | |isNAK (rcvpkt))."
On bottom: "udt_send (sndpkt)."
A blue arrow extends from the lower right side of this circle and arcs downward to the upper right side of a third blue circle. This arrow has two labels. On top: "rdt_rcv (rcvpkt) && notcorrupt (rcvpkt)&& is ACK (rcvpkt)."
On bottom: capital lambda.
The third blue circle is labeled "Wait for call 1 from above." A blue arrow extends from the bottom of this circle and arcs leftward to a fourth blue circle. This arrow has two labels. On top: "rdt_send (data)."
On bottom: "sndpkt=make_pkt (1, data, checksum) udt_send (sndpkt)."
The fourth blue circle is labeled "Wait for ACK or NAK 1." A smaller blue circle extends from the lower left side of the circle and travels in a clockwise motion to the upper right side of the same circle. This arrow has two labels. On top: "rdt_rcv (rcvpkt) && (corrupt (rcvpkt) | |isNAK (rcvpkt))."
On bottom: "udt_send (sndpkt)."
A blue arrow extends from the upper left side of the fourth arrow and arcs upward to the first blue circle. This arrow has two labels. On top: "rdt_rcv (rcvpkt) && notcorrupt (rcvpkt) && is ACK (rcvpkt)."
On bottom: capital lambda.