Changeset View
Changeset View
Standalone View
Standalone View
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_LT(a,b) (ntohs(a) < ntohs(b)) | ||||
#define WIN_LEQ(a,b) ((short)(ntohs(a)-ntohs(b)) <= 0) | #define WIN_LEQ(a,b) (ntohs(a) <= ntohs(b)) | ||||
#define WIN_GT(a,b) ((short)(ntohs(a)-ntohs(b)) > 0) | #define WIN_GT(a,b) (ntohs(a) > ntohs(b)) | ||||
#define WIN_GEQ(a,b) ((short)(ntohs(a)-ntohs(b)) >= 0) | #define WIN_GEQ(a,b) (ntohs(a) >= ntohs(b)) | ||||
#define WIN_MIN(a, b) ((WIN_LT(a, b)) ? (a) : (b)) | #define WIN_MIN(a, b) ((WIN_LT(a, b)) ? (a) : (b)) | ||||
#define WIN_MAX(a, b) ((WIN_GT(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) | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |