• Invocation from above. When rdt_send() is called from above, the sender
first checks to see if the window is full, that is, whether there are N outstanding,
unacknowledged packets. If the window is not full, a packet is created and sent,
and variables are appropriately updated. If the window is full, the sender simply
returns the data back to the upper layer, an implicit indication that the window is
full. The upper layer would presumably then have to try again later. In a real
implementation, the sender would more likely have either buffered (but not
immediately sent) this data, or would have a synchronization mechanism (for
example, a semaphore or a flag) that would allow the upper layer to call
rdt_send() only when the window is not full.