diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1998-11-17 19:23:04 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1998-11-17 19:23:04 +0000 |
commit | f4056acce40a0cafaefbc4d11482cc581a495726 (patch) | |
tree | 18b3206061d7da9c999130a9b9449317fa5c48db /sys/netinet/tcp.h | |
parent | b6b557f3649354e658028fd32cc7555b7f400c72 (diff) |
NewReno, SACK and FACK support for TCP, adapted from code for BSDI
by Hari Balakrishnan (hari@lcs.mit.edu), Tom Henderson (tomh@cs.berkeley.edu)
and Venkat Padmanabhan (padmanab@cs.berkeley.edu) as part of the
Daedalus research group at the University of California,
(http://daedalus.cs.berkeley.edu). [I was able to do this on time spent
at the Center for Information Technology Integration (citi.umich.edu)]
Diffstat (limited to 'sys/netinet/tcp.h')
-rw-r--r-- | sys/netinet/tcp.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 57069c1a682..39c001c3962 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp.h,v 1.2 1997/02/24 14:06:44 niklas Exp $ */ +/* $OpenBSD: tcp.h,v 1.3 1998/11/17 19:23:00 provos Exp $ */ /* $NetBSD: tcp.h,v 1.8 1995/04/17 05:32:58 cgd Exp $ */ /* @@ -75,6 +75,7 @@ struct tcphdr { #define TCPOPT_SACK_PERMITTED 4 /* Experimental */ #define TCPOLEN_SACK_PERMITTED 2 #define TCPOPT_SACK 5 /* Experimental */ +#define TCPOLEN_SACK 8 /* 2*sizeof(tcp_seq) */ #define TCPOPT_TIMESTAMP 8 #define TCPOLEN_TIMESTAMP 10 #define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ @@ -82,6 +83,20 @@ struct tcphdr { #define TCPOPT_TSTAMP_HDR \ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) +#ifdef TCP_SACK +/* Option definitions */ +#define TCPOPT_SACK_PERMIT_HDR \ +(TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_SACK_PERMITTED<<8|TCPOLEN_SACK_PERMITTED) +#define TCPOPT_SACK_HDR (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_SACK<<8) +/* Miscellaneous constants */ +#define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at sender side */ +#define TCP_MAX_SACK 3 /* MAX # SACKs sent in any segment */ +#endif /* TCP_SACK */ + +#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#define TCP_MAXBURST 4 /* Max # packets after leaving Fast Rxmit */ +#endif + /* * Default maximum segment size for TCP. * With an IP MSS of 576, this is 536, @@ -99,3 +114,6 @@ struct tcphdr { */ #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ #define TCP_MAXSEG 0x02 /* set maximum segment size */ +#ifdef TCP_SACK +#define TCP_SACK_DISABLE 0x300 /* disable SACKs(if enabled by deflt.)*/ +#endif /* TCP_SACK */ |