Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ socketpair(2) — DG/UX 5.4.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

read(2)

write(2)

inet(3N)



socketpair(2)                    DG/UX 5.4.2                   socketpair(2)


NAME
       socketpair - create a pair of connected sockets

SYNOPSIS
       #include <sys/socket.h>

       int  socketpair (d, type, protocol, sv)
       int  d;
       int  type;
       int  protocol;
       int  sv[];

   where:
       d         Domain of the socket, PF_UNIX

       type      Type of service, SOCK_STREAM/SOCK_DGRAM

       protocol  Protocol of interest, 0 for default

       sv        Buffer in which to return descriptors

DESCRIPTION
       The socketpair call creates an unnamed pair of connected sockets in
       the specified domain d, of the specified type, and using the
       optionally specified protocol.  The descriptors used in referencing
       the new sockets are returned in sv[0] and sv[1].  The two sockets are
       indistinguishable.

       This call is currently implemented only for the UNIX domain.

ACCESS CONTROL
       See related documentation on the domain of interest.

RETURN VALUE
       0      Completed successfully.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EMFILE              Too many descriptors are in use by this process.

       ENFILE              No per-system file descriptor available.

       EAFNOSUPPORT        The specified address family is not supported on
                           this machine.

       EPROTONOSUPPORT     The specified protocol is not supported on this
                           machine.

       EOPNOSUPPORT        The specified protocol does not support creation
                           of socket pairs.




Licensed material--property of copyright holder(s)                         1




socketpair(2)                    DG/UX 5.4.2                   socketpair(2)


       EFAULT              The address sv[] does not specify a valid part of
                           the process address space.

       ENOBUFS             No internal buffers available.

SEE ALSO
       read(2), write(2), inet(3N), unixipc(6F).


















































Licensed material--property of copyright holder(s)                         2


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