This preview shows page 1. Sign up to view the full content.
Unformatted text preview: those details), but in the protocol features of UDP that affect the design and
implementation of a server using UDP. (We examine the details of TCP server design in
Section 18.11.) Although some of the features we describe depend on the implementation of
UDP being used, the features are common to most implementations.
Client IP Address and Port Number
What arrives from the client is a UDP datagram. The IP header contains the source and
destination IP addresses, and the UDP header contains the source and destination UDP port
numbers. When an application receives a UDP datagram, it must be told by the operating
system who sent the message-the source IP address and port number.
This feature allows an iterative UDP server to handle multiple clients. Each reply is sent back to
the client that sent the request.
Destination IP Address
Some applications need to know who the datagram was sent to, that is, the destination IP
address. For example, the Host Requirements RFC states that a TFTP server should ignore
received datagrams that are sent to a broadcast address. (We describe broadcasting in Chapter
12 and TFTP in Chapter 15.)
This requires the operating system to pass the destination IP address from the received UDP
datagram to the application. Unfortunately, not all implementations provide this capability.
The sockets API provides this capability with the IP_RECVDSTADDR socket option. Of the
systems used in the text, only BSD/386, 4.4BSD, and AIX 3.2.2 support this option. SVR4,
SunOS 4.x, and Solaris 2.x don't support it.
UDP Input Queue file:///D|/Documents%20and%20Settings/bigini/Doc...omenet2run/tcpip/tcp-ip-illustrated/udp_user.htm (22 of 29) [12/09/2001 14.46.58] Chapter 11. UDP: User Datagram Protocol We said in Section 1.8 that most UDP servers are iterative servers. This means a single server
process handles all the client requests on a single UDP port (the server's well-known port).
Normally there is a limited size input queue associated with each UDP port that a application is
using. This means that requests that arrive...
View Full Document
This test prep was uploaded on 04/04/2014 for the course ECE EL5373 taught by Professor Guoyang during the Spring '12 term at NYU Poly.
- Spring '12