The TCP part of the TCP/IP set of protocols splits data up into easy-to-digest chunks known as datagrams or packets.

The TCP header consists of the following things.

  • Source Port
  • Destination Port
  • Sequence Number - Where in the sequence of packets this one is. TCP doesn't number the datagrams, but the octets. So if there are 500 octets of data in each datagram, the first datagram might be numbered 0, 500, 1000, 1500, etc.
  • Acknowledgement Number - For when an acknowledgement packet is sent, the highest packet number for which all the packets below have been recieved is put as the acknowledgement number.
  • Window - Used to restrict the number of packets sent depending on how much more time a slow computer takes to "absorb" packets. As more packets are processed the window goes up, as more are recieved it goes down. When the window is zero no packets are sent.
  • Checksum - Ensure data sent is correct.
  • Urgent Pointer