Skip to content
File

Blob: firmware/vendor/str0m/docs/slide.txt

1.5 KB
1 
2# transmitter
3 
4wt - window size of sender > 0
5nt - next packet to be transmitted (only increasing)
6na - highest acknowledgement received
7* all packets, but not including na have been received
8 
9na <= nr <= ns
10 
11Whenever the transmitter has data to send, it may transmit up to wt packets ahead of the latest acknowledgment na. That is, it may transmit packet number nt as long as nt < na+wt.
12 
13In the absence of a communication error, the transmitter soon receives an acknowledgment for all the packets it has sent, leaving na equal to nt.
14 
15# receiver
16 
17wr - window size of reciever > 0
18nr - first packet not yet received (only increasing). all packets below have been received.
19ns - one more than the highest sequence received. no packet above has been received
20* between nr and ns, some packets have been received
21 
22Every time a packet numbered x is received, the receiver checks to see if it falls in the receive window, nr ≤ x < nr+wr. If it falls within the window, the receiver accepts it. If it is numbered nr, the receive sequence number is increased by 1, and possibly more if further consecutive packets were previously received and stored. If x > nr, the packet is stored until all preceding packets have been received.[1] If x≥ns, the latter is updated to ns=x+1.
23 
24If the packet's number is not within the receive window, the receiver discards it and does not modify nr or ns.
25 
26Whether the packet was accepted or not, the receiver transmits an acknowledgment containing the current nr.
27 
28# overall
29 
30na <= nr <= ns = nt <= na+wt