tcputil.h File Reference

TCP utility function prototypes. More...

Go to the source code of this file.

Defines

#define SeqIsBetween(x, low, high)   ((uint32_t)(x - low) <= (uint32_t)(high - low))
 Wraparound-safe TCP sequence number comparison, (low <= x <= high).
#define SeqIsAfter(x, low)   ((int32_t)(low - x) < 0)
 Wraparound-safe TCP sequence number comparison, (x > low).

Functions

void NutTcpCalcRtt (TCPSOCKET *sock)

Detailed Description

TCP utility function prototypes.

Definition in file tcputil.h.


Define Documentation

#define SeqIsBetween ( x,
low,
high   )     ((uint32_t)(x - low) <= (uint32_t)(high - low))

Wraparound-safe TCP sequence number comparison, (low <= x <= high).

Returns true if x is between low and high inclusive, false otherwise.

Definition at line 100 of file tcputil.h.

#define SeqIsAfter ( x,
low   )     ((int32_t)(low - x) < 0)

Wraparound-safe TCP sequence number comparison, (x > low).

Returns true if number x comes after low.

Values between low ... low+1 - (1<<31) are in the past Values between low+1 ... low + (1<<31) are in the future

Definition at line 110 of file tcputil.h.


© 2000-2010 by contributors - visit http://www.ethernut.de/