diff options
author | andre <andre@FreeBSD.org> | 2007-03-15 15:59:28 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2007-03-15 15:59:28 +0000 |
commit | da1f4962209103a9c4b8de8081614312a2c05864 (patch) | |
tree | 958c5cc9f9700b70c7ad5f201a98774762724e25 /sys/netinet/tcp.h | |
parent | e384ffc370ce3185a1575f148f487dbaad04de2c (diff) | |
download | FreeBSD-src-da1f4962209103a9c4b8de8081614312a2c05864.zip FreeBSD-src-da1f4962209103a9c4b8de8081614312a2c05864.tar.gz |
Consolidate insertion of TCP options into a segment from within tcp_output()
and syncache_respond() into its own generic function tcp_addoptions().
tcp_addoptions() is alignment agnostic and does optimal packing in all cases.
In struct tcpopt rename to_requested_s_scale to just to_wscale.
Add a comment with quote from RFC1323: "The Window field in a SYN (i.e.,
a <SYN> or <SYN,ACK>) segment itself is never scaled."
Reviewed by: silby, mohans, julian
Sponsored by: TCP/IP Optimization Fundraise 2005
Diffstat (limited to 'sys/netinet/tcp.h')
-rw-r--r-- | sys/netinet/tcp.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 04c8663..3f744fb 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -76,14 +76,17 @@ struct tcphdr { }; #define TCPOPT_EOL 0 +#define TCPOLEN_EOL 1 #define TCPOPT_NOP 1 +#define TCPOLEN_NOP 1 #define TCPOPT_MAXSEG 2 #define TCPOLEN_MAXSEG 4 #define TCPOPT_WINDOW 3 #define TCPOLEN_WINDOW 3 -#define TCPOPT_SACK_PERMITTED 4 /* Experimental */ +#define TCPOPT_SACK_PERMITTED 4 #define TCPOLEN_SACK_PERMITTED 2 -#define TCPOPT_SACK 5 /* Experimental */ +#define TCPOPT_SACK 5 +#define TCPOLEN_SACKHDR 2 #define TCPOLEN_SACK 8 /* 2*sizeof(tcp_seq) */ #define TCPOPT_TIMESTAMP 8 #define TCPOLEN_TIMESTAMP 10 |