TCP HEADER

 
Source Port: It is 16 bit field. The port is used in source host
Destination Port: It is 16 bit field. The port is used in destination host
Sequence Number:
     To make TCP reliable, the bytes are numbered. The receiver looks at the seq number so it can see if all packets arrived and put them in the correct order, even if they arrive out of order. The sender increments the seq number in each packet by the number data bytes in the previous packet. The seq number specifically is the number of the first byte of data in the packet. ISN (Initial Sequence Number)
Acknowledge Number:
     The receiver acknowledges the receipt of all data bytes that it has received. Specifically it is the byte number (i.e seq number) that the receiver is expecting to see next from the sender.
Data Offset: It indicates the length of the TCP header.
     Minimum length of TCP header is 20 bytes
     Maximum length of TCP header is 60 bytes
Reserved: For future use
Flags:
     URG - Urgent pointer field significant
     ACK - Acknowledgment field significant
     PSH - Push function
     RST - Reset the connection
     SYN - Synchronize sequence number
     FIN - Finish, no more data from sender
Window: It tells how much data, sender can send before the ACK's from the receiver for the previous data.
Checksum:
     Before a packet is sent, TCP runs both its header and data through a specific algorithm to arrive a checksum value, which is placed in the checksum field. When the receiver gets, it runs through the same algorithm. If the value matches, it accepts. If not it drops the packet.
Urgent pointer:
Options:
Padding: It is used to ensure the TCP header ends and data begins on a 32 bit boundary. The padding is composed of zeros