Patent ID: 7237262

Claim:
A method for processing a data packet, the method comprising: storing a mask value, herein the mask value provides an indication of prior receipt of at least a portion of he plurality of previous packets; comparing a next sequence number (NSN) of the data packet to a highest sequence number (HSN), wherein the HSN corresponds to a largest sequence number value from a plurality of previous packets received prior to the data packet; if the HSN is greater than NSN: (i) determining a shift count to be (HSN−NSN); (ii) determining compare value using the shift count, comprising shifting an initial binary value to the left or right by a number of bit positions corresponding to the shift count, the initial binary value comprising a “1” in either a least-significant or a most-significant bit position of the initial binary value and zeroes in all other bit positions of the initial binary value; and (iii) comparing the compare value to the mask value comprises providing a logical result indicating whether a replay condition exists for the data packet; and if HSN is not greater than NSN: (i) determining a shift count to be (NSN−HSN); (ii) updating the ask value using the shift count; and (iii) setting the HSN value to the NSN value.