Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ udp(7P) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

recv(2)

send(2)

socket(2)

inet(7F)

socket(7)

mount(1M)

UDP(7P)  —  Series 300 and 800 Only

NAME

udp − internet user datagram protocol

SYNOPSIS

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

s = socket(AF_INET, SOCK_DGRAM, 0);

DESCRIPTION

UDP is a simple, unreliable datagram protocol used to support the SOCK_DGRAM socket type for the internet protocol family.  UDP sockets are connectionless, and are normally used with the sendto(2) and recvfrom(2) calls. The connect(2) call can also be used to simulate a connection; when used in this manner, it fixes the destination for future transmitted packets (in which case the send(2) or write(2) system calls can be used), as well as designating the source from which packets are received. The recv(2) and read(2) calls can be used at any time if the source of the message is unimportant.

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 domain is separate from the TCP port domain (in other words, a UDP port cannot be connected to a TCP port). 

DIAGNOSTICS

A socket operation may fail with one of the following errors returned in errno:

[EISCONN] Trying to establish a connection on a socket which already has one, or trying to send a datagram with the destination address specified but the socket is already connected. 

[ENOBUFS] The system ran out of memory for an internal data structure. 

[EADDRINUSE] An attempt is made to create a socket with a port which has already been allocated. 

[EADDRNOTAVAIL] An attempt is made to create a socket with a network address for which no network interface exists. 

DEPENDENCIES

Implemented on the Series 300 and 800 only. This entry describes the use of the UDP protocol as it applies to the Berkeley Interprocess Communication utility. 
 
Series 300 and 800:

The maximum message size is 9216 bytes.  This value cannot be altered by the setsockopt(2) options described in getsockopt(2).  The maximum burst size is 3 messages. 

AUTHOR

UCB (University of California at Berkeley)

SEE ALSO

recv(2), send(2), socket(2), inet(7F), socket(7). 

NFS Services mount(1M). 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026