Understanding TCP and UDP message formats

A TCP message is called a segment. A TCP segment consists of a header and a data section. The TCP header is often 20 bytes long (without TCP options). It can be described using the following screenshot:

The following is a brief description of each field:

  • The Source Port and the Destination Port have a length of 16 bits each. The source port is the port on the sending machine that transmits the packet, while the destination port is the port on the target machine that receives the packet.
  • The Sequence Number (32 bits), in a normal transmission, is the sequence number of the first byte of data of this ...

Get Kali Linux 2018: Assuring Security by Penetration Testing - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.