In this illustration, a black arrow extends diagonally downward from left to right and points to a blue circle labeled "Wait for 0 from below." 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_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq0(rcvpkt)."
On bottom: "extract(rcvpkt,data) deliver_data(data) sndpkt=make_pkt(ACK,0,checksum) udt_send(sndpkt)."
The second blue circle is labeled "Wait for 1 from below." A smaller blue circle extends from the top right side of the circle and travels in a clockwise motion to the center right side of the same circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt) && (corrupt(rcvpkt)|| has_seq0(rcvpkt))."
On bottom: "sndpkt=make_pkt(ACK,0,checksum) udt_send(sndpkt)."
A blue arrow extends from the bottom of the second circle and arcs leftward back to the first blue circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq1(rcvpkt)."
On bottom: "extract(rcvpkt,data) deliver_data(data) sndpkt=make_pkt(ACK,1,checksum) udt_send(sndpkt)."
A smaller blue arrow extends from the bottom left side of the first blue circle and travels in a clockwise motion to the top left side of the same circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt) && (corrupt(rcvpkt)|| has_seq1(rcvpkt))."
On bottom: "sndpkt=make_pkt(ACK,1,checksum) udt_send(sndpkt)."