- Tech know how online

code field (TCP)

The code field is used in various protocol headers. For example, in the Transmission Control Protocol( TCP), Exterior Gateway Protocol( EGP) or the Internet Control Message Protocol( ICMP).

In the TCP header, the code field is a control flag field used for communication control and to acknowledge other fields. The code field is an 8-bit field with the top two bits reserved for future use. Bit 6 is the URG(Urgent) bit, which indicates that the transmitted data will be processed with priority. Bit 5, the ACK bit (Acknowledgment), indicates that the acknowledgement number is set. Bit 4, the PSH bit (Push), is used to pass the data directly to the application layer. Bit 3, the RST bit (Reset), is set when the connection is released. Bit 2, the SYN bit (Synchronization), sets when the connection is established, and bit 1, the FIN bit, is set when the connection is established.

In the EGP header, the code field defines the type of EGP. It is an 8-bit long field indicating whether it is a command or a response to a command.

In the ICMP header, the Code field is an eight-bit data field that follows the Type field, and together with it specifies the function of the ICMP message. It is set only for certain types of packets, for example, when the destination computer or network is unreachable, the datagram has been redirected, or when parameterization problems occur. For example, a router that cannot deliver data packets sends an ICMP message back to the sending station and specifies the reason with the digits in the Type and Code fields.

Englisch: code field (TCP)
Updated at: 22.08.2009
#Words: 262
Links: code, field, protocol, tape carrier package (chip design) (TCP), exterior gateway protocol (EGP)
Translations: DE

All rights reserved DATACOM Buchverlag GmbH © 2024