TCP Packet Format
TCP Packet Format
Source Port(16 bits): It holds the source/transmitting application’s port number and
helps in determining the application where the data delivery is planned.
Destination Port (16 bits): This field has the port number of the transmitting
application and helps to send the data to the appropriate application.
Sequence Number (32 bits): It ensures that the data is received in proper order by
ordered segmenting and reassembling them at the receiving end.
Acknowledgment Number (32 bits): This field contains the upcoming sequence
number and it acknowledges the feedback up to that.
Data Offset (4 bits): The data offset field indicates the starting point of
the TCP data payload also storing the size of the TCP header.
Control Flags (9 bits): TCP uses a few control flags to regulate communication.
Some of the important flags include:
Window Size (16 bits): The size of the sender’s receive window is specified by this
property.
Checksum (16 bits): It reveals if the header was damaged during transportation.
Urgent Pointer (16 bits): This field points to the packet’s first byte of urgent data.
Options (Variable length): This field represents the different TCP options.
Data Payload: This field mainly contains the information which is the actual
application data that is being transmitted.