Before closing our discussion of GBN, it is worth noting that an implementation of this protocol in a protocol stack would likely have a structure similar to that
of the extended FSM in Figure 3.20. The implementation would also likely be in the
form of various procedures that implement the actions to be taken in response to the
various events that can occur. In such event-based programming, the various procedures are called (invoked) either by other procedures in the protocol stack, or as
the result of an interrupt. In the sender, these events would be (1) a call from the
upper-layer entity to invoke rdt_send(), (2) a timer interrupt, and (3) a call from
the lower layer to invoke rdt_rcv() when a packet arrives. The programming
exercises at the end of this chapter will give you a chance to actually implement
these routines in a simulated, but realistic, network setting.