Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ udp(4P) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

recv(2)

send(2)

socket(2)

inet(4F)

socket(4)

     UDP(4P)                  Series 300 Only                  UDP(4P)

     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);

     HP-UX/COMPATIBILITY
          Level:    HP-UX/NON-STANDARD

          Origin:   UCB

          Remarks:  Implemented on the Series 300 only.

     DESCRIPTION
          UDP is a simple, unreliable datagram protocol which is 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 may 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 may be used), as well as designating
          the source from which packets will be received.  The recv(2)
          and read(2) calls may 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 (i.e. a UDP port
          may not be connected to a TCP port).

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

          [EISCONN]           when trying 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 is already connected;

          [EDESTADDRREQ]      when trying to send a datagram, but no
                              destination address is specified, and
                              the socket hasn't been connected;

          [ENOBUFS]           when the system runs out of memory for
                              an internal data structure;

     Hewlett-Packard               - 1 -             (printed 7/16/86)

     UDP(4P)                  Series 300 Only                  UDP(4P)

          [EADDRINUSE]        when an attempt is made to create a
                              socket with a port which has already
                              been allocated;

          [EADDRNOTAVAIL]     when an attempt is made to create a
                              socket with a network address for which
                              no network interface exists;
          [ENET]              when a hardware error is detected on the
                              interface card.

     SEE ALSO
          recv(2), send(2), socket(2), inet(4F), socket(4).

     Hewlett-Packard               - 2 -             (printed 7/16/86)

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