Re: sendmmsg(2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12.09.2011 20:47:32, +0200, Stephan Mueller
<stephan.mueller@xxxxxxxxx> wrote:

Hi,

> On 09.09.2011 23:56:46, +0200, Stephan Mueller
> <stephan.mueller@xxxxxxxxx> wrote:
> 
> Hi,
> 
>>
>> Let us take the BSD license.
>>
>> Thank you very much.
> 
> Please find the updated man page attached. Unfortunately, I am not sure
> which version you want to have these files, I now appended the unzipped
> file as the tarball you distribute contains the unzipped files as well.
> 
There is a cleaned up version attached. I ensured that arguments are
formatted with .IR and function names with .BR.

-- 
Ciao
Stephan
.\" Copyright (c) 2011, Stephan Mueller <smueller@xxxxxxxxx>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" * Redistributions of source code must retain the above copyright
.\"   notice, this list of conditions and the following disclaimer.
.\" * Redistributions in binary form must reproduce the above copyright
.\"   notice, this list of conditions and the following disclaimer in
.\"   the documentation and/or other materials provided with the
.\"   distribution.
.\" * Neither the name of the atsec information security corp.
.\"   nor the names of its contributors may be used to endorse or
.\"   promote products derived from this software without specific prior
.\"   written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY atsec information security corp.
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE <copyright-holder>
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" Parts of this man page are derived from recvmmsg(2).
.TH SENDMMSG 2 2010-11-23 "Linux" "Linux Programmer's Manual"
.SH NAME
sendmmsg \- send multiple messages on a socket
.SH SYNOPSIS
.BI "#include <sys/socket.h>"
.br
.BI "int sendmmsg(int " fd ", struct mmsghdr *" mmsghdr \
", unsigned int " vlen ","
.br
.BI "             unsigned int " flags ");" 
.SH DESCRIPTION
The 
.B sendmmsg 
system call transmits multiple messages to another socket.
It acts similar to 
.BR sendmsg (2),
but allows to batch multiple send operations into a single syscall.

.I fd 
is the file descriptor of the socket data is transmitted through. 
.I mmsghdr
is a pointer to an array with length
.I vlen
of  
.I mmsghdr
structures. 
.I struct mmsg 
is defined in
.I sys/socket.h
as:
.in +4n
.nf
struct mmsghdr {
    struct msghdr msg_hdr;  /* Message header */
    unsigned int  msg_len;
};
.fi
.in
.PP
.I msg_hdr 
is a struct
.I msghdr
as described in
.BR sendmsg (2).
.I msg_len
is the number of bytes send for the message in the entry.
This field has the same value as the return value of a single
.IR sendmsg (2)
on the header.

.B flags
contains flags ored together. The flags are the same
as documented for
.BR sendmsg (2).
.SH RETURN VALUE
.I sendmmsg
returns the number of messages sent in
.I mmsghdr
or 
-1
when an error occurs. The 
.I msg_len
members of 
.I mmsghdr
are updated for each sent message,
in addition to other fields in the msg_hdr for each message,
as described in 
.IR sendmsg (2).
.SH SEE ALSO
.BR recvmsg (2),
.BR recvmmsg (2),
.BR sendmsg (2),
.BR socket (7),
.BR socket (2),
.BR clock_gettime (2)
.SH VERSIONS
The
.B sendmmsg
syscall was added with kernel 3.0.
On earlier glibcs the function can be called
manually using 
.IR syscall (2).


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux