Patent ID: 7796602

Claim:
A method of re-ordering packets, the method comprising: establishing tunnel parameters between a transmitting station and a receiving station, the tunnel parameters comprising an expected sequence number, a window size parameter, and a timeout value; receiving a plurality of packets of a data stream at a receiving station, each of the packets having a packet sequence number indicating a position of the packet in the data stream; determining if the packet sequence number of a first packet is equal to the expected sequence number; delivering the first packet when the packet sequence number is equal to the expected sequence number; determining if the packet sequence number of the first packet is out-of-window when the packet sequence number is not equal to the expected sequence number, wherein determining if the packet sequence number is out-of-window includes comparing the packet sequence number of the first packet to a window check parameter comprising the expected sequence number added to the window size parameter, the window size parameter having a predetermined and fixed value; buffering the first packet if the first packet is in-window, wherein the tunnel allocates enough space in the buffer to store all in-window packets; checking the buffer when the first packet is in-window and the packet sequence number is less than the window check parameter, wherein checking the buffer comprises starting a timer with the timeout value, the timeout value comprising a maximum delay the tunnel will wait on an arrival of a next in-sequence packet for in-sequence delivery; buffering the first packet if the first packet is out-of-window; checking the buffer when the first packet is out-of-window and the packet sequence number is greater than the window check parameter, wherein checking the buffer includes: determining if the buffer is full; buffering the first packet when the buffer is not full; and when the buffer is full: determining a lowest sequence number in the buffer; delivering only a packet having the lowest sequence number; and advancing the expected sequence number to an updated number comprising the lowest sequence number plus one; and discarding the first packet when the first packet is out-of-window and the packet sequence number is less than the expected sequence number.