PERFORCE change 163466 for review
Fang Wang
fangwang at FreeBSD.org
Thu Jun 4 03:47:55 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=163466
Change 163466 by fangwang at fangwang_utobsd on 2009/06/04 03:47:21
Attach uto option to tcp header.
Affected files ...
.. //depot/projects/soc2009/tcputo/src/sys/netinet/tcp_output.c#2 edit
.. //depot/projects/soc2009/tcputo/src/sys/netinet/tcp_var.h#5 edit
Differences ...
==== //depot/projects/soc2009/tcputo/src/sys/netinet/tcp_output.c#2 (text+ko) ====
@@ -1440,6 +1440,16 @@
TCPSTAT_INC(tcps_sack_send_blocks);
break;
}
+ case TOF_UTO:
+ {
+ unsigned short uto_load = (unsigned short)to->to_granularity;
+ uto_load += to->to_uto;
+ if (TCP_MAXOLEN - optlen < TCPOLEN_UTO)
+ continue;
+ optlen += TCPOLEN_UTO;
+ bcopy((u_char *)&uto_load, optp, sizeof(uto_load));
+ optp += sizeof(uto_load);
+ }
default:
panic("%s: unknown TCP option type", __func__);
break;
==== //depot/projects/soc2009/tcputo/src/sys/netinet/tcp_var.h#5 (text+ko) ====
@@ -275,8 +275,8 @@
#define TOF_TS 0x0010 /* timestamp */
#define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */
#define TOF_SACK 0x0080 /* Peer sent SACK option */
-#define TOF_MAXOPT 0x0100
-#define TOF_UTO 0x0200 /* user timeout (RFC5482) */
+#define TOF_UTO 0x0100 /* user timeout (RFC5482) */
+#define TOF_MAXOPT 0x0200
u_int32_t to_tsval; /* new timestamp */
u_int32_t to_tsecr; /* reflected timestamp */
u_int16_t to_mss; /* maximum segment size */
More information about the p4-projects
mailing list