Timestamps (RFC 1323)

Windows Mobile 6.5
A version of this page is also available for

Windows Embedded CE supports TCP timestamps, as explained in RFC 1323, "TCP Extensions for High Performance," which can be viewed at the Internet Engineering Task Force Web site. Like SACK, timestamps are important for connections using large window sizes. Timestamps assist TCP in accurately measuring round trip time (RTT), which is used to adjust retransmission timeouts.

The TCP timestamps option carries two 4-byte timestamp fields. The TCP timestamps option header is shown here, from RFC 1323:

Kind: 8

Length: 10 bytes

|Kind=8 |  10   |   TS Value (TSval)  |TS Echo Reply (TSecr)|
    1       1              4                     4

The Timestamp Value field (TSval) contains the current value of the timestamp clock of the TCP sending the option. The Timestamp Echo Reply field echoes a timestamp value that was sent by the remote TCP in the TSval field of the Timestamps option. The TSecr field is only valid if the ACK bit is set in the TCP header. When TSecr is not valid, its value must be zero.

The TSecr value will generally be from the most recent timestamp option that was received. One possible exception is if a TCP transmission sends the timestamps option (TSopt) in an initial <SYN> segment, for example, a segment containing a SYN bit and no ACK bit, and sends a TSopt in other segments only if it received a TSopt in the initial <SYN> segment for the connection.

The timestamps option field can be viewed in a Network Monitor trace by expanding the TCP options field, as shown below.

TCP: Timestamps Option
    TCP: Option Type = Timestamps
    TCP: Option Length = 10 (0xA)
    TCP: Timestamp = 2525186 (0x268802)
    TCP: Reply Timestamp = 1823192 (0x1BD1D8)

Windows Embedded CE enables the timestamps option by default. You can disable timestamps by setting the Tcp1323Opts registry entry to 0. If you need to re-enable the option, you can set the registry entry to 2.

The value to be sent in the TSval field of the timestamps option is obtained from the timestamp clock, a type of virtual clock. To measure actual RTT, this clock's values must be approximately proportional to real time. For more information about the RTTM for timestamps, see RFC 1323 at the Internet Engineering Task Force Web site.

If more than one timestamps option is received before a reply segment is sent, the TCP must choose only one of the timestamp values (TSvals) to echo, ignoring the others. The unprocessed values are kept in the receiver as the timestamp state. To minimize this state, the receiver should keep no more than one timestamp in the connection control block. For more information about echoing for timestamp values, see RFC 1323 at the Internet Engineering Task Force Web site.

Community Additions