In this illustration, a black arrow extends diagonally downward from left to right and points to a blue circle labeled "Wait." The black arrow itself is labeled with a capital Lambda over: "base=1 nextseqnum=1."
A blue arrow extends from the top left side of the circle and arcs to the top right side of the circle. This arrow contains two labels, separated by a horizontal line between them. The top label reads: "rdt_send(data)."
The bottom reads: "if(nextseqnum<base+N){ sndpkt[nextseqnum]=make_pkt(nextseqnum,data,checksum) udt_send(sndpkt[nextseqnum]) ?if(base==nextseqnum) start_timer nextseqnum++ } else refuse_data(data)."
A blue arrow also extends from the bottom right side of the circle and arcs upwards to the top right side of the circle. This arrow has two labels. On top: "timeout."
On bottom: "start_timer udt_send(sndpkt[base]) udt_send(sndpkt[base+1]) ... udt_send(sndpkt[nextseqnum-1])."
A blue arrow also extends from the bottom left side of the circle and arcs rightward to the bottom right side of the circle. This arrow has two labels. On top: "rdt_rcv(rcvpkt) && notcorrupt(rcvpkt)."
On bottom: "base=getacknum(rcvpkt)+1 If(base==nextseqnum) stop_timer else start_timer."
A blue arrow also extends from the center left side of the circle and arcs downward to the bottom left side of the circle. This arrow has two labels. The top: "rdt_rcv(rcvpkt) && corrupt(rcvpkt)."
The bottom: capital lambda.