diff options
| author | Garrett Wollman <wollman@FreeBSD.org> | 1995-02-08 20:18:48 +0000 |
|---|---|---|
| committer | Garrett Wollman <wollman@FreeBSD.org> | 1995-02-08 20:18:48 +0000 |
| commit | eb6ad69646e1f88e4b1c94f8d6b1566eeebfde72 (patch) | |
| tree | 72d6a2f16cedf0d285c2428b762f112afaea7a08 /sys/netinet/tcp_seq.h | |
| parent | b185266a8a08b18b41ebcc7f0fa715ed1bf79447 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_seq.h')
| -rw-r--r-- | sys/netinet/tcp_seq.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/netinet/tcp_seq.h b/sys/netinet/tcp_seq.h index d6dc919f6e44..257e417fb16e 100644 --- a/sys/netinet/tcp_seq.h +++ b/sys/netinet/tcp_seq.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_seq.h 8.1 (Berkeley) 6/10/93 - * $Id: tcp_seq.h,v 1.2 1994/08/02 07:49:06 davidg Exp $ + * $Id: tcp_seq.h,v 1.3 1994/08/21 05:27:37 paul Exp $ */ #ifndef _NETINET_TCP_SEQ_H_ @@ -46,6 +46,25 @@ #define SEQ_GT(a,b) ((int)((a)-(b)) > 0) #define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0) +/* for modulo comparisons of timestamps */ +#define TSTMP_LT(a,b) ((int)((a)-(b)) < 0) +#define TSTMP_GEQ(a,b) ((int)((a)-(b)) >= 0) + +#ifdef TTCP +/* + * TCP connection counts are 32 bit integers operated + * on with modular arithmetic. These macros can be + * used to compare such integers. + */ +#define CC_LT(a,b) ((int)((a)-(b)) < 0) +#define CC_LEQ(a,b) ((int)((a)-(b)) <= 0) +#define CC_GT(a,b) ((int)((a)-(b)) > 0) +#define CC_GEQ(a,b) ((int)((a)-(b)) >= 0) + +/* Macro to increment a CC: skip 0 which has a special meaning */ +#define CC_INC(c) (++(c) == 0 ? ++(c) : (c)) +#endif + /* * Macros to initialize tcp sequence numbers for * send and receive from initial send and receive @@ -60,7 +79,13 @@ #define TCP_ISSINCR (125*1024) /* increment for tcp_iss each second */ +#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ) + /* timestamp wrap-around time */ + #ifdef KERNEL tcp_seq tcp_iss; /* tcp initial send seq # */ +#ifdef TTCP +tcp_cc tcp_ccgen; /* global connection count */ +#endif #endif #endif |
