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) start_timer."

The second blue circle is labeled "Wait for ACK 0." A smaller blue circle extends from the top right side of the circle and arcs sharply back to the center right side of the same circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt) && (corrupt(rcvpkt)|| isACK(rcvpkt,1))."

On bottom: capital lambda.

A second smaller arrow extends from the center right side of the circle and arcs sharply back to the lower right side of the same circle. This arrow has two labels. On top: "timeout."

On bottom: "udt_send(sndpkt) start_timer."

A blue arrow extends from the bottom of the second circle and arcs downward to a third circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt)? && notcorrupt(rcvpkt) && isACK(rcvpkt,0)."

On bottom: "stop_timer."

The third circle is labeled "Wait for call 1 from above." A smaller blue arrow extends from the center right side of the circle and arcs sharply back to the bottom right side of the same circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt)."

On bottom: capital lambda.

A blue arrow extends from the bottom of the third 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) start_timer."

The fourth circle is labeled "Wait for ACK 1." A smaller blue arrow extends from the bottom left side of this circle and arcs sharply back to the center left side of the same circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt) && (corrupt(rcvpkt)|| isACK(rcvpkt,0))."

On bottom: capital lambda.

A second smaller blue arrow extends from the center left side of the fourth circle and arcs sharply back to the top left side of the same circle. This arrow has two labels. On top: "timeout."

On bottom: "udt_send(sndpkt) start_timer."

A blue arrow extends from the top of the fourth circle and arcs upward back to the first circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt) ?&& notcorrupt(rcvpkt) && isACK(rcvpkt,1)."

On bottom: "stop_timer."

A smaller blue circle extends from the center left side of the first circle and arcs sharply back to the top left side of the same circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt)."

On bottom: capital lambda.