OSDN Git Service

(split) LDP: Update original to LDP v3.52.
[linuxjm/LDP_man-pages.git] / original / man2 / send.2
index eaeeb3a..2019857 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright (c) 1983, 1991 The Regents of the University of California.
 .\" All rights reserved.
 .\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
@@ -28,6 +29,7 @@
 .\" 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.
+.\" %%%LICENSE_END
 .\"
 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
 .\" Modified 1996-10-22 by Eric S. Raymond <esr@thyrsus.com>
@@ -35,7 +37,7 @@
 .\" Modified Oct 2003 by aeb
 .\" Modified 2004-07-01 by mtk
 .\"
-.TH SEND 2 2012-02-27 "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
@@ -171,17 +173,17 @@ Only valid on
 .B SOCK_DGRAM
 and
 .B SOCK_RAW
-sockets and currently only implemented for IPv4 and IPv6.
+sockets and currently implemented only for IPv4 and IPv6.
 See
 .BR arp (7)
 for details.
 .TP
 .B MSG_DONTROUTE
-Don't use a gateway to send out the packet, only send to hosts on
+Don't use a gateway to send out the packet, send to hosts only on
 directly connected networks.
 This is usually used only
 by diagnostic or routing programs.
-This is only defined for protocol
+This is defined only for protocol
 families that route; packet sockets don't.
 .TP
 .BR MSG_DONTWAIT " (since Linux 2.2)"
@@ -210,7 +212,7 @@ with the difference that this flag can be set on a per-call basis.
 
 Since Linux 2.6, this flag is also supported for UDP sockets, and informs
 the kernel to package all of the data sent in calls with this flag set
-into a single datagram which is only transmitted when a call is performed
+into a single datagram which is transmitted only when a call is performed
 that does not specify this flag.
 (See also the
 .B UDP_CORK
@@ -270,7 +272,7 @@ see
 .\"  Send file descriptors and user credentials using the
 .\"  msg_control* fields.
 .\"  The flags returned in msg_flags.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 On success, these calls return the number of characters sent.
 On error, \-1 is returned, and
 .I errno
@@ -288,6 +290,9 @@ 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
@@ -360,11 +365,11 @@ will also receive a
 unless
 .B MSG_NOSIGNAL
 is set.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 4.4BSD, SVr4, POSIX.1-2001.
 These function calls appeared in 4.2BSD.
 .LP
-POSIX.1-2001 only describes the
+POSIX.1-2001 describes only the
 .B MSG_OOB
 and
 .B MSG_EOR
@@ -403,7 +408,7 @@ but glibc currently types it as
 .\" across architectures, but socklen_t is always 32 bits.
 
 See
-.BR sendmmsg(2)
+.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
@@ -416,7 +421,7 @@ An example of the use of
 .BR sendto ()
 is shown in
 .BR getaddrinfo (3).
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR fcntl (2),
 .BR getsockopt (2),
 .BR recv (2),