Navigation bar
  Start Previous page  6 of 35  Next page End Home  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  

 Figure 1.  TCP Header Format
Embedded Web Server for the CR16
National Semiconductor
Jeff Wright
0 1  2  3  4  5  6  7  8  9  0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5  6  7  8  9  0  1
Destination Port
Urgent Pointer
Header Checksum
Source Port
Sequence Number
Acknowledgment Number
0                                    1                                      2                                      3
Figure 1. TCP Header Format
TCP includes mechanisms to recover data that has been damaged, lost, duplicated, or received
out of order.  These mechanisms include:
Assigning a number to each byte transmitted (the sequence number), and requiring an
acknowledgement (or, “ACK”) from the receiving TCP for all bytes sent.  If such an
acknowledgment is not received within a predefined timeout interval, the data is
retransmitted.  At the receiver, these sequence numbers are used to reconstruct the
original data. 
It is possible for segments to be received out of order, should they be routed through
paths having unequal transit times.  In addition, consequent to the varying and
potentially unequal delays incurred by different segments, a transmitting TCP may not
receive a timely acknowledgement should a segment be unduly delayed.  In that case, the
transmitter would resend this segment - incorrectly inferring that it had been either
lost or damaged, resulting in the reception of duplicated segments by the receiving TCP.  
In both of these cases, the segments’ sequence numbers help ensure that the data
reconstructed by the receiving TCP exactly matches that originally sent.  Segments
received out of order are correctly reordered, and duplicate segments are discarded. 
Including a checksum for each segment transmitted.  This checksum must be confirmed
by the receiving TCP.  Should a segment’s checksum fail, it is not acknowledged.  In this
case, the sending TCP will eventually resend this segment.
Flow Control:
TCP utilizes a method of flow control called a window.  The window is a 16-bit value transmitted
in every segment header indicating the maximum number of bytes that the sender may transmit
before receiving further permission.  More on this later… White Papers Previous page Top Next page