Query: udp
OS: ultrix
Section: 4p
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
udp(4p) udp(4p) Name udp - Internet User Datagram Protocol Syntax #include <sys/socket.h> #include <netinet/in.h> s = socket(AF_INET, SOCK_DGRAM, 0); Description UDP is a simple, unreliable datagram protocol that is used to support the SOCK_DGRAM abstraction for the Internet protocol family. UDP sockets are connectionless and are normally used with the and calls, though the call can also be used to fix the destination for future packets (in which case the or and or system calls may be used). UDP address formats are identical to those used by TCP. In particular, UDP provides a port identifier in addition to the normal Internet address format. Note that the UDP port space is separate from the TCP port space (for example, a UDP port may not be ``connected'' to a TCP port). In addition broadcast packets can be sent (assuming the underlying network supports this) by using a reserved ``broadcast address''; this address is network interface dependent. The SO_BROADCAST option must be set on the socket for broadcasting to succeed. Diagnostics A socket operation may fail with one of the following errors returned: [EISCONN] Try to establish a connection on a socket which already has one, or when trying to send a datagram with the destination address specified and the socket already connected. [ENOTCONN] Try to send a datagram, but no destination address is specified, and the socket has not been connected. [ENOBUFS] The system runs out of memory for an internal data structure. [EADDRINUSE] An attempt is made to create a socket with a port that has already been allocated. [EADDRNOTAVAIL] An attempt is made to create a socket with a network address for which no network interface exists. See Also getsockopt(2), send(2), socket(2) recv(2), intro(4n), inet(4f) udp(4p)
Related Man Pages |
---|
udp(4p) - bsd |
icmp(4p) - ultrix |
udp(4p) - ultrix |
cltp(4) - netbsd |
udp(4) - netbsd |
Similar Topics in the Unix Linux Community |
---|
address in use |
how can change udp lenght? |
network problems with sco |
Store file into a buffer to send it through a socket |
how to do udp broadcast with multithreading |