DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Introducing the Internet protocols

User Datagram Protocol (UDP)

UDP provides connectionless datagram communication between applications on networked hosts. As the sender does not know which processes are active on the destination host at any given moment, UDP uses a destination protocol port number (a positive integer) to specify the type of service that is required from the remote host. A protocol port receives and holds messages in queues until an application is ready to retrieve them.

UDP provides connectionless, unreliable message delivery in a similar manner to IP. It offers no assurance that datagrams will be delivered nor does it protect against duplication. Applications that require reliable delivery of datagrams must implement their own reliability checks when using UDP. The receiving application can use the source and destination port numbers and checksum in the UDP header to verify that a message has been delivered correctly. Applications that require reliable delivery of streams of data should use TCP.

The format of a UDP header is illustrated in ``UDP header format''.

UDP header format

A UDP header contains the following fields:


source port
The protocol port number sending the information.

destination port
The protocol port number receiving the information.

length
The length of the UDP datagram in bytes.

checksum
A number that is computed to ensure the integrity of the entire UDP datagram including the data.

© 2002 Caldera International, Inc. All rights reserved.
UnixWare 7 Release 7.1.3 - 30 October 2002