Contents

sock_sendmbuf

Declaration

errno_t sock_sendmbuf(socket_t so, const struct msghdr *msg, mbuf_t data, int flags, size_t *sentlen);

Parameters

  • so:

    The socket.

  • msg:

    The msg describing how the data should be sent. The msg_iov is ignored. msg may be NULL.

  • data:

    The mbuf chain of data to send.

  • flags:

    See 'man 2 sendmsg'.

  • sentlen:

    The number of bytes sent.

Return Value

0 on success, EWOULDBLOCK if non-blocking and operation would cause the thread to block, otherwise the errno error. Regardless of return value, the mbuf chain 'data' will be freed.

Discussion

Send data in an mbuf on a socket. Similar to sock_send only the data to be sent is taken from the mbuf chain.

See Also

Network Kernel Extensions