Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bind(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                  bind(2)



        _________________________________________________________________
        bind                                                  System Call
        Bind a name to a socket.
        _________________________________________________________________


        SYNTAX

        #include <socket.h>

        int   bind  (s, name, namelen)
        int             s;
        struct sockaddr * name;
        int             namelen;


        PARAMETERS

        s              Socket to bind.


        name           Name to bind to socket.


        namelen        Length of name (bytes).


        DESCRIPTION

        Bind requests that address <name>, be bound to socket <s>.

        The rules for name binding vary between communication domains.
        Consult the related documentation for a specific domain for
        details about that domain.

        Binding a name in the UNIX domain creates a file of type S_IFSOCK
        (socket special) in the file system that the caller must delete
        when it is no longer needed (using unlink).  The file created is
        a side-effect of the current implementation, and may not be
        created in future versions of the UNIX IPC domain.


        ACCESS CONTROL

        None. (See related domain specific information for restrictions
        on names.)


        RETURN VALUE

        0              The call was successful.  descriptor for the



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





                                                                  bind(2)



                       accepted socket.


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


        EXCEPTIONS

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


        EBADF          <s> is not an active valid descriptor.


        ENOTSOCK       <s> is not a socket.


        EADDRNOTAVAIL  The address is not a valid address for the local
                       machine.


        EADDRINUSE     The address is already in use.


        EINVAL         The socket is already bound to an address.


        EACCES         The requested address is protected, and the
                       current user has inadequate permission to access
                       it.


        EFAULT         The <name> parameter is not in a valid part of the
                       user address space.


        ENOBUFS        No internal buffers available.


        EISCONN        Socket is already connected.


        SEE ALSO

        The related manual sections:  inet(3N), inet(6F), unix_ipc(6F),
        connect(2), listen(2), select(2), socket(2).







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



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