Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ udp(7) — GL1 W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

net(7)

inet(7)

UDP(7)  —  Silicon Graphics

NAME

udp − Internet User Datagram Protocol

SYNOPSIS

#include <sys/socket.h>
#include <net/in.h>
struct sockproto proto = { PF_INET, IPPROTO_UDP };
socket(SOCK_DGRAM, &proto, address, options);
struct sockaddr_in *address; int options;

DESCRIPTION

UDP is a simple, unreliable datagram protocol which supports the SOCK_DGRAM abstraction for the Internet protocol family.  UDP sockets are connectionless, and normally use send(3N) and receive(3N) calls.  The destination for future packets can be set via a connect(3N) call.  Then read(2) and write(2) system calls can be used. 

UDP address formats are identical to those used for TCP.  UDP provides a port identifier in addition to the normal Internet address format.  UDP port space is not part of TCP port space (i.e. a UDP port may not be "connected" to a TCP port). 

DIAGNOSTICS

EISCONN--trying to establish a connection on an already connected socket, or trying to send a datagram with a destination address and the socket is already connected;

ENOTCONN--trying to send a datagram, but no destination address is specified, and the socket hasn’t been connected;

ENOBUFS--the system does nor have enough memory for an internal data structure;

EADDRINUSE--attempted to create a socket with a port which is allocated;

EADDRNOTAVAIL--attempted to create a socket with an invalid network interface. 

SEE ALSO

net(7), inet(7)

Version 2.3  —  July 04, 1985

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