![](https://static.wixstatic.com/media/eb0d03_3170227b357b4eae9b79fd969f52e995~mv2.jpg/v1/fill/w_883,h_484,al_c,q_85,enc_avif,quality_auto/eb0d03_3170227b357b4eae9b79fd969f52e995~mv2.jpg)
TCP Header:
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol (IP) suite, and it is responsible for ensuring the reliable delivery of data between applications running on different hosts.
The TCP header is the part of a TCP packet that contains control information and is used to direct the flow of data across a network.
A TCP header is composed of several fields, each of which serves a specific purpose. Some of the most important fields in the TCP header are:
Source Port:
This 16-bit field identifies the port of the sending device.
Destination Port:
This 16-bit field identifies the port of the receiving device.
Sequence Number:
This 32-bit field contains a number that is used to keep track of the order of the packets.
Acknowledgment Number:
This 32-bit field contains a number that is used to acknowledge the receipt of data.
Data Offset:
This 4-bit field indicates the size of the TCP header in 32-bit words.
Flags:
This 6-bit field contains several individual flags that indicate different states of the connection, such as whether a packet contains data or is just an acknowledgment.
6 bits (URG: 1 bit, ACK: 1 bit, PSH: 1 bit, RST: 1 bit, SYN: 1 bit, FIN: 1 bit)
Window Size:
This 16-bit field indicates the amount of data that the receiving device is willing to accept.
Checksum:
This 16-bit field contains a checksum value that is used to verify the integrity of the data.
Urgent Pointer:
16 bits (only present if the URG flag is set)
Options:
0 to 320 bits (variable length, only present if the Data Offset field is greater than 5)
·
Wireshark pcap detail info of TCP Header