Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_seq.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
#define SEQ_LT(a,b) ((int)((a)-(b)) < 0) | #define SEQ_LT(a,b) ((int)((a)-(b)) < 0) | ||||
#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) | #define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) | ||||
#define SEQ_GT(a,b) ((int)((a)-(b)) > 0) | #define SEQ_GT(a,b) ((int)((a)-(b)) > 0) | ||||
#define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0) | #define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0) | ||||
#define SEQ_MIN(a, b) ((SEQ_LT(a, b)) ? (a) : (b)) | #define SEQ_MIN(a, b) ((SEQ_LT(a, b)) ? (a) : (b)) | ||||
#define SEQ_MAX(a, b) ((SEQ_GT(a, b)) ? (a) : (b)) | #define SEQ_MAX(a, b) ((SEQ_GT(a, b)) ? (a) : (b)) | ||||
#define WIN_LT(a,b) ((short)(ntohs(a)-ntohs(b)) < 0) | |||||
#define WIN_LEQ(a,b) ((short)(ntohs(a)-ntohs(b)) <= 0) | |||||
#define WIN_GT(a,b) ((short)(ntohs(a)-ntohs(b)) > 0) | |||||
#define WIN_GEQ(a,b) ((short)(ntohs(a)-ntohs(b)) >= 0) | |||||
#define WIN_MIN(a, b) ((WIN_LT(a, b)) ? (a) : (b)) | |||||
#define WIN_MAX(a, b) ((WIN_GT(a, b)) ? (a) : (b)) | |||||
/* for modulo comparisons of timestamps */ | /* for modulo comparisons of timestamps */ | ||||
#define TSTMP_LT(a,b) ((int)((a)-(b)) < 0) | #define TSTMP_LT(a,b) ((int)((a)-(b)) < 0) | ||||
#define TSTMP_GT(a,b) ((int)((a)-(b)) > 0) | #define TSTMP_GT(a,b) ((int)((a)-(b)) > 0) | ||||
#define TSTMP_GEQ(a,b) ((int)((a)-(b)) >= 0) | #define TSTMP_GEQ(a,b) ((int)((a)-(b)) >= 0) | ||||
/* | /* | ||||
* Macros to initialize tcp sequence numbers for | * Macros to initialize tcp sequence numbers for | ||||
* send and receive from initial send and receive | * send and receive from initial send and receive | ||||
Show All 37 Lines |