From fa9880c21858786bc85fd63347908d9ce307e4d6 Mon Sep 17 00:00:00 2001 From: andre Date: Mon, 26 Jun 2006 15:35:25 +0000 Subject: Some cleanups and janitorial work to tcp_dooptions(): o redefine the parameter 'is_syn' to 'flags', add TO_SYN flag and adjust its usage accordingly o update the comments to the tcp_dooptions() invocation in tcp_input():after_listen to reflect reality o move the logic checking the echoed timestamp out of tcp_dooptions() to the only place that uses it next to the invocation described in the previous item o adjust parsing of TCPOPT_SACK_PERMITTED to use the same style as the others o add comments in to struct tcpopt.to_flags #defines No functional changes. Sponsored by: TCP/IP Optimization Fundraise 2005 --- sys/netinet/tcp_var.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sys/netinet/tcp_var.h') diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 7d36c71..c58b44e 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -229,9 +229,9 @@ struct tcpcb { */ struct tcpopt { u_long to_flags; /* which options are present */ -#define TOF_TS 0x0001 /* timestamp */ -#define TOF_MSS 0x0010 -#define TOF_SCALE 0x0020 +#define TOF_TS 0x0001 /* timestamp */ +#define TOF_MSS 0x0010 /* maximum segment size */ +#define TOF_SCALE 0x0020 /* window scaling */ #define TOF_SIGNATURE 0x0040 /* signature option present */ #define TOF_SIGLEN 0x0080 /* signature length valid (RFC2385) */ #define TOF_SACK 0x0100 /* Peer sent SACK option */ @@ -243,6 +243,11 @@ struct tcpopt { u_char *to_sacks; /* pointer to the first SACK blocks */ }; +/* + * Flags for tcp_dooptions. + */ +#define TO_SYN 0x01 /* parse SYN-only options */ + struct hc_metrics_lite { /* must stay in sync with hc_metrics */ u_long rmx_mtu; /* MTU for this path */ u_long rmx_ssthresh; /* outbound gateway buffer limit */ -- cgit v1.1