OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man2 / send.2
index 08e4a39..41bb495 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>
 .\" Modified Oct 2003 by aeb
 .\" Modified 2004-07-01 by mtk
 .\"
-.\" Japanese Version Copyright (c) 1996 HANATAKA Shinya all rights reserved.
-.\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated 1999-08-15, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated 2000-01-13, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2001-01-30, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2005-03-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2005-12-26, Akihiro MOTOKI
-.\" Updated 2006-04-15, Akihiro MOTOKI, LDP v2.29
-.\" Updated 2008-04-13, Akihiro MOTOKI, LDP v3.20
+.\"*******************************************************************
 .\"
-.\"WORD:       socket                  ¥½¥±¥Ã¥È
-.\"WORD:       message                 ¥á¥Ã¥»¡¼¥¸
-.\"WORD:       protocol                ¥×¥í¥È¥³¥ë
-.\"WORD:       nonblocking I/O         ÈóÄä»ß I/O
-.\"WORD:       block                   Ää»ß(block)
-.\"WORD:       out-of-band             ÂÓ°è³°
-.\"WORD:       descriptor              ¥Ç¥£¥¹¥¯¥ê¥×¥¿
-.\"WORD:       parameter               ¥Ñ¥é¥á¡¼¥¿
-.\"WORD:       queue                   ¥­¥å¡¼
-.\"WORD:       buffer                  ¥Ð¥Ã¥Õ¥¡
-.\"WORD:       routing                 ¥ë¡¼¥Æ¥£¥ó¥°
-.\"WORD:       congestion              íÕíÔ
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH SEND 2 2011-10-01 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O send, sendto, sendmsg \- send a message on a socket
-send, sendto, sendmsg \- ¥½¥±¥Ã¥È¤Ø¥á¥Ã¥»¡¼¥¸¤òÁ÷¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH SEND 2 2012\-04\-23 Linux "Linux Programmer's Manual"
+.SH 名前
+send, sendto, sendmsg \- ソケットへメッセージを送る
+.SH 書式
 .nf
-.B #include <sys/types.h>
-.B #include <sys/socket.h>
+\fB#include <sys/types.h>\fP
+\fB#include <sys/socket.h>\fP
 .sp
-.BI "ssize_t send(int " sockfd ", const void *" buf ", size_t " len \
-", int " flags );
+\fBssize_t send(int \fP\fIsockfd\fP\fB, const void *\fP\fIbuf\fP\fB, size_t \fP\fIlen\fP\fB, int \fP\fIflags\fP\fB);\fP
 
-.BI "ssize_t sendto(int " sockfd ", const void *" buf ", size_t " len \
-", int " flags ,
-.BI "               const struct sockaddr *" dest_addr ", socklen_t " addrlen );
+\fBssize_t sendto(int \fP\fIsockfd\fP\fB, const void *\fP\fIbuf\fP\fB, size_t \fP\fIlen\fP\fB, int \fP\fIflags\fP\fB,\fP
+\fB               const struct sockaddr *\fP\fIdest_addr\fP\fB, socklen_t \fP\fIaddrlen\fP\fB);\fP
 
-.BI "ssize_t sendmsg(int " sockfd ", const struct msghdr *" msg \
-", int " flags );
+\fBssize_t sendmsg(int \fP\fIsockfd\fP\fB, const struct msghdr *\fP\fImsg\fP\fB, int \fP\fIflags\fP\fB);\fP
 .fi
-.SH ÀâÌÀ
-.\"O The system calls
-.\"O .BR send (),
-.\"O .BR sendto (),
-.\"O and
-.\"O .BR sendmsg ()
-.\"O are used to transmit a message to another socket.
-¥·¥¹¥Æ¥à¥³¡¼¥ë
-.BR send (),
-.BR sendto (),
-.BR sendmsg ()
-¤Ï¡¢¤â¤¦°ìÊý¤Î¥½¥±¥Ã¥È¤Ø¥á¥Ã¥»¡¼¥¸¤òžÁ÷¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤ë¡£
+.SH 説明
+システムコール \fBsend\fP(), \fBsendto\fP(), \fBsendmsg\fP()  は、もう一方のソケットへメッセージを転送するのに使用される。
 .PP
-.\"O The
-.\"O .BR send ()
-.\"O call may be used only when the socket is in a
-.\"O .I connected
-.\"O state (so that the intended recipient is known).
-.\"O The only difference between
-.\"O .BR send ()
-.\"O and
-.\"O .BR write (2)
-.\"O is the presence of
-.\"O .IR flags .
-.BR send ()
-¤Ï¡¢¥½¥±¥Ã¥È¤¬
-.I "Àܳ¤µ¤ì¤¿ (connected)"
-¾õÂ֤ˤ¢¤ë¾ì¹ç¤Ë¤Î¤ß»ÈÍѤǤ­¤ë
-(¤Ä¤Þ¤ê¡¢¤É¤ÎÁê¼ê¤ËÁ÷¿®¤¹¤ë¤«¤Ï´ûÃΤǤ¢¤ë)¡£
-.BR send ()
-¤È
-.BR write (2)
-¤Î°ã¤¤¤Ï¡¢°ú¤­¿ô¤Ë
-.I flags
-¤¬¤¢¤ë¤«¤É¤¦¤«¤À¤±¤Ç¤¢¤ë¡£
-.\"O With a zero
-.\"O .I flags
-.\"O argument,
-.\"O .BR send ()
-.\"O is equivalent to
-.\"O .BR write (2).
-.\"O Also, the following call
-.\"O 
-.\"O     send(sockfd, buf, len, flags);
-.\"O 
-.\"O is equivalent to
-.\"O 
-.\"O     sendto(sockfd, buf, len, flags, NULL, 0);
-°ú¤­¿ô
-.I flags
-¤Ë¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Ê¤¤¾ì¹ç¡¢
-.BR send ()
-¤Ï
-.BR write (2)
-¤ÈÅù²Á¤Ç¤¢¤ë¡£
-¤Þ¤¿¡¢
+\fBsend\fP()  は、ソケットが \fI接続された (connected)\fP 状態にある場合にのみ使用できる
+(つまり、どの相手に送信するかは既知である)。 \fBsend\fP()  と \fBwrite\fP(2)  の違いは、引き数に \fIflags\fP
+があるかどうかだけである。 引き数 \fIflags\fP にフラグが指定されない場合、 \fBsend\fP()  は \fBwrite\fP(2)  と等価である。
+また、
 
     send(sockfd, buf, len, flags);
 
-¤Ï
+は以下と等価である。
 
     sendto(sockfd, buf, len, flags, NULL, 0);
-
-¤ÈÅù²Á¤Ç¤¢¤ë¡£
 .PP
-.\"O The argument
-.\"O .I sockfd
-.\"O is the file descriptor of the sending socket.
-°ú¤­¿ô
-.I sockfd
-¤Ï¡¢¥Ç¡¼¥¿¤òÁ÷¿®¤¹¤ë¥Ñ¥±¥Ã¥È¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
+引き数 \fIsockfd\fP は、データを送信するパケットのファイル・ディスクリプタである。
 .PP
-.\"O If
-.\"O .BR sendto ()
-.\"O is used on a connection-mode
-.\"O .RB ( SOCK_STREAM ,
-.\"O .BR SOCK_SEQPACKET )
-.\"O socket, the arguments
-.\"O .I dest_addr
-.\"O and
-.\"O .I addrlen
-.\"O are ignored (and the error
-.\"O .B EISCONN
-.\"O may be returned when they are
-.\"O not NULL and 0), and the error
-.\"O .B ENOTCONN
-.\"O is returned when the socket was not actually connected.
-.\"O Otherwise, the address of the target is given by
-.\"O .I dest_addr
-.\"O with
-.\"O .I addrlen
-.\"O specifying its size.
-.BR sendto ()
-¤Ï¡¢Àܳ·¿ (connection-mode) ¤Î¥½¥±¥Ã¥È
-.RB ( SOCK_STREAM ,
-.BR SOCK_SEQPACKET )
-¤Ç
-»ÈÍѤµ¤ì¤¿¾ì¹ç¡¢°ú¤­¿ô
-.I dest_addr
-¤È
-.I addrlen
-¤Ï̵»ë¤µ¤ì¤ë (³Æ¡¹¤Î°ú¤­¿ô¤¬ NULL ¤È 0 ¤Ç¤Ê¤¤¾ì¹ç¤Ï
-.B EISCONN
-¥¨¥é¡¼¤âÊÖ¤µ¤ì¤ë)¡£
-¤Þ¤¿¡¢¥½¥±¥Ã¥È¤¬¼ÂºÝ¤Ë¤ÏÀܳ¤µ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿»þ¤Ë¤Ï
-.B ENOTCONN
-¥¨¥é¡¼¤¬ÊÖ¤µ¤ì¤ë¡£
-Àܳ·¿¤Î¥½¥±¥Ã¥È°Ê³°¤Ç»ÈÍѤµ¤ì¤¿¾ì¹ç¤Ï¡¢ÀܳÀè¤Î¥¢¥É¥ì¥¹¤Ï
-.I dest_addr
-¤ÇÍ¿¤¨¤é¤ì¡¢¤½¤Î¥µ¥¤¥º¤Ï
-.I addrlen
-¤Ç»ØÄꤵ¤ì¤ë¡£
-.\"O For
-.\"O .BR sendmsg (),
-.\"O the address of the target is given by
-.\"O .IR msg.msg_name ,
-.\"O with
-.\"O .I msg.msg_namelen
-.\"O specifying its size.
-.BR sendmsg ()
-¤Ç¤Ï¡¢ÀܳÀè¤Î¥¢¥É¥ì¥¹¤Ï
-.I msg.msg_name
-¤ÇÍ¿¤¨¤é¤ì¡¢¤½¤Î¥µ¥¤¥º¤Ï
-.I msg.msg_namelen
-¤Ç»ØÄꤵ¤ì¤ë¡£
+\fBsendto\fP()  は、接続型 (connection\-mode) のソケット (\fBSOCK_STREAM\fP,
+\fBSOCK_SEQPACKET\fP)  で 使用された場合、引き数 \fIdest_addr\fP と \fIaddrlen\fP は無視される (各々の引き数が
+NULL と 0 でない場合は \fBEISCONN\fP エラーも返される)。 また、ソケットが実際には接続されていなかった時には \fBENOTCONN\fP
+エラーが返される。 接続型のソケット以外で使用された場合は、接続先のアドレスは \fIdest_addr\fP で与えられ、そのサイズは \fIaddrlen\fP
+で指定される。 \fBsendmsg\fP()  では、接続先のアドレスは \fImsg.msg_name\fP で与えられ、そのサイズは
+\fImsg.msg_namelen\fP で指定される。
 .PP
-.\"O For
-.\"O .BR send ()
-.\"O and
-.\"O .BR sendto (),
-.\"O the message is found in
-.\"O .I buf
-.\"O and has length
-.\"O .IR len .
-.\"O For
-.\"O .BR sendmsg (),
-.\"O the message is pointed to by the elements of the array
-.\"O .IR msg.msg_iov .
-.\"O The
-.\"O .BR sendmsg ()
-.\"O call also allows sending ancillary data (also known as control information).
-.BR send ()
-¤È
-.BR sendto ()
-¤Ç¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤Ï
-.I buf
-¤Ë³ÊǼ¤µ¤ì¤Æ¤ª¤ê¡¢¤½¤ÎŤµ¤Ï
-.I len
-¤Ç¤¢¤ë¤È²ò¼á¤µ¤ì¤ë¡£
-.BR sendmsg ()
-¤Ç¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤Ï
-ÇÛÎó
-.I msg.msg_iov
-¤Î³ÆÍ×ÁǤ¬»Ø¤¹°ÌÃ֤˳ÊǼ¤µ¤ì¤Æ¤¤¤ë¡£
-.BR sendmsg ()
-¤Ç¤Ï¡¢Êä½õ¥Ç¡¼¥¿ (À©¸æ¾ðÊó¤È¤â¸Æ¤Ð¤ì¤ë) ¤òÁ÷¿®¤¹¤ë¤³¤È¤â¤Ç¤­¤ë¡£
+\fBsend\fP()  と \fBsendto\fP()  では、メッセージは \fIbuf\fP に格納されており、その長さは \fIlen\fP であると解釈される。
+\fBsendmsg\fP()  では、メッセージは 配列 \fImsg.msg_iov\fP の各要素が指す位置に格納されている。 \fBsendmsg\fP()
+では、補助データ (制御情報とも呼ばれる) を送信することもできる。
 .PP
-.\"O If the message is too long to pass atomically through the
-.\"O underlying protocol, the error
-.\"O .B EMSGSIZE
-.\"O is returned, and the message is not transmitted.
-¥á¥Ã¥»¡¼¥¸Ä¹¤¬Ä¹²á¤®¤ë¤¿¤á¤Ë¡¢¤½¤Î¥½¥±¥Ã¥È¤¬»ÈÍѤ¹¤ë¥×¥í¥È¥³¥ë¤Ç¤Ï¡¢
-¥á¥Ã¥»¡¼¥¸¤ò¥½¥±¥Ã¥È¤ËÅϤµ¤ì¤¿¤Þ¤Þ¤Î·Á¤ÇÁ÷¿®¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¾ì¹ç¡¢
-.B EMSGSIZE
-¥¨¥é¡¼¤¬ÊÖ¤µ¤ì¡¢¤½¤Î¥á¥Ã¥»¡¼¥¸¤ÏžÁ÷¤µ¤ì¤Ê¤¤¡£
+メッセージ長が長過ぎるために、そのソケットが使用するプロトコルでは、 メッセージをソケットに渡されたままの形で送信することができない場合、
+\fBEMSGSIZE\fP エラーが返され、そのメッセージは転送されない。
 .PP
-.\"O No indication of failure to deliver is implicit in a
-.\"O .BR send ().
-.\"O Locally detected errors are indicated by a return value of \-1.
-.BR send ()
-¤Ç¤Ï¡¢ÇÛÁ÷¤Î¼ºÇÔ¤ÎÄÌÃΤÏÌÀ¼¨Åª¤Ë¹Ô¤ï¤ì¤ë¡£
-¥í¡¼¥«¥ë¦¤Ç¥¨¥é¡¼¤¬¸¡½Ð¤µ¤ì¤¿¾ì¹ç¤Ï¡¢ÊÖ¤êÃÍ \-1 ¤È¤·¤ÆÄÌÃΤµ¤ì¤ë¡£
+\fBsend\fP()  では、配送の失敗の通知は明示的に行われる。 ローカル側でエラーが検出された場合は、返り値 \-1 として通知される。
 .PP
-.\"O When the message does not fit into the send buffer of the socket,
-.\"O .BR send ()
-.\"O normally blocks, unless the socket has been placed in nonblocking I/O
-.\"O mode.
-.\"O In nonblocking mode it would fail with the error
-.\"O .B EAGAIN
-.\"O or
-.\"O .B EWOULDBLOCK
-.\"O in this case.
-.\"O The
-.\"O .BR select (2)
-.\"O call may be used to determine when it is possible to send more data.
-¥á¥Ã¥»¡¼¥¸¤¬¥½¥±¥Ã¥È¤ÎÁ÷¿®¥Ð¥Ã¥Õ¥¡¤ËÆþ¤ì¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¾ì¹ç¡¢
-.BR send ()
-¤ÏÄ̾ï¤ÏÄä»ß (block) ¤¹¤ë (¥½¥±¥Ã¥È¤¬ÈóÄä»ß (nonblocking) I/O ¥â¡¼¥É
-¤Ç¤Ê¤¤¾ì¹ç)¡£ÈóÄä»ß¥â¡¼¥É¤Î¾ì¹ç¤Ë¤Ï¥¨¥é¡¼
-.B EAGAIN
-¤«
-.B EWOULDBLOCK
-¤Ç¼ºÇÔ¤¹¤ë¡£
-¤¤¤Ä¥Ç¡¼¥¿¤ò¤µ¤é¤ËÁ÷¿®¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¤«¤òÃΤ뤿¤á¤Ë¡¢
-.BR select (2)
-¥³¡¼¥ë¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
+メッセージがソケットの送信バッファに入れることができない場合、 \fBsend\fP()  は通常は停止 (block) する (ソケットが非停止
+(nonblocking) I/O モード でない場合)。非停止モードの場合にはエラー \fBEAGAIN\fP か \fBEWOULDBLOCK\fP
+で失敗する。 いつデータをさらに送信できるようになるかを知るために、 \fBselect\fP(2)  コールを使用することができる。
 .PP
-.\"O .I flags
-.\"O argument is the bitwise OR
-.\"O of zero or more of the following flags.
-.I flags
-°ú¤­¿ô¤Ï¡¢°Ê²¼¤Î¥Õ¥é¥°¤Î (0 ¸Ä°Ê¾å¤Î) ¥Ó¥Ã¥Èñ°Ì¤ÎÏÀÍýϤò
-¤È¤Ã¤¿¤â¤Î¤ò»ØÄꤹ¤ë¡£
-.\"O .\" FIXME ? document MSG_PROXY (which went away in 2.3.15)
-.\" FIXME ? MSG_PROXY ¤Ë¤Ä¤¤¤Æµ­ºÜ¤¹¤ë¤³¤È
-.\" (MSG_PROXY ¤Ï 2.3.15 ¤Ç¤Ê¤¯¤Ê¤Ã¤¿)
-.TP
-.\"O .BR MSG_CONFIRM " (Since Linux 2.3.15)"
-.\"O Tell the link layer that forward progress happened: you got a successful
-.\"O reply from the other side.
-.\"O If the link layer doesn't get this
-.\"O it will regularly reprobe the neighbor (e.g., via a unicast ARP).
-.BR MSG_CONFIRM " (Linux 2.3.15 °Ê¹ß)"
-žÁ÷½èÍý¤Ë¿ÊŸ¤¬¤¢¤Ã¤¿¡¢¤Ä¤Þ¤êÁê¼ê¦¤«¤éÀ®¸ù¤Î±þÅú¤ò¼õ¤±¤¿¤³¤È¤ò¥ê¥ó¥¯ÁؤË
-ÃΤ餻¤ë¡£¥ê¥ó¥¯Áؤ¬¤³¤ÎÄÌÃΤò¼õ¤±¼è¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢Ä̾ï¤É¤ª¤ê
-(¥æ¥Ë¥­¥ã¥¹¥È ARP ¤ò»È¤¦¤Ê¤É¤ÎÊýË¡¤Ç) ¶á˵ (neighbor) ¤ÎºÆ¸¡º÷¤ò¹Ô¤¦¡£
-.\"O Only valid on
-.\"O .B SOCK_DGRAM
-.\"O and
-.\"O .B SOCK_RAW
-.\"O sockets and currently only implemented for IPv4 and IPv6.
-.\"O See
-.\"O .BR arp (7)
-.\"O for details.
-.B SOCK_DGRAM
-¤È
-.B SOCK_RAW
-¤Î¥½¥±¥Ã¥È¤ËÂФ·¤Æ¤Î¤ßÍ­¸ú¤Ç¡¢¸½ºß¤Î¤È¤³¤í IPv4 ¤È IPv6 ¤Î¤ß¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
-¾Ü¤·¤¯¤Ï
-.BR arp (7)
-»²¾È¤Î¤³¤È¡£
-.TP
-.B MSG_DONTROUTE
-.\"O Don't use a gateway to send out the packet, only send to hosts on
-.\"O directly connected networks.
-.\"O This is usually used only
-.\"O by diagnostic or routing programs.
-.\"O This is only defined for protocol
-.\"O families that route; packet sockets don't.
-¥Ñ¥±¥Ã¥È¤òÁ÷¤ê½Ð¤¹¤Î¤Ë¥²¡¼¥È¥¦¥§¥¤¤ò»ÈÍѤ»¤º¡¢
-ľÀÜÀܳ¤µ¤ì¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Î¥Û¥¹¥È¤À¤±¤ËÁ÷¤ë¡£
-Ä̾¤³¤Î¥Õ¥é¥°¤Ï¿ÇÃÇ (diagnostic) ¤ä¥ë¡¼¥Æ¥£¥ó¥°¡¦¥×¥í¥°¥é¥à¤Ë
-¤è¤Ã¤Æ¤Î¤ß»ÈÍѤµ¤ì¤ë¡£¤³¤Î¥Õ¥é¥°¤Ï¡¢·ÐÏ©À©¸æ¤¬¹Ô¤ï¤ì¤ë¥×¥í¥È¥³¥ë¥Õ¥¡¥ß¥ê¡¼
-¤ËÂФ·¤Æ¤Î¤ßÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£¥Ñ¥±¥Ã¥È¥½¥±¥Ã¥È¤Ë¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
-.TP
-.B MSG_DONTWAIT
-.\"O Enables nonblocking operation; if the operation would block,
-.\"O .B EAGAIN
-.\"O or
-.\"O .B EWOULDBLOCK
-.\"O is returned (this can also be enabled using the
-.\"O .B O_NONBLOCK
-.\"O flag with the
-.\"O .B F_SETFL
-.\"O .BR fcntl (2)).
-ÈóÄä»ß (nonblocking) Áàºî¤òÍ­¸ú¤Ë¤¹¤ë¡£Áàºî¤¬Ää»ß¤µ¤ì¤ë¤è¤¦¤Ê¾ì¹ç¤Ë¤Ï
-.B EAGAIN
-¤«
-.B EWOULDBLOCK
-¤òÊÖ¤¹¤è¤¦¤Ë¤¹¤ë
-.RB ( fcntl (2)
-¤Î
-.B F_SETFL
-¤Ç
-.B O_NONBLOCK
-¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤Ã¤Æ¤âÍ­¸ú¤Ë¤Ç¤­¤ë)¡£
-.TP
-.\"O .BR MSG_EOR " (since Linux 2.2)"
-.BR MSG_EOR " (Linux 2.2 °Ê¹ß)"
-.\"O Terminates a record (when this notion is supported, as for sockets of type
-.\"O .BR SOCK_SEQPACKET ).
-¥ì¥³¡¼¥É¤Î½ªÎ»¤ò»Ø¼¨¤¹¤ë
-.RB ( SOCK_SEQPACKET
-¤Î¤è¤¦¤Ë¤³¤Î³µÇ°¤ËÂбþ¤·¤Æ¤¤¤ë¥½¥±¥Ã¥È¼ïÊ̤ΤȤ­¤ËÍ­¸ú)¡£
-.TP
-.\"O .BR MSG_MORE " (Since Linux 2.4.4)"
-.BR MSG_MORE " (Linux 2.4.4 °Ê¹ß)"
-.\"O The caller has more data to send.
-.\"O This flag is used with TCP sockets to obtain the same effect
-.\"O as the
-.\"O .B TCP_CORK
-.\"O socket option (see
-.\"O .BR tcp (7)),
-.\"O with the difference that this flag can be set on a per-call basis.
-¸Æ¤Ó½Ð¤·¸µ¤Ë¤µ¤é¤ËÁ÷¤ë¥Ç¡¼¥¿¤¬¤¢¤ë¤³¤È¤ò¼¨¤¹¡£
-¤³¤Î¥Õ¥é¥°¤Ï TCP ¥½¥±¥Ã¥È¤È¤È¤â¤Ë»ÈÍѤµ¤ì¡¢
-.B TCP_CORK
-¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤ÈƱ¤¸¸ú²Ì¤¬ÆÀ¤é¤ì¤ë
-.RB ( tcp (7)
-¤ò»²¾È)¡£
-.B TCP_CORK
-¤È¤Î°ã¤¤¤Ï¡¢¤³¤Î¥Õ¥é¥°¤ò»È¤¦¤È¸Æ¤Ó½Ð¤·Ã±°Ì¤Ç
-¤³¤Îµ¡Ç½¤òÍ­¸ú¤Ë¤Ç¤­¤ëÅÀ¤Ç¤¢¤ë¡£
+.\" FIXME ? document MSG_PROXY (which went away in 2.3.15)
+\fIflags\fP 引き数は、以下のフラグの (0 個以上の) ビット単位の論理和を とったものを指定する。
+.TP 
+\fBMSG_CONFIRM\fP (Linux 2.3.15 以降)
+転送処理に進展があった、つまり相手側から成功の応答を受けたことをリンク層に 知らせる。リンク層がこの通知を受け取らなかった場合には、通常どおり
+(ユニキャスト ARP を使うなどの方法で) 近傍 (neighbor) の再検索を行う。 \fBSOCK_DGRAM\fP と \fBSOCK_RAW\fP
+のソケットに対してのみ有効で、現在のところ IPv4 と IPv6 のみ実装されている。 詳しくは \fBarp\fP(7)  参照のこと。
+.TP 
+\fBMSG_DONTROUTE\fP
+パケットを送り出すのにゲートウェイを使用せず、 直接接続されているネットワーク上のホストだけに送る。 通常、このフラグは診断 (diagnostic)
+やルーティング・プログラムに よってのみ使用される。このフラグは、経路制御が行われるプロトコルファミリー
+に対してのみ定義されている。パケットソケットには定義されていない。
+.TP 
+\fBMSG_DONTWAIT\fP (Linux 2.2 以降)
+非停止 (nonblocking) 操作を有効にする。操作が停止されるような場合には \fBEAGAIN\fP か \fBEWOULDBLOCK\fP
+を返すようにする (\fBfcntl\fP(2)  の \fBF_SETFL\fP で \fBO_NONBLOCK\fP フラグを指定することによっても有効にできる)。
+.TP 
+\fBMSG_EOR\fP (Linux 2.2 以降)
+レコードの終了を指示する (\fBSOCK_SEQPACKET\fP のようにこの概念に対応しているソケット種別のときに有効)。
+.TP 
+\fBMSG_MORE\fP (Linux 2.4.4 以降)
+呼び出し元にさらに送るデータがあることを示す。 このフラグは TCP ソケットとともに使用され、 \fBTCP_CORK\fP
+ソケットオプションと同じ効果が得られる (\fBtcp\fP(7)  を参照)。 \fBTCP_CORK\fP との違いは、このフラグを使うと呼び出し単位で
+この機能を有効にできる点である。
 
-.\"O Since Linux 2.6, this flag is also supported for UDP sockets, and informs
-.\"O the kernel to package all of the data sent in calls with this flag set
-.\"O into a single datagram which is only transmitted when a call is performed
-.\"O that does not specify this flag.
-.\"O (See also the
-.\"O .B UDP_CORK
-.\"O socket option described in
-.\"O .BR udp (7).)
-Linux 2.6 °Ê¹ß¤Ç¤Ï¡¢¤³¤Î¥Õ¥é¥°¤Ï UDP ¥½¥±¥Ã¥È¤Ç¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤ª¤ê¡¢
-¤³¤Î¥Õ¥é¥°ÉÕ¤­¤ÇÁ÷¿®¤µ¤ì¤¿Á´¤Æ¤Î¥Ç¡¼¥¿¤ò°ì¤Ä¤Î¥Ç¡¼¥¿¥°¥é¥à¤Ë¤Þ¤È¤á¤Æ
-Á÷¿®¤¹¤ë¤³¤È¤ò¡¢¥«¡¼¥Í¥ë¤ËÃΤ餻¤ë¡£¤Þ¤È¤á¤é¤ì¤¿¥Ç¡¼¥¿¥°¥é¥à¤Ï¡¢
-¤³¤Î¥Õ¥é¥°¤ò»ØÄꤻ¤º¤Ë¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬¼Â¹Ô¤µ¤ì¤¿ºÝ¤Ë½é¤á¤ÆÁ÷¿®¤µ¤ì¤ë
-.RB ( udp (7)
-¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó
-.B UDP_CORK
-¤â»²¾È)¡£
-.TP
-.\"O .BR MSG_NOSIGNAL " (since Linux 2.2)"
-.BR MSG_NOSIGNAL " (Linux 2.2 °Ê¹ß)"
-.\"O Requests not to send
-.\"O .B SIGPIPE
-.\"O on errors on stream oriented sockets when the other end breaks the
-.\"O connection.
-.\"O The
-.\"O .B EPIPE
-.\"O error is still returned.
-¥¹¥È¥ê¡¼¥à»Ø¸þ¤Î¥½¥±¥Ã¥È¤ÇÁê¼ê¦¤¬Àܳ¤òÀÚÃǤ·¤¿»þ¤Ë¡¢¥¨¥é¡¼¤È¤·¤Æ
-.B SIGPIPE
-¤òÁ÷¿®¤·¤Ê¤¤¤è¤¦¤ËÍ׵᤹¤ë¡£¤³¤Î¾ì¹ç¤Ç¤â
-.B EPIPE
-¤ÏÊÖ¤µ¤ì¤ë¡£
-.TP
-.B MSG_OOB
-.\"O Sends
-.\"O .I out-of-band
-.\"O data on sockets that support this notion (e.g., of type
-.\"O .BR SOCK_STREAM );
-.\"O the underlying protocol must also support
-.\"O .I out-of-band
-.\"O data.
-.I "ÂÓ°è³° (out-of-band)"
-¥Ç¡¼¥¿¤ò¥µ¥Ý¡¼¥È¤¹¤ë¥½¥±¥Ã¥È (Î㤨¤Ð
-.BR SOCK_STREAM )
-¤Ç
-.I ÂÓ°è³°
-¥Ç¡¼¥¿¤òÁ÷¤ë¡£²¼°Ì¥×¥í¥È¥³¥ë¤â
-.I ÂÓ°è³°
-¥Ç¡¼¥¿¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
+Linux 2.6 以降では、このフラグは UDP ソケットでもサポートされており、
+このフラグ付きで送信された全てのデータを一つのデータグラムにまとめて 送信することを、カーネルに知らせる。まとめられたデータグラムは、
+このフラグを指定せずにこのシステムコールが実行された際に初めて送信される (\fBudp\fP(7)  に記載されているソケットオプション
+\fBUDP_CORK\fP も参照)。
+.TP 
+\fBMSG_NOSIGNAL\fP (Linux 2.2 以降)
+ストリーム指向のソケットで相手側が接続を切断した時に、エラーとして \fBSIGPIPE\fP を送信しないように要求する。この場合でも \fBEPIPE\fP
+は返される。
+.TP 
+\fBMSG_OOB\fP
+\fI帯域外 (out\-of\-band)\fP データをサポートするソケット (例えば \fBSOCK_STREAM\fP)  で \fI帯域外\fP
+データを送る。下位プロトコルも \fI帯域外\fP データをサポートしている必要がある。
 .PP
-.\"O The definition of the
-.\"O .I msghdr
-.\"O structure follows.
-.\"O See
-.\"O .BR recv (2)
-.\"O and below for an exact description of its fields.
-.I msghdr
-¹½Â¤ÂΤÎÆâÍƤϰʲ¼¤ÎÄ̤ꡣ
-³Æ¥Õ¥£¡¼¥ë¥É¤ÎÀµ³Î¤Êµ­½Ò¤Ë¤Ä¤¤¤Æ¤Ï
-.BR recv (2)
-¤È°Ê²¼¤ÎÀâÌÀ¤ò»²¾È¤¹¤ë¤³¤È¡£
+\fImsghdr\fP 構造体の内容は以下の通り。 各フィールドの正確な記述については \fBrecv\fP(2)  と以下の説明を参照すること。
 .in +4n
 .nf
 
 struct msghdr {
-.\"O     void         *msg_name;       /* optional address */
-.\"O     socklen_t     msg_namelen;    /* size of address */
-.\"O     struct iovec *msg_iov;        /* scatter/gather array */
-.\"O     size_t        msg_iovlen;     /* # elements in msg_iov */
-.\"O     void         *msg_control;    /* ancillary data, see below */
-.\"O     size_t        msg_controllen; /* ancillary data buffer len */
-.\"O     int           msg_flags;      /* flags on received message */
-    void         *msg_name;       /* ÄɲäΥ¢¥É¥ì¥¹ */
-    socklen_t     msg_namelen;    /* ¥¢¥É¥ì¥¹¤Î¥µ¥¤¥º */
-    struct iovec *msg_iov;        /* scatter/gather ÇÛÎó */
-    size_t        msg_iovlen;     /* msg_iov ¤ÎÍ×ÁÇ¿ô */
-    void         *msg_control;    /* Êä½õ¥Ç¡¼¥¿(¸å½Ò) */
-    size_t        msg_controllen; /* Êä½õ¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡Ä¹ */
-    int           msg_flags;      /* ¼õ¿®¥á¥Ã¥»¡¼¥¸¤Î¥Õ¥é¥° */
+    void         *msg_name;       /* 追加のアドレス */
+    socklen_t     msg_namelen;    /* アドレスのサイズ */
+    struct iovec *msg_iov;        /* scatter/gather 配列 */
+    size_t        msg_iovlen;     /* msg_iov の要素数 */
+    void         *msg_control;    /* 補助データ (後述) */
+    size_t        msg_controllen; /* 補助データバッファ長 */
+    int           msg_flags;      /* 受信メッセージのフラグ */
 };
 .fi
 .in
 .PP
-.\"O You may send control information using the
-.\"O .I msg_control
-.\"O and
-.\"O .I msg_controllen
-.\"O members.
-.\"O The maximum control buffer length the kernel can process is limited
-.\"O per socket by the value in
-.\"O .IR /proc/sys/net/core/optmem_max ;
-.\"O see
-.\"O .BR socket (7).
-.I msg_control
-¤È
-.I msg_controllen
-¥á¥ó¥Ð¡¼¤ò»ÈÍѤ·¤ÆÀ©¸æ¾ðÊó¤òÁ÷¿®¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
-¥«¡¼¥Í¥ë¤¬½èÍý¤Ç¤­¤ëÀ©¸æ¥Ð¥Ã¥Õ¥¡¤Î¥½¥±¥Ã¥È¤¢¤¿¤ê¤ÎºÇÂçĹ¤Ï¡¢
-.I /proc/sys/net/core/optmem_max
-¤ÎÃͤËÀ©¸Â¤µ¤ì¤Æ¤¤¤ë¡£
-.BR socket (7)
-¤ò»²¾È¡£
 .\" Still to be documented:
 .\"  Send file descriptors and user credentials using the
 .\"  msg_control* fields.
 .\"  The flags returned in msg_flags.
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O On success, these calls return the number of characters sent.
-.\"O On error, \-1 is returned, and
-.\"O .I errno
-.\"O is set appropriately.
-À®¸ù¤·¤¿¾ì¹ç¡¢¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ÏÁ÷¿®¤µ¤ì¤¿¥Ð¥¤¥È¿ô¤òÊÖ¤¹¡£
-¥¨¥é¡¼¤Î¾ì¹ç¡¢ \-1 ¤òÊÖ¤·¡¢
-.I errno
-¤òŬÀÚ¤ËÀßÄê¤Ë¤¹¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.\"O These are some standard errors generated by the socket layer.
-.\"O Additional errors
-.\"O may be generated and returned from the underlying protocol modules;
-.\"O see their respective manual pages.
-¤³¤ì¤é¤Ï¥½¥±¥Ã¥ÈÁؤÇȯÀ¸¤¹¤ë°ìÈÌŪ¤Ê¥¨¥é¡¼¤Ç¤¢¤ë¡£¤³¤ì°Ê³°¤Ë¡¢²¼ÁؤÎ
-¥×¥í¥È¥³¥ë¡¦¥â¥¸¥å¡¼¥ë¤ÇÀ¸À®¤µ¤ì¤¿¥¨¥é¡¼¤¬ÊÖ¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-¤³¤ì¤é¤Ë¤Ä¤¤¤Æ¤Ï¡¢¤½¤ì¤¾¤ì¤Î¥Þ¥Ë¥å¥¢¥ë¤ò»²¾È¤¹¤ë¤³¤È¡£
-.TP
-.B EACCES
-.\"O (For UNIX domain sockets, which are identified by pathname)
-.\"O Write permission is denied on the destination socket file,
-.\"O or search permission is denied for one of the directories
-.\"O the path prefix.
-.\"O (See
-.\"O .BR path_resolution (7).)
-(UNIX ¥É¥á¥¤¥ó¥½¥±¥Ã¥È¤Ï¥Ñ¥¹Ì¾¤Ç¼±Ê̤µ¤ì¤ë¡£)
-¥½¥±¥Ã¥È¡¦¥Õ¥¡¥¤¥ë¤Ø¤Î½ñ¤­¹þ¤ßµö²Ä¤¬¤Ê¤«¤Ã¤¿¤«¡¢¥Ñ¥¹Ì¾¤Ø
-Åþ㤹¤ë¤Þ¤Ç¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¤¤¤º¤ì¤«¤ËÂФ¹¤ë¸¡º÷µö²Ä¤¬¤Ê¤«¤Ã¤¿¡£
-.RB ( path_resolution (7)
-¤â»²¾È¤Î¤³¤È)
-.TP
-.\"O .BR EAGAIN " or " EWOULDBLOCK
-.BR EAGAIN " ¤Þ¤¿¤Ï " EWOULDBLOCK
-.\" Actually EAGAIN on Linux
-.\"O The socket is marked nonblocking and the requested operation
-.\"O would block.
-.\"O POSIX.1-2001 allows either error to be returned for this case,
-.\"O and does not require these constants to have the same value,
-.\"O so a portable application should check for both possibilities.
-¥½¥±¥Ã¥È¤¬ÈóÄä»ß¤ËÀßÄꤵ¤ì¤Æ¤ª¤ê¡¢
-Í׵ᤵ¤ì¤¿Áàºî¤¬Ää»ß¤·¤¿¡£
-POSIX.1-2001 ¤Ï¡¢¤³¤Î¾ì¹ç¤Ë¤É¤Á¤é¤Î¥¨¥é¡¼¤òÊÖ¤¹¤³¤È¤âǧ¤á¤Æ¤ª¤ê¡¢
-¤³¤ì¤é 2 ¤Ä¤ÎÄê¿ô¤¬Æ±¤¸Ãͤò»ý¤Ä¤³¤È¤âµá¤á¤Æ¤¤¤Ê¤¤¡£
-¤·¤¿¤¬¤Ã¤Æ¡¢°Ü¿¢À­¤¬É¬Íפʥ¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï¡¢Î¾Êý¤Î²ÄǽÀ­¤ò
-³Îǧ¤¹¤Ù¤­¤Ç¤¢¤ë¡£
-.TP
-.B EBADF
-.\"O An invalid descriptor was specified.
-̵¸ú¤Ê¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¼¤¬»ØÄꤵ¤ì¤¿¡£
-.TP
-.B ECONNRESET
-.\"O Connection reset by peer.
-Àܳ¤¬ÀܳÁê¼ê¤Ë¤è¤ê¥ê¥»¥Ã¥È¤µ¤ì¤¿¡£
-.TP
-.B EDESTADDRREQ
-.\"O The socket is not connection-mode, and no peer address is set.
-¥½¥±¥Ã¥È¤¬Àܳ·¿ (connection-mode) ¤Ç¤Ï¤Ê¤¯¡¢
-¤«¤ÄÁ÷¿®Àè¤Î¥¢¥É¥ì¥¹¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
-.TP
-.B EFAULT
-.\"O An invalid user space address was specified for an argument.
-¥æ¡¼¥¶¡¼¶õ´Ö¤È¤·¤ÆÉÔÀµ¤Ê¥¢¥É¥ì¥¹¤¬¥Ñ¥é¥á¡¼¥¿¡¼¤È¤·¤Æ»ØÄꤵ¤ì¤¿¡£
-.TP
-.B EINTR
-.\"O A signal occurred before any data was transmitted; see
-.\"O .BR signal (7).
-¥Ç¡¼¥¿¤¬Á÷¿®¤µ¤ì¤ëÁ°¤Ë¡¢¥·¥°¥Ê¥ë¤¬È¯À¸¤·¤¿¡£
-.BR signal (7)
-»²¾È¡£
-.TP
-.B EINVAL
-.\"O Invalid argument passed.
-ÉÔÀµ¤Ê°ú¤­¿ô¤¬ÅϤµ¤ì¤¿¡£
-.TP
-.B EISCONN
-.\"O The connection-mode socket was connected already but a
-.\"O recipient was specified.
-.\"O (Now either this error is returned, or the recipient specification
-.\"O is ignored.)
-Àܳ·¿¥½¥±¥Ã¥È¤ÎÀܳ¤¬¤¹¤Ç¤Ë³ÎΩ¤·¤Æ¤¤¤¿¤¬¡¢¼õ¿®¼Ô¤¬»ØÄꤵ¤ì¤Æ¤¤¤¿¡£
-(¸½ºß¤Î¤È¤³¤í¡¢¤³¤Î¾õ¶·¤Ç¤Ï¡¢¤³¤Î¥¨¥é¡¼¤¬ÊÖ¤µ¤ì¤ë¤«¡¢
-¼õ¿®¼Ô¤Î»ØÄ̵꤬»ë¤µ¤ì¤ë¤«¡¢¤Î¤¤¤º¤ì¤«¤È¤Ê¤ë)
-.TP
-.B EMSGSIZE
-.\"O The socket type
-.\"O .\" (e.g., SOCK_DGRAM )
-.\"O requires that message be sent atomically, and the size
-.\"O of the message to be sent made this impossible.
-¤½¤Î¥½¥±¥Ã¥È¼ïÊÌ
-.\" (Î㤨¤Ð SOCK_DGRAM)
-¤Ç¤Ï¥½¥±¥Ã¥È¤ËÅϤµ¤ì¤¿¤Þ¤Þ¤Î·Á¤Ç¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ëɬÍפ¬¤¢¤ë¤¬¡¢
-¥á¥Ã¥»¡¼¥¸¤¬Â礭²á¤®¤ë¤¿¤áÁ÷¿®¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£
-.TP
-.B ENOBUFS
-.\"O The output queue for a network interface was full.
-.\"O This generally indicates that the interface has stopped sending,
-.\"O but may be caused by transient congestion.
-¥Í¥Ã¥È¥ï¡¼¥¯¡¦¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î½ÐÎÏ¥­¥å¡¼¤¬°ìÇդǤ¢¤ë¡£
-°ìÈÌŪ¤Ë¤Ï¡¢°ì»þŪ¤ÊíÕíÔ (congestion) ¤Î¤¿¤á¤Ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤¬
-Á÷¿®¤ò»ß¤á¤Æ¤¤¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
-.\"O (Normally, this cannot occur in Linux.
-.\"O Packets are just silently dropped
-.\"O when a device queue overflows.)
-(Ä̾Linux ¤Ç¤Ï¤³¤Î¤è¤¦¤Ê¤³¤È¤Ïµ¯¤³¤é¤Ê¤¤¡£¥Ç¥Ð¥¤¥¹¤Î¥­¥å¡¼¤¬
-¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤·¤¿¾ì¹ç¤Ë¤Ï¥Ñ¥±¥Ã¥È¤ÏÌۤäƼΤƤé¤ì¤ë)
-.TP
-.B ENOMEM
-.\"O No memory available.
-¥á¥â¥ê¤¬Â­¤ê¤Ê¤¤¡£
-.TP
-.B ENOTCONN
-.\"O The socket is not connected, and no target has been given.
-¥½¥±¥Ã¥È¤¬Àܳ¤µ¤ì¤Æ¤ª¤é¤º¡¢ÀܳÀè¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
-.TP
-.B ENOTSOCK
-.\"O The argument
-.\"O .I sockfd
-.\"O is not a socket.
-°ú¤­¿ô
-.I sockfd
-¤¬¥½¥±¥Ã¥È¤Ç¤Ê¤¤¡£
-.TP
-.B EOPNOTSUPP
-.\"O Some bit in the
-.\"O .I flags
-.\"O argument is inappropriate for the socket type.
-°ú¤­¿ô
-.I flags
-¤Î¤¤¤¯¤Ä¤«¤Î¥Ó¥Ã¥È¤¬¡¢¤½¤Î¥½¥±¥Ã¥È¼ïÊ̤ǤÏÉÔŬÀڤʤâ¤Î¤Ç¤¢¤ë¡£
-.TP
-.B EPIPE
-.\"O The local end has been shut down on a connection oriented socket.
-.\"O In this case the process
-.\"O will also receive a
-.\"O .B SIGPIPE
-.\"O unless
-.\"O .B MSG_NOSIGNAL
-.\"O is set.
-Àܳ»Ø¸þ¤Î¥½¥±¥Ã¥È¤Ç¥í¡¼¥«¥ë¦¤¬ÊĤ¸¤é¤ì¤Æ¤¤¤ë¡£
-¤³¤Î¾ì¹ç¡¢
-.B MSG_NOSIGNAL
-¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢¥×¥í¥»¥¹¤Ë¤Ï
-.B SIGPIPE
-¤âƱ»þ¤ËÁ÷¤é¤ì¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O 4.4BSD, SVr4, POSIX.1-2001.
-.\"O These function calls appeared in 4.2BSD.
-4.4BSD, SVr4, POSIX.1-2001.
-(¤³¤ì¤é¤Î´Ø¿ô¥³¡¼¥ë¤Ï 4.2BSD ¤ÇºÇ½é¤ËÅо줷¤¿)¡£
+\fImsg_control\fP と \fImsg_controllen\fP メンバーを使用して制御情報を送信することができる。
+カーネルが処理できる制御バッファのソケットあたりの最大長は、 \fI/proc/sys/net/core/optmem_max\fP の値に制限されている。
+\fBsocket\fP(7)  を参照。
+.SH 返り値
+成功した場合、これらのシステムコールは送信されたバイト数を返す。 エラーの場合、 \-1 を返し、 \fIerrno\fP を適切に設定にする。
+.SH エラー
+これらはソケット層で発生する一般的なエラーである。これ以外に、下層の プロトコル・モジュールで生成されたエラーが返されるかもしれない。
+これらについては、それぞれのマニュアルを参照すること。
+.TP 
+\fBEACCES\fP
+(UNIX ドメインソケットの場合; パス名で識別される。)
 
-.\"O POSIX.1-2001 only describes the
-.\"O .B MSG_OOB
-.\"O and
-.\"O .B MSG_EOR
-.\"O flags.
-.\"O+ POSIX.1-2008 adds a specification of
-.\"O+ .BR MSG_NOSIGNAL .
-.\"O The
-.\"O .B MSG_CONFIRM
-.\"O flag is a Linux extension.
-POSIX.1-2001 ¤Ë¤Ï¡¢
-.B MSG_OOB
-¤È
-.B MSG_EOR
-¥Õ¥é¥°¤À¤±¤¬µ­ºÜ¤µ¤ì¤Æ¤¤¤ë¡£
-POSIX.1-2008 ¤Ç¤Ï
-.B MSG_NOSIGNAL
-¤¬µ¬³Ê¤ËÄɲ䵤ì¤Æ¤¤¤ë¡£
-.B MSG_CONFIRM
-¥Õ¥é¥°¤Ï Linux ¤Ç¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O The prototypes given above follow the Single UNIX Specification,
-.\"O as glibc2 also does; the
-.\"O .I flags
-.\"O argument was \fIint\fP in 4.x BSD, but \fIunsigned int\fP in libc4 and libc5;
-.\"O the
-.\"O .I len
-.\"O argument was \fIint\fP in 4.x BSD and libc4, but \fIsize_t\fP in libc5;
-.\"O the
-.\"O .I addrlen
-.\"O argument was \fIint\fP in 4.x BSD and libc4 and libc5.
-.\"O See also
-.\"O .BR accept (2).
-¾åµ­¤Î¥×¥í¥È¥¿¥¤¥×¤Ï Single UNIX Specification ¤Ë½¾¤Ã¤Æ¤¤¤ë¡£
-glibc2 ¤âƱÍͤǤ¢¤ë¡£
-.I flags
-°ú¤­¿ô¤Ï 4.x BSD ¤Ç¤Ï \fIint\fP ¤Ç¤¢¤ê¡¢
-libc4 ¤È libc5 ¤Ç¤Ï \fIunsigned int\fP ¤Ç¤¢¤ë¡£
-.I len
-°ú¤­¿ô¤Ï 4.x BSD ¤È libc4 ¤Ç¤Ï \fIint\fP ¤Ç¤¢¤ê¡¢
-libc5 ¤Ç¤Ï \fIsize_t\fP ¤Ç¤¢¤ë¡£
-.I addrlen
-°ú¤­¿ô¤Ï 4.x BSD ¤È libc4 ¤È libc5 ¤Ç¤Ï \fIint\fP ¤Ç¤¢¤ë¡£
-.BR accept (2)
-¤â»²¾È¤¹¤ë¤³¤È¡£
+ソケット・ファイルへの書き込み許可がなかったか、パス名へ到達するまでの
+ディレクトリのいずれかに対する検索許可がなかった。
+(\fBpath_resolution\fP(7) も参照のこと)
+.sp
+(UDP ソケットの場合) ユニキャストアドレスであるかのように、
+ネットワークアドレスやブロードキャストアドレスへの送信が試みられた。
+.TP 
+\fBEAGAIN\fP または \fBEWOULDBLOCK\fP
+.\" Actually EAGAIN on Linux
+ソケットが非停止に設定されており、 要求された操作が停止した。 POSIX.1\-2001 は、この場合にどちらのエラーを返すことも認めており、 これら
+2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なアプリケーションでは、両方の可能性を 確認すべきである。
+.TP 
+\fBEBADF\fP
+無効なディスクリプターが指定された。
+.TP 
+\fBECONNRESET\fP
+接続が接続相手によりリセットされた。
+.TP 
+\fBEDESTADDRREQ\fP
+ソケットが接続型 (connection\-mode) ではなく、 かつ送信先のアドレスが設定されていない。
+.TP 
+\fBEFAULT\fP
+ユーザー空間として不正なアドレスがパラメーターとして指定された。
+.TP 
+\fBEINTR\fP
+データが送信される前に、シグナルが発生した。 \fBsignal\fP(7)  参照。
+.TP 
+\fBEINVAL\fP
+不正な引き数が渡された。
+.TP 
+\fBEISCONN\fP
+接続型ソケットの接続がすでに確立していたが、受信者が指定されていた。 (現在のところ、この状況では、このエラーが返されるか、
+受信者の指定が無視されるか、のいずれかとなる)
+.TP 
+\fBEMSGSIZE\fP
+.\" (e.g., SOCK_DGRAM )
+そのソケット種別 ではソケットに渡されたままの形でメッセージを送信する必要があるが、 メッセージが大き過ぎるため送信することができない。
+.TP 
+\fBENOBUFS\fP
+ネットワーク・インターフェースの出力キューが一杯である。 一般的には、一時的な輻輳 (congestion) のためにインターフェースが
+送信を止めていることを意味する。 (通常、Linux ではこのようなことは起こらない。デバイスのキューが
+オーバーフローした場合にはパケットは黙って捨てられる)
+.TP 
+\fBENOMEM\fP
+メモリが足りない。
+.TP 
+\fBENOTCONN\fP
+ソケットが接続されておらず、接続先も指定されていない。
+.TP 
+\fBENOTSOCK\fP
+引き数 \fIsockfd\fP はソケットではない。
+.TP 
+\fBEOPNOTSUPP\fP
+引き数 \fIflags\fP のいくつかのビットが、そのソケット種別では不適切なものである。
+.TP 
+\fBEPIPE\fP
+接続指向のソケットでローカル側が閉じられている。 この場合、 \fBMSG_NOSIGNAL\fP が設定されていなければ、プロセスには \fBSIGPIPE\fP
+も同時に送られる。
+.SH 準拠
+4.4BSD, SVr4, POSIX.1\-2001.  (これらの関数コールは 4.2BSD で最初に登場した)。
+.LP
+POSIX.1\-2001 には、 \fBMSG_OOB\fP と \fBMSG_EOR\fP フラグだけが記載されている。 POSIX.1\-2008 では
+\fBMSG_NOSIGNAL\fP が規格に追加されている。 \fBMSG_CONFIRM\fP フラグは Linux での拡張である。
+.SH 注意
+上記のプロトタイプは Single UNIX Specification に従っている。 glibc2 も同様である。 \fIflags\fP 引き数は
+4.x BSD では \fIint\fP であり、 libc4 と libc5 では \fIunsigned int\fP である。 \fIlen\fP 引き数は 4.x
+BSD と libc4 では \fIint\fP であり、 libc5 では \fIsize_t\fP である。 \fIaddrlen\fP 引き数は 4.x BSD と
+libc4 と libc5 では \fIint\fP である。 \fBaccept\fP(2)  も参照すること。
 
-.\"O According to POSIX.1-2001, the
-.\"O .I msg_controllen
-.\"O field of the
-.\"O .I msghdr
-.\"O structure should be typed as
-.\"O .IR socklen_t ,
-.\"O but glibc currently types it as
-.\"O .IR size_t .
-POSIX.1-2001 ¤Ç¤Ï¡¢¹½Â¤ÂÎ
-.I msghdr
-¤Î¥Õ¥£¡¼¥ë¥É
-.I msg_controllen
-¤Ï
-.I socklen_t
-·¿¤Ç¤¢¤ë¤Ù¤­¤À¤È¤µ¤ì¤Æ¤¤¤ë¤¬¡¢
-¸½ºß¤Î glibc ¤Ç¤Ï
-.I 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.
-.\"O .SH BUGS
-.SH ¥Ð¥°
-.\"O Linux may return
-.\"O .B EPIPE
-.\"O instead of
-.\"O .BR ENOTCONN .
-Linux ¤Ï
-.B ENOTCONN
-¤òÊÖ¤¹¾õ¶·¤Ç
-.B EPIPE
-¤òÊÖ¤¹¤³¤È¤¬¤¢¤ë¡£
-.\"O .SH EXAMPLE
-.SH Îã
-.\"O An example of the use of
-.\"O .BR sendto ()
-.\"O is shown in
-.\"O .BR getaddrinfo (3).
-.BR sendto ()
-¤ÎÍøÍÑÎ㤬
-.BR getaddrinfo (3)
-¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR fcntl (2),
-.BR getsockopt (2),
-.BR recv (2),
-.BR select (2),
-.BR sendfile (2),
-.BR shutdown (2),
-.BR socket (2),
-.BR write (2),
-.BR cmsg (3),
-.BR ip (7),
-.BR socket (7),
-.BR tcp (7),
-.BR udp (7)
+POSIX.1\-2001 では、構造体 \fImsghdr\fP のフィールド \fImsg_controllen\fP は \fIsocklen_t\fP
+型であるべきだとされているが、 現在の glibc では \fIsize_t\fP 型である。
+
+\fBsendmmsg\fP(2)  には、一度の呼び出しでの複数のデータグラムの送信に使用できる
+Linux 固有の システムコールに関する情報が書かれている。
+.SH バグ
+Linux は \fBENOTCONN\fP を返す状況で \fBEPIPE\fP を返すことがある。
+.SH 例
+\fBsendto\fP()  の利用例が \fBgetaddrinfo\fP(3)  に記載されている。
+.SH 関連項目
+\fBfcntl\fP(2), \fBgetsockopt\fP(2), \fBrecv\fP(2), \fBselect\fP(2), \fBsendfile\fP(2),
+\fBsendmmsg\fP(2), \fBshutdown\fP(2), \fBsocket\fP(2), \fBwrite\fP(2), \fBcmsg\fP(3),
+\fBip\fP(7), \fBsocket\fP(7), \fBtcp\fP(7), \fBudp\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。