compare_seqnum


Description:

public static int compare_seqnum (uint16 seqnum1, uint16 seqnum2)

Compare two sequence numbers, taking care of wraparounds.

This function returns the difference between seqnum1 and seqnum2.

Parameters:

seqnum1

a sequence number

seqnum2

a sequence number

Returns:

a negative value if seqnum1 is bigger than seqnum2, 0 if they are equal or a positive value if seqnum1 is smaller than segnum2.