TCP Packet Format![]()
Source Port and Destination port Identify points at which upper-layer source and destination processes receive TCP services.
Sequence Number Usually specifies the number assigned to the first byte of data in the current message. In the connection-establishment phase, this field also can be used to identify an initial sequence number to be used in an upcoming transmission.
Acknowledgment Number Contains the sequence number of the next byte of data the sender of the packet expects to receive.
Data Offset Indicates the number of 32-bit words in the TCP header.
Reserved Remains reserved for future use.
Flags Carries a variety of control information, including the SYN and ACK bits used for connection establishment, and the FIN bit used for connection termination.
URG: Urgent pointer field significant, i.e. do urgent processing on the data.
ACK: Acknowledgement field significant, i.e. contains the next expected sequence number.
PSH: Push function, i.e. this segment contains datathat must be pushed through.
RST: Reset connection, i.e. the receiver should reset that connection.
SYN: Synchronize sequence number, i.e. initiate the connection with this sequence number.
FIN: Finish, i.e. no more data from the sender.Window Specifies the size of the sender's receive window (that is, the buffer space available for incoming data).
Checksum Indicates whether the header was damaged in transit.
Urgent Pointer Points to the first urgent data byte in the packet.
Options Specifies various TCP options.
Data Contains upper-layer information.