.\" Modified Oct 2003 by aeb
.\" Modified 2004-07-01 by mtk
.\"
-.TH SEND 2 2009-02-23 "Linux" "Linux Programmer's Manual"
+.TH SEND 2 2012-04-23 "Linux" "Linux Programmer's Manual"
.SH NAME
send, sendto, sendmsg \- send a message on a socket
.SH SYNOPSIS
.BR write (2)
is the presence of
.IR flags .
-With zero
+With a zero
.I flags
argument,
.BR send ()
struct iovec *msg_iov; /* scatter/gather array */
size_t msg_iovlen; /* # elements in msg_iov */
void *msg_control; /* ancillary data, see below */
- socklen_t msg_controllen; /* ancillary data buffer len */
+ size_t msg_controllen; /* ancillary data buffer len */
int msg_flags; /* flags on received message */
};
.fi
see their respective manual pages.
.TP
.B EACCES
-(For Unix domain sockets, which are identified by pathname)
+(For UNIX domain sockets, which are identified by pathname)
Write permission is denied on the destination socket file,
or search permission is denied for one of the directories
the path prefix.
(See
.BR path_resolution (7).)
+.sp
+(For UDP sockets) An attempt was made to send to a
+network/broadcast address as though it was a unicast address.
.TP
.BR EAGAIN " or " EWOULDBLOCK
.\" Actually EAGAIN on Linux
and
.B MSG_EOR
flags.
+POSIX.1-2008 adds a specification of
+.BR MSG_NOSIGNAL .
The
.B MSG_CONFIRM
flag is a Linux extension.
.SH NOTES
-The prototypes given above follow the Single Unix Specification,
+The prototypes given above follow the Single UNIX Specification,
as glibc2 also does; the
.I flags
argument was \fIint\fP in 4.x BSD, but \fIunsigned int\fP in libc4 and libc5;
.I msghdr
structure should be typed as
.IR socklen_t ,
-but glibc currently (2.4) types it as
+but glibc currently types it as
.IR size_t .
.\" glibc bug raised 12 Mar 2006
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
.\" The problem is an underlying kernel issue: the size of the
.\" __kernel_size_t type used to type this field varies
.\" across architectures, but socklen_t is always 32 bits.
+
+See
+.BR sendmmsg(2)
+for information about a Linux-specific system call
+that can be used to transmit multiple datagrams in a single call.
.SH BUGS
Linux may return
.B EPIPE
.BR recv (2),
.BR select (2),
.BR sendfile (2),
+.BR sendmmsg (2),
.BR shutdown (2),
.BR socket (2),
.BR write (2),