TCP header field definitions

Short descriptions of each of the Transmission Control Protocol (TCP) fields follow.

Item Description
Source Port Identifies the port number of a source application program.
Destination Port Identifies the port number of a destination application program.
Sequence Number Specifies the sequence number of the first byte of data in this segment.
Acknowledgment Number Identifies the position of the highest byte received.
Data Offset Specifies the offset of data portion of the segment.
Reserved Reserved for future use.
Code Control bits to identify the purpose of the segment:
URG
Urgent pointer field is valid.
ACK
Acknowledgement field is valid.
PSH
Segment requests a PUSH.
RTS
Resets the connection.
SYN
Synchronizes the sequence numbers.
FIN
Sender has reached the end of its byte stream.
Window Specifies the amount of data the destination is willing to accept.
Checksum Verifies the integrity of the segment header and data.
Urgent Pointer Indicates data that is to be delivered as quickly as possible. This pointer specifies the position where urgent data ends.
Options
End of Option List
Indicates the end of the option list. It is used at the final option, not at the end of each option individually. This option needs to be used only if the end of the options would not otherwise coincide with the end of the TCP header.
No Operation
Indicates boundaries between options. Can be used between other options; for example, to align the beginning of a subsequent option on a word boundary. There is no guarantee that senders will use this option, so receivers must be prepared to process options even if they do not begin on a word boundary.
Maximum Segment Size
Indicates the maximum segment size TCP can receive. This is only sent in the initial connection request.

The applications programming interface to TCP consists of a set of library subroutines provided by the sockets interface.