Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setsockopt(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                            setsockopt(2)



        _________________________________________________________________
        setsockopt                                            System Call
        Set options on sockets.
        _________________________________________________________________


        SYNTAX

        #include <socket.h>

        int   setsockopt  (s, level, optname, optval, optlen)
        int             s;
        int             level;
        int             optname;
        char *          optval;
        int             optlen;


        PARAMETERS

        s              File descriptor of socket to set options on.


        level          Level in socket that the options apply to (e.g.
                       socket level, implementing protocol level).


        optname        Name of options to set.


        optval         Value associated with option.


        optlen         Length of option to set (bytes).


        DESCRIPTION

        Setsockopt sets options associated with a socket.  Options may
        exist at multiple protocol levels; they are always present at the
        uppermost socket level.

        When setting socket options, the caller must specify the level at
        which the option resides and the name of the option.  To
        manipulate options at the socket level, <level> is specified as
        SOL_SOCKET.  To manipulate options at any other level, the
        protocol number of the appropriate protocol controlling the
        option is supplied.  See documentation for the domain being used.

        The parameters <optval> and <optlen> supply option values for
        setsockopt.  If no option value is to be supplied <optlen> must



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





                                                            setsockopt(2)



        be supplied as 0 and <optval> may be undefined.

        <Optname> and any specified options are passed uninterpreted to
        the appropriate protocol module for interpretation.  The include
        file <sys/socket.h> contains definitions for socket level
        options; see socket.  Options at other protocol levels vary in
        format and name; consult the related domain documentation.


        ACCESS CONTROL

        Consult domain documentation for any specific restrictions
        imposed by the domain.  SOL_SOCKET has no restrictions.


        RETURN VALUE

        0              Completed successfully.


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


        EXCEPTIONS

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


        EBADF          The argument <s> is not an active valid
                       descriptor.


        ENOTSOCK       The argument <s> is a file, not a socket.


        ENOPROTOOPT    The option is unknown.


        EFAULT         The options are not in a valid part of the process
                       address space.


        EINVAL         Invalid argument.


        ENOBUFS        No internal buffers available.


        SEE ALSO




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





                                                            setsockopt(2)



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




















































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



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