Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ socketpair(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                            socketpair(2)



        _________________________________________________________________
        socketpair                                            System Call
        Create a pair of connected sockets.
        _________________________________________________________________


        SYNTAX

        #include <socket.h>

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


        PARAMETERS

        d              Domain of the socket, PF_UNIX.


        type           Type of service, SOCK_STREAM/SOCK_DGRAM.


        protocol       Protocol of interest, 0 for default.


        sv             Buffer to return descriptors in.


        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.




        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                            socketpair(2)



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


        EXCEPTIONS

        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.


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


        ENOBUFS        No internal buffers available.


        SEE ALSO

        The related manual sections:  inet(3N), inet(6F), unix_ipc(6F),
        read(2), write(2).















        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



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