UDP
Last updated
Last updated
This User Datagram Protocol (UDP) is defined to make available a datagram mode of packet-switched computer communication in the environment of an interconnected set of computer networks.
This protocol provides a procedure for application programs to send messages to other programs with a minimum of protocol mechanism.
The protocol is transaction oriented, and delivery and duplicate protection are not guaranteed. Applications requiring ordered reliable delivery of streams of data should use the Transmission Control Protocol (TCP).
Source Port (16 bits) The source port number
Destination Port (16 bits) The destination port number
Length (16 bits) The length in octets of this user datagram including this header and the data
Checksum (16 bits) The checksum of information from the IP header, the UDP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets.
The pseudo header, conceptually prefixed to the UDP header, contains the source address, the destination address, the protocol, and the UDP length. This information gives protection against misrouted data- grams. This checksum procedure is the same as is used in TCP.
If the computed checksum is zero, it is transmitted as all ones (the equivalent in one's complement arith- metic). An all zero transmitted checksum value means that the transmitter generated no checksum (for debugging or for higher level protocols that don't care).