Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2009 03:47:53 GMT
From:      Fang Wang <fangwang@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 163466 for review
Message-ID:  <200906040347.n543lrtF093849@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163466

Change 163466 by fangwang@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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906040347.n543lrtF093849>