TCP Header
Follow figure bit coordinates: 0-0 to 0-15 Sender port, 0-16 to 0-31 receiver Port, 32-0 to 32-31 sequence number,tcp serial number; .... 64-0 to 64-31 Ack number,tcp confirmation number, TCP serial number +1, 96-0 to 96-3 data offset, 96-4 to 96-6 reserved bit, 96-7 to 96-15 flag flag, 96-16 to 96-31 buffer size; 128-0 to 128-15 check digit; 128-16 to 128-31 identifies the location of the urgent data; 160-0 to ... option segment;TCP flag Flag bitNS (1 bit): ecn-nonce-concealment protection (Experimental:see RFC 3540). CWR (1 bit): Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment WI Th the ECE flag set and had responded in congestion control mechanism (added to header by RFC 3168). ECE (1 bit): Ecn-echo have a dual role, depending on the value of the SYN flag. It indicates:
If the SYN flag is set (1), then the TCP peer is an ECN capable. If The SYN flag is clear (0), which a packet with congestion experienced flag set (ecn=11) in IP header was received during Normal transmission (added to header by RFC 3168). This serves as a indication of network congestion (or impending congestion) to the TCP sender. URG (1 bit): Indicates that the Urgent pointer field was significant ACK (1 bit): Indicates that the acknowledgment field I S significant. All packets after the initial SYN packet sent by the client should has this flag set. PSH (1 bit): Push function. Asks to push the buffered data to the receiving application. RST (1 bit): Reset the connection SYN (1 bit): Synchronize sequence numbers. Only the first packet sent from each end should has this flag set. Some other flags and fields change meaning based on the this flag, and Some was only valid for when it was set, and others when It is clear. FIN (1 bit): Last packet from sender.
The position of the
flags corresponds to the bit coordinates in the figure above: 96-7 to 96-15;