Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sendmsg(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                               sendmsg(2)



        _________________________________________________________________
        sendmsg                                               System Call
        Send a message from a socket.
        _________________________________________________________________


        SYNTAX

        #include <socket.h>

        int   sendmsg  (s, msg, user_flags)
        int             s;
        struct msghdr * msg;
        int             user_flags;


        PARAMETERS

        s              File descriptor of socket to send message from.


        msg            Message header packet.


        user_flags     Flags to use when sending.


        DESCRIPTION

        This call performs the same function as send or sendto except the
        arguments are repackaged in the msghdr.  The msghdr structure
        allows use of the IOV structure (see readv for a description of
        IOV) for access to non-contiguous buffers.

        If the msg_name field of the msghdr is null, this call is
        identical to send.  If the msg_name field of the msghdr is not
        null, it identifies the name of the destination for the message
        and this call is identical to sendto.


        ACCESS CONTROL

        None.


        RETURN VALUE

        1..<len>       Completed successfully. The call returns the
                       number of characters sent.





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





                                                               sendmsg(2)



        -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 not a socket.


        EFAULT         An invalid user space address was specified for a
                       parameter.


        EMSGSIZE       The socket requires that message be sent
                       atomically, and the size of the message made this
                       impossible.


        EAGAIN         The socket is marked non-blocking and the
                       requested operation would block.


        ENOTCONN       The socket is unconnected and requires a
                       destination address be specified.


        EISCONN        The socket is connected and cannot accept a
                       destination address.


        EINTR          The sendmsg() was interrupted by delivery of a
                       signal before any data was delivered.


        SEE ALSO

        The related manual sections:  recv(2), socket(2).










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



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