OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man7 / udp.7
index c7e09cb..5520d4a 100644 (file)
 .\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\"
+.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
 .\" Permission is granted to distribute possibly modified copies
 .\" of this page provided the header is included verbatim,
 .\" and in case of nontrivial modification author and date
 .\" of the modification is added to the header.
+.\" %%%LICENSE_END
+.\"
 .\" $Id: udp.7,v 1.7 2000/01/22 01:55:05 freitag Exp $
 .\"
-.\" Japanese Version Copyright (c) 1999 NAKANO Takeo all rights reserved.
-.\" Translated 1999-12-06, NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\" Updated 2005-10-09, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2007-01-05, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.43
-.\" Updated 2008-12-29, Akihiro MOTOKI, LDP v3.14
-.\" Updated 2010-04-10, Akihiro MOTOKI, LDP v3.24
+.\"*******************************************************************
 .\"
-.TH UDP  7 2009-09-30 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O udp \- User Datagram Protocol for IPv4
-.SH Ì¾Á°
-udp \- IPv4 ¤Î ¥æ¡¼¥¶¡¼¥Ç¡¼¥¿¥°¥é¥à¥×¥í¥È¥³¥ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
-.B #include <sys/socket.h>
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH UDP 7 2013\-07\-31 Linux "Linux Programmer's Manual"
+.SH 名前
+udp \- IPv4 の ユーザーデータグラムプロトコル
+.SH 書式
+\fB#include <sys/socket.h>\fP
+.br
+\fB#include <netinet/in.h>\fP
 .br
-.B #include <netinet/in.h>
+\fB#include <netinet/udp.h>\fP
 .sp
-.B udp_socket = socket(AF_INET, SOCK_DGRAM, 0);
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O This is an implementation of the User Datagram Protocol
-.\"O described in RFC\ 768.
-.\"O It implements a connectionless, unreliable datagram packet service.
-.\"O Packets may be reordered or duplicated before they arrive.
-.\"O UDP generates and checks checksums to catch transmission errors.
-¤³¤ì¤Ï RFC\ 768 ¤Çµ­½Ò¤µ¤ì¤Æ¤¤¤ë User Datagram Protocol ¤Î¼ÂÁõ¤Ç¤¢¤ë¡£
-UDP ¤Ï¥³¥Í¥¯¥·¥ç¥ó¥ì¥¹¤Î¡¢¿®ÍêÀ­¤ÎÄ㤤¥Ç¡¼¥¿¥Ñ¥±¥Ã¥È¥µ¡¼¥Ó¥¹¤Ç¤¢¤ë¡£
-¥Ñ¥±¥Ã¥È¤ÏÅþÃåÁ°¤ËʤÓÂؤ¨¤é¤ì¤¿¤êÊ£À½¤µ¤ì¤¿¤ê¤¹¤ë¡£
-UDP ¤ÏžÁ÷¥¨¥é¡¼¤ò¸¡½Ð¤¹¤ë¤¿¤á¤Ë¥Á¥§¥Ã¥¯¥µ¥à¤òÀ¸À®¡¦¥Á¥§¥Ã¥¯¤¹¤ë¡£
+\fBudp_socket = socket(AF_INET, SOCK_DGRAM, 0);\fP
+.SH 説明
+これは RFC\ 768 で記述されている User Datagram Protocol の実装である。 UDP
+はコネクションレスの、信頼性の低いデータパケットサービスである。 パケットは到着前に並び替えられたり複製されたりする。 UDP
+は転送エラーを検出するためにチェックサムを生成・チェックする。
 
-.\"O When a UDP socket is created,
-.\"O its local and remote addresses are unspecified.
-.\"O Datagrams can be sent immediately using
-.\"O .BR sendto (2)
-.\"O or
-.\"O .BR sendmsg (2)
-.\"O with a valid destination address as an argument.
-.\"O When
-.\"O .BR connect (2)
-.\"O is called on the socket, the default destination address is set and
-.\"O datagrams can now be sent using
-.\"O .BR send (2)
-.\"O or
-.\"O .BR write (2)
-.\"O without specifying a destination address.
-UDP ¥½¥±¥Ã¥È¤¬À¸À®¤µ¤ì¤ë¤È¤­¡¢
-¥í¡¼¥«¥ë¥¢¥É¥ì¥¹¤ä¥ê¥â¡¼¥È¥¢¥É¥ì¥¹¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£
-Àµ¤·¤¤¹Ô¤­À襢¥É¥ì¥¹¤ò°ú¿ô¤È¤·¤Æ
-.BR sendto (2)
-¤ä
-.BR sendmsg (2)
-¤ò¸Æ¤Ù¤Ð¡¢¥Ç¡¼¥¿¥°¥é¥à¤Ï¤¿¤À¤Á¤ËÁ÷¿®¤µ¤ì¤ë¡£
-¥½¥±¥Ã¥È¤ËÂФ·¤Æ
-.BR connect (2)
-¤ò¸Æ¤Ö¤È¡¢¥Ç¥Õ¥©¥ë¥È¤Î¹Ô¤­À襢¥É¥ì¥¹¤¬ÀßÄꤵ¤ì¡¢
-.BR send (2)
-¤ä
-.BR write (2)
-¤ò»È¤Ã¤Æ¡¢¹Ô¤­À襢¥É¥ì¥¹¤Î»ØÄê¤Ê¤·¤Ë¥Ç¡¼¥¿¥°¥é¥à¤òÁ÷¿®¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¡£
-.\"O It is still possible to send to other destinations by passing an
-.\"O address to
-.\"O .BR sendto (2)
-.\"O or
-.\"O .BR sendmsg (2).
-¤³¤Î¾ì¹ç¤Ç¤â¡¢¹Ô¤­À襢¥É¥ì¥¹¤ò
-.BR sendto (2)
-¤ä
-.BR sendmsg (2)
-¤ËÅϤ»¤Ð¡¢¥Ç¥Õ¥©¥ë¥È°Ê³°¤Î¥¢¥É¥ì¥¹¤ËÁ÷¿®²Äǽ¤Ç¤¢¤ë¡£
-.\"O In order to receive packets, the socket can be bound to a local
-.\"O address first by using
-.\"O .BR bind (2).
-¥Ñ¥±¥Ã¥È¤ò¼õ¿®¤¹¤ë¤¿¤á¤Ë¡¢¤Þ¤º¥½¥±¥Ã¥È¤ò
-.BR bind (2)
-¤òÍѤ¤¤Æ¥í¡¼¥«¥ë¤Ê¥¢¥É¥ì¥¹¤Ë¥Ð¥¤¥ó¥É¤µ¤»¤ë¤³¤È¤â¤Ç¤­¤ë¡£
-.\"O Otherwise the socket layer will automatically assign
-.\"O a free local port out of the range defined by
-.\"O .I /proc/sys/net/ipv4/ip_local_port_range
-.\"O and bind the socket to
-.\"O .BR INADDR_ANY .
-¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢¥½¥±¥Ã¥ÈÁؤϼ«Æ°Åª¤Ë
-.I /proc/sys/net/ipv4/ip_local_port_range
-¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ëÈϰϤγ°¤Ç¶õ¤¤¤Æ¤¤¤ë¥í¡¼¥«¥ë¤Ê¥Ý¡¼¥È¤ò³ä¤êÅö¤Æ¡¢
-¥½¥±¥Ã¥È¤ò
-.B INADDR_ANY
-¤Ë¥Ð¥¤¥ó¥É¤¹¤ë¡£
+UDP ソケットが生成されるとき、 ローカルアドレスやリモートアドレスは指定されない。 正しい行き先アドレスを引数として \fBsendto\fP(2)  や
+\fBsendmsg\fP(2)  を呼べば、データグラムはただちに送信される。 ソケットに対して \fBconnect\fP(2)
+を呼ぶと、デフォルトの行き先アドレスが設定され、 \fBsend\fP(2)  や \fBwrite\fP(2)
+を使って、行き先アドレスの指定なしにデータグラムを送信できるようになる。 この場合でも、行き先アドレスを \fBsendto\fP(2)  や
+\fBsendmsg\fP(2)  に渡せば、デフォルト以外のアドレスに送信可能である。 パケットを受信するために、まずソケットを \fBbind\fP(2)
+を用いてローカルなアドレスにバインドさせることもできる。 そうでない場合は、ソケット層は自動的に
+\fI/proc/sys/net/ipv4/ip_local_port_range\fP で定義されている範囲の外で空いているローカルなポートを割り当て、
+ソケットを \fBINADDR_ANY\fP にバインドする。
 
-.\"O All receive operations return only one packet.
-.\"O When the packet is smaller than the passed buffer, only that much
-.\"O data is returned, when it is bigger, the packet is truncated and the
-.\"O .B MSG_TRUNC
-.\"O flag is set.
-¼õ¿®Æ°ºî¤Ï¥Ñ¥±¥Ã¥È¤ò°ì¤Ä¤À¤±ÊÖ¤¹¡£ÅϤ·¤¿¥Ð¥Ã¥Õ¥¡¤è¤ê¤â¥Ñ¥±¥Ã¥È¤¬
-¾®¤µ¤±¤ì¤Ð¡¢¤½¤Î¥Ñ¥±¥Ã¥È¤ÎÂ礭¤µ¤Î¥Ç¡¼¥¿¤À¤±¤¬ÊÖ¤µ¤ì¤ë¡£
-µÕ¤Ë¥Ð¥Ã¥Õ¥¡¤è¤ê¤âÂ礭¤¤¾ì¹ç¤Ï¥Ñ¥±¥Ã¥È¤Ï´Ý¤á¤é¤ì¡¢
-.B MSG_TRUNC
-¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
-.\"O .B MSG_WAITALL
-.\"O is not supported.
-.B MSG_WAITALL
-¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¡£
+受信動作はパケットを一つだけ返す。渡したバッファよりもパケットが 小さければ、そのパケットの大きさのデータだけが返される。
+逆にバッファよりも大きい場合はパケットは丸められ、 \fBMSG_TRUNC\fP フラグがセットされる。 \fBMSG_WAITALL\fP
+はサポートしていない。
 
-.\"O IP options may be sent or received using the socket options described in
-.\"O .BR ip (7).
-.\"O They are only processed by the kernel when the appropriate
-.\"O .I /proc
-.\"O parameter
-.\"O is enabled (but still passed to the user even when it is turned off).
-.\"O See
-.\"O .BR ip (7).
-IP ¥ª¥×¥·¥ç¥ó¤Ï¡¢
-.BR ip (7)
-¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤òÍѤ¤¤ÆÆɤ߽ñ¤­¤Ç¤­¤ë¡£
-¤³¤ì¤é¤ÏŬÀÚ¤Ê
-.I /proc
-¥Ñ¥é¥á¡¼¥¿¤¬Í­¸ú¤Ê¾ì¹ç¤Ë¸Â¤Ã¤Æ¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤Æ½èÍý¤µ¤ì¤ë
-(¤·¤«¤·Ìµ¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¥æ¡¼¥¶¡¼¤Ë¤ÏÅϤµ¤ì¤ë)¡£
-.BR ip (7)
-¤ò»²¾È¤Î¤³¤È¡£
+IP オプションは、 \fBip\fP(7)  に記述されているソケットオプションを用いて読み書きできる。 これらは適切な \fI/proc\fP
+パラメータが有効な場合に限ってカーネルによって処理される (しかし無効になっている場合でもユーザーには渡される)。 \fBip\fP(7)  を参照のこと。
 
-.\"O When the
-.\"O .B MSG_DONTROUTE
-.\"O flag is set on sending, the destination address must refer to a local
-.\"O interface address and the packet is only sent to that interface.
-.B MSG_DONTROUTE
-¥Õ¥é¥°¤¬Á÷¿®»þ¤Ë¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢
-¹Ô¤­À襢¥É¥ì¥¹¤Ï¥í¡¼¥«¥ë¤Ê¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¥¢¥É¥ì¥¹¤«¤é
-»²¾È¤Ç¤­¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¥Ñ¥±¥Ã¥È¤Ï¤½¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë¤·¤«Á÷¤é¤ì¤Ê¤¤¡£
+\fBMSG_DONTROUTE\fP フラグが送信時にセットされている場合には、 行き先アドレスはローカルなインターフェースアドレスから
+参照できなければならない。パケットはそのインターフェースにしか送られない。
 
-.\"O By default, Linux UDP does path MTU (Maximum Transmission Unit) discovery.
-.\"O This means the kernel
-.\"O will keep track of the MTU to a specific target IP address and return
-.\"O .B EMSGSIZE
-.\"O when a UDP packet write exceeds it.
-.\"O When this happens, the application should decrease the packet size.
-.\"O Path MTU discovery can be also turned off using the
-.\"O .B IP_MTU_DISCOVER
-.\"O socket option or the
-.\"O .I /proc/sys/net/ipv4/ip_no_pmtu_disc
-.\"O file; see
-.\"O .BR ip (7)
-.\"O for details.
-.\"O When turned off, UDP will fragment outgoing UDP packets
-.\"O that exceed the interface MTU.
-.\"O However, disabling it is not recommended
-.\"O for performance and reliability reasons.
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢Linux ¤Î UDP ¤Ï Path MTU Discovery ¤ò¹Ô¤¦¡£
-¤Ä¤Þ¤ê¡¢¥«¡¼¥Í¥ë¤ÏÆÃÄê¤Î°¸Àè IP ¥¢¥É¥ì¥¹¤Î MTU (Maximum Transmission Unit;
-ºÇÂçžÁ÷ñ°Ì) ¤òµ­Ï¿¤·¡¢UDP ¥Ñ¥±¥Ã¥È¤Î½ñ¤­¹þ¤ß¤¬ MTU ¤òĶ¤¨¤¿¾ì¹ç
-.B EMSGSIZE
-¤òÊÖ¤¹¡£
-.B EMSGSIZE
-¤òÊÖ¤µ¤ì¤¿¾ì¹ç¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¥Ñ¥±¥Ã¥È¥µ¥¤¥º¤ò¾®¤µ¤¯¤¹¤Ù¤­¤Ç¤¢¤ë¡£
-¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó
-.B IP_MTU_DISCOVER
-¤Þ¤¿¤Ï
-.I /proc/sys/net/ipv4/ip_no_pmtu_disc
-¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤Æ Path MTU Discovery ¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤â¤Ç¤­¤ë
-(¾ÜºÙ¤Ï
-.BR ip (7)
-¤ò»²¾È)¡£
-Path MTU Discovery ¤ò̵¸ú¤Ë¤·¤¿¾ì¹ç¤Ï¡¢¥Ñ¥±¥Ã¥È¥µ¥¤¥º¤¬
-¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î MTU ¤è¤ê¤âÂ礭¤¤¤È UDP ¤Ï¤½¤Î¥Ñ¥±¥Ã¥È¤ò
-¥Õ¥é¥°¥á¥ó¥È²½¤·¤ÆÁ÷½Ð¤¹¤ë¡£
-¤·¤«¤·¤Ê¤¬¤é¡¢À­Ç½¤È¿®ÍêÀ­¤ÎÍýͳ¤«¤é Path MTU Discovery ¤ò
-̵¸ú¤Ë¤¹¤ë¤Î¤Ï¿ä¾©¤Ç¤­¤Ê¤¤¡£
-.\"O .SS Address Format
-.SS ¥¢¥É¥ì¥¹¤Î¥Õ¥©¡¼¥Þ¥Ã¥È
-.\"O UDP uses the IPv4
-.\"O .I sockaddr_in
-.\"O address format described in
-.\"O .BR ip (7).
-UDP ¤Ï IPv4 ¤Î
-.I sockaddr_in
-¥¢¥É¥ì¥¹¥Õ¥©¡¼¥Þ¥Ã¥È¤òÍѤ¤¤ë¡£¤³¤ì¤Ï
-.BR ip (7)
-¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O .SS Error Handling
-.SS ¥¨¥é¡¼½èÍý
-.\"O All fatal errors will be passed to the user as an error return even
-.\"O when the socket is not connected.
-.\"O This includes asynchronous errors
-.\"O received from the network.
-.\"O You may get an error for an earlier packet
-.\"O that was sent on the same socket.
-Ã×̿Ū¤Ê¥¨¥é¡¼¤Ï¡¢¤¿¤È¤¨¥½¥±¥Ã¥È¤¬Àܳ¤µ¤ì¤Æ¤¤¤Ê¤¯¤Æ¤â¡¢
-¤¹¤Ù¤Æ¥¨¥é¡¼Ìá¤êÃͤȤ·¤Æ¥æ¡¼¥¶¡¼¤ËÅϤµ¤ì¤ë¡£
-¤³¤ì¤Ë¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¼õ¤±¼è¤ëÈóƱ´ü¥¨¥é¡¼¤â´Þ¤Þ¤ì¤ë¡£
-Ʊ¤¸¥½¥±¥Ã¥È¤ò»È¤Ã¤ÆÁ÷¿®¤·¤¿ÀΤΥѥ±¥Ã¥È¤Ë´Ø¤¹¤ë¥¨¥é¡¼¤ò¼õ¤±¼è¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
-.\"O This behavior differs from many other BSD socket implementations
-.\"O which don't pass any errors unless the socket is connected.
-.\"O Linux's behavior is mandated by
-.\"O .BR RFC\ 1122 .
-¤³¤Î¿¶¤ëÉñ¤¤¤Ï¾¤Î BSD ¥½¥±¥Ã¥È¤Î¼ÂÁõ¤Î¿¤¯¤È¤Ï°Û¤Ê¤ë¡£
-¤³¤ì¤é¤Ç¤Ï¥½¥±¥Ã¥È¤¬Àܳ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥¨¥é¡¼¤òÁ´¤¯ÊÖ¤µ¤Ê¤¤¡£
-Linux ¤Î¿¶¤ëÉñ¤¤¤Ï
-.B RFC\ 1122
-¤Ç¤Î»ØÄê¤Ë½¾¤Ã¤¿¤â¤Î¤Ç¤¢¤ë¡£
+デフォルトでは、Linux の UDP は Path MTU Discovery を行う。 つまり、カーネルは特定の宛先 IP アドレスの MTU
+(Maximum Transmission Unit; 最大転送単位) を記録し、UDP パケットの書き込みが MTU を超えた場合
+\fBEMSGSIZE\fP を返す。 \fBEMSGSIZE\fP を返された場合、アプリケーションはパケットサイズを小さくすべきである。 ソケットオプション
+\fBIP_MTU_DISCOVER\fP または \fI/proc/sys/net/ipv4/ip_no_pmtu_disc\fP ファイルを使って Path
+MTU Discovery を無効にすることもできる (詳細は \fBip\fP(7)  を参照)。 Path MTU Discovery
+を無効にした場合は、パケットサイズが インタフェースの MTU よりも大きいと UDP はそのパケットを フラグメント化して送出する。
+しかしながら、性能と信頼性の理由から Path MTU Discovery を 無効にするのは推奨できない。
+.SS アドレスのフォーマット
+UDP は IPv4 の \fIsockaddr_in\fP アドレスフォーマットを用いる。これは \fBip\fP(7)  に記述されている。
+.SS エラー処理
+致命的なエラーは、たとえソケットが接続されていなくても、 すべてエラー戻り値としてユーザーに渡される。
+これにはネットワークから受け取る非同期エラーも含まれる。 同じソケットを使って送信した昔のパケットに関するエラーを受け取るかもしれない。
+この振る舞いは他の BSD ソケットの実装の多くとは異なる。 これらではソケットが接続されていない場合はエラーを全く返さない。 Linux の振る舞いは
+\fBRFC\ 1122\fP での指定に従ったものである。
 
-.\"O For compatibility with legacy code, in Linux 2.0 and 2.2
-.\"O it was possible to set the
-.\"O .B SO_BSDCOMPAT
-.\"O .B SOL_SOCKET
-.\"O option to receive remote errors only when the socket has been
-.\"O connected (except for
-.\"O .B EPROTO
-.\"O and
-.\"O .BR EMSGSIZE ).
-.\"O Locally generated errors are always passed.
-.\"O Support for this socket option was removed in later kernels; see
-.\"O .BR socket (7)
-.\"O for further information.
-Linux 2.0 ¤È 2.2 ¤Ç¤Ï¡¢¸Å¤¤¥³¡¼¥É¤È¤Î¸ß´¹À­¤Î¤¿¤á¤Ë¡¢
-.B SO_BSDCOMPAT
-.B SOL_SOCKET
-¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ì¤Ð¡¢¥½¥±¥Ã¥È¤¬Àܳ¤µ¤ì¤Æ¤¤¤ë
-¾ì¹ç¤Ë¸Â¤Ã¤Æ¥ê¥â¡¼¥È¤Î¥¨¥é¡¼¤ò¼õ¿®¤¹¤ë¤è¤¦¤Ë¤Ç¤­¤¿
-.RB ( EPROTO " ¤È " EMSGSIZE
-¤ò½ü¤¯)¡£
-¥í¡¼¥«¥ë¤ÇÀ¸À®¤µ¤ì¤¿¥¨¥é¡¼¤Ï¾ï¤ËÅϤµ¤ì¤ë¡£
-¤³¤Î¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤Î¥µ¥Ý¡¼¥È¤Ï¤½¤ì°Ê¹ß¤Î¥Ð¡¼¥¸¥ç¥ó¤Î Linux ¤Ç
-ºï½ü¤µ¤ì¤¿¡£¾ÜºÙ¤Ï
-.BR socket (7)
-¤ò»²¾È¡£
+Linux 2.0 と 2.2 では、古いコードとの互換性のために、 \fBSO_BSDCOMPAT\fP \fBSOL_SOCKET\fP
+オプションを設定すれば、ソケットが接続されている 場合に限ってリモートのエラーを受信するようにできた (\fBEPROTO\fP と \fBEMSGSIZE\fP
+を除く)。 ローカルで生成されたエラーは常に渡される。 このソケットオプションのサポートはそれ以降のバージョンの Linux で 削除された。詳細は
+\fBsocket\fP(7)  を参照。
 
-.\"O When the
-.\"O .B IP_RECVERR
-.\"O option is enabled, all errors are stored in the socket error queue
-.\"O and can be received by
-.\"O .BR recvmsg (2)
-.\"O with the
-.\"O .B MSG_ERRQUEUE
-.\"O flag set.
-.B IP_RECVERR
-¥ª¥×¥·¥ç¥ó¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È¡¢
-¤¹¤Ù¤Æ¤Î¥¨¥é¡¼¤Ï¥½¥±¥Ã¥È¤Î¥¨¥é¡¼¥­¥å¡¼¤ËÊݸ¤µ¤ì¤ë¡£
-¤³¤ì¤Ï
-.B MSG_ERRQUEUE
-¥Õ¥é¥°¤ò¥»¥Ã¥È¤·¤Æ
-.BR recvmsg (2)
-¤ò¸Æ¤Ù¤Ð¼õ¿®¤Ç¤­¤ë¡£
-.\"O .SS /proc interfaces
-.SS /proc ¥¤¥ó¥¿¥Õ¥§¡¼¥¹
-.\"O System-wide UDP parameter settings can be accessed by files in the directory
-.\"O .IR /proc/sys/net/ipv4/ .
-¥·¥¹¥Æ¥àÁ´ÂΤΠUDP ¥Ñ¥é¥á¡¼¥¿ÀßÄê¤Ë¤Ï¡¢
-.I /proc/sys/net/ipv4/
-¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¥Õ¥¡¥¤¥ë¤ÎÆɤ߽ñ¤­¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤ë¡£
-.TP
-.\"O .IR udp_mem " (since Linux 2.6.25)"
-.IR udp_mem " (Linux 2.6.25 °Ê¹ß)"
-.\"O This is a vector of three integers governing the number
-.\"O of pages allowed for queueing by all UDP sockets.
-¤³¤ì¤Ï 3 ¤Ä¤ÎÀ°¿ô¤«¤é¤Ê¤ë¥Ù¥¯¥È¥ëÃͤǡ¢
-UDP ¤ÎÁ´¥½¥±¥Ã¥È¤Î¥­¥å¡¼¤ÇÍøÍѲÄǽ¤Ê¥Ú¡¼¥¸¿ô¤òÀ©¸æ¤¹¤ë¡£
+\fBIP_RECVERR\fP オプションが有効になっていると、 すべてのエラーはソケットのエラーキューに保存される。 これは
+\fBMSG_ERRQUEUE\fP フラグをセットして \fBrecvmsg\fP(2)  を呼べば受信できる。
+.SS "/proc インタフェース"
+システム全体の UDP パラメータ設定には、 \fI/proc/sys/net/ipv4/\fP ディレクトリ内のファイルの読み書きでアクセスできる。
+.TP 
+\fIudp_mem\fP (Linux 2.6.25 以降)
+これは 3 つの整数からなるベクトル値で、 UDP の全ソケットのキューで利用可能なページ数を制御する。
 .RS
-.TP 10
-.I min
-.\"O Below this number of pages, UDP is not bothered about its
-.\"O memory appetite.
-.\"O When the amount of memory allocated by UDP exceeds
-.\"O this number, UDP starts to moderate memory usage.
-¤³¤Î¥Ú¡¼¥¸¿ô¤è¤ê¾¯¤Ê¤±¤ì¤Ð¡¢UDP ¤Ï¤½¤Î¥á¥â¥ê»ÈÍѤ˴ؤ·¤Æ
-´³¾Ä¤µ¤ì¤Ê¤¤¡£
-UDP ¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥á¥â¥êÁíÎ̤¬¤³¤ÎÃͤòĶ²á¤¹¤ë¤È¡¢
-UDP ¤Ï¥á¥â¥ê»ÈÍÑÎ̤òÄ´À°¤·»Ï¤á¤ë¡£
-.TP
-.I pressure
-.\"O This value was introduced to follow the format of
-.\"O .IR tcp_mem
-.\"O (see
-.\"O .BR tcp (7)).
-¤³¤ÎÃͤÏ
-.I tcp_mem
-¤Î·Á¼°
-.RB ( tcp (7)
-»²¾È) ¤È¹ç¤ï¤»¤ë¤¿¤á¤ËƳÆþ¤µ¤ì¤¿
-.TP
-.I max
-.\"O Number of pages allowed for queueing by all UDP sockets.
-UDP ¤ÎÁ´¥½¥±¥Ã¥È¤Î¥­¥å¡¼¤ÇÍøÍѲÄǽ¤Ê¥Ú¡¼¥¸¿ô¡£
+.TP  10
+\fImin\fP
+このページ数より少なければ、UDP はそのメモリ使用に関して 干渉されない。 UDP に割り当てられたメモリ総量がこの値を超過すると、 UDP
+はメモリ使用量を調整し始める。
+.TP 
+\fIpressure\fP
+この値は \fItcp_mem\fP の形式 (\fBtcp\fP(7)  参照) と合わせるために導入された
+.TP 
+\fImax\fP
+UDP の全ソケットのキューで利用可能なページ数。
 .RE
 .IP
-.\"O Defaults values for these three items are
-.\"O calculated at boot time from the amount of available memory.
-¤³¤ì¤é¤Î 3 ¤Ä¤ÎÃͤΥǥե©¥ë¥ÈÃͤϡ¢
-¥Ö¡¼¥È»þ¤ËÍøÍѲÄǽ¤Ê¥á¥â¥êÁíÎ̤«¤é·×»»¤µ¤ì¤ë¡£
-.TP
-.\"O .IR udp_rmem_min " (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
-.IR udp_rmem_min " (integer; ¥Ç¥Õ¥©¥ë¥ÈÃÍ: PAGE_SIZE; Linux 2.6.25 °Ê¹ß)"
-.\"O Minimal size, in bites, of receive buffers used by UDP sockets in moderation.
-.\"O Each UDP socket is able to use the size for receiving data,
-.\"O even if total pages of UDP sockets exceed
-.\"O .I udp_mem
-.\"O pressure.
-¥á¥â¥ê»ÈÍÑÎ̤ÎÄ´À°Ãæ¤Ë¡¢UDP ¥½¥±¥Ã¥È¤¬»ÈÍѤǤ­¤ë¼õ¿®¥Ð¥Ã¥Õ¥¡¤ÎºÇ¾®ÃÍ
-(¥Ð¥¤¥Èñ°Ì)¡£
-UDP ¤ÎÁ´¥½¥±¥Ã¥È¤Î¥Ú¡¼¥¸»ÈÍÑÎ̤ιç·×¤¬
-.I udp_mem
-pressure ¤òĶ²á¤·¤Æ¤¤¤ë¾ì¹ç¤Ç¤¢¤Ã¤Æ¤â¡¢
-³Æ UDP ¥½¥±¥Ã¥È¤Ï¥Ç¡¼¥¿¤Î¼õ¿®¤Ë¤³¤Î¥µ¥¤¥ºÊ¬¤À¤±¤Ï»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
-.TP
-.\"O .IR udp_wmem_min " (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
-.IR udp_wmem_min " (integer; ¥Ç¥Õ¥©¥ë¥ÈÃÍ: PAGE_SIZE; Linux 2.6.25 °Ê¹ß)"
-.\"O Minimal size, in bytes, of send buffer used by UDP sockets in moderation.
-.\"O Each UDP socket is able to use the size for sending data,
-.\"O even if total pages of UDP sockets exceed
-.\"O .I udp_mem
-.\"O pressure.
-¥á¥â¥ê»ÈÍÑÎ̤ÎÄ´À°Ãæ¤Ë¡¢UDP ¥½¥±¥Ã¥È¤¬»ÈÍѤǤ­¤ëÁ÷¿®¥Ð¥Ã¥Õ¥¡¤ÎºÇ¾®ÃÍ
-(¥Ð¥¤¥Èñ°Ì)¡£
-UDP ¤ÎÁ´¥½¥±¥Ã¥È¤Î¥Ú¡¼¥¸»ÈÍÑÎ̤ιç·×¤¬
-.I udp_mem
-pressure ¤òĶ²á¤·¤Æ¤¤¤ë¾ì¹ç¤Ç¤¢¤Ã¤Æ¤â¡¢
-³Æ UDP ¥½¥±¥Ã¥È¤Ï¥Ç¡¼¥¿¤ÎÁ÷¿®¤Ë¤³¤Î¥µ¥¤¥ºÊ¬¤À¤±¤Ï»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
-.\"O \"O .SS "Socket Options"
-.SS ¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó
-.\"O To set or get a UDP socket option, call
-.\"O .BR getsockopt (2)
-.\"O to read or
-.\"O .BR setsockopt (2)
-.\"O to write the option with the option level argument set to
-.\"O .BR IPPROTO_UDP .
-UDP ¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤òÀßÄê¤Þ¤¿¤Ï¼èÆÀ¤¹¤ë¤Ë¤Ï¡¢
-¼èÆÀ¤Ë¤Ï
-.BR getsockopt (2)
-¤ò¡¢ÀßÄê¤Ë¤Ï
-.BR setsockopt (2)
-¤ò¥ª¥×¥·¥ç¥ó¥ì¥Ù¥ë°ú¿ô¤Ë
-.B IPPROTO_UDP
-¤ò»ØÄꤷ¤Æ¸Æ¤Ó½Ð¤¹¡£
-.TP
-.\"O .BR UDP_CORK " (since Linux 2.5.44)"
-.BR UDP_CORK " (Linux 2.5.44 °Ê¹ß)"
-.\"O If this option is enabled, then all data output on this socket
-.\"O is accumulated into a single datagram that is transmitted when
-.\"O the option is disabled.
-.\"O This option should not be used in code intended to be
-.\"O portable.
-¤³¤Î¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤ë¤È¡¢¤³¤Î¥½¥±¥Ã¥È¤ÎÁ´¤Æ¤Î¥Ç¡¼¥¿½ÐÎϤÏ
-°ì¤Ä¤Î¥Ç¡¼¥¿¥°¥é¥à¤ËÃßÀѤµ¤ì¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤¬Ìµ¸ú²½¤µ¤ì¤¿»þ¤Ë
-Á÷¿®¤µ¤ì¤ë¡£
-¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï°Ü¿¢À­¤ò¹Íθ¤·¤¿¥³¡¼¥É¤Ç¤ÏÍѤ¤¤ë¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
+これらの 3 つの値のデフォルト値は、 ブート時に利用可能なメモリ総量から計算される。
+.TP 
+\fIudp_rmem_min\fP (integer; デフォルト値: PAGE_SIZE; Linux 2.6.25 以降)
+メモリ使用量の調整中に、UDP ソケットが使用できる受信バッファの最小値 (バイト単位)。 UDP の全ソケットのページ使用量の合計が
+\fIudp_mem\fP pressure を超過している場合であっても、 各 UDP ソケットはデータの受信にこのサイズ分だけは使用することができる。
+.TP 
+\fIudp_wmem_min\fP (integer; デフォルト値: PAGE_SIZE; Linux 2.6.25 以降)
+メモリ使用量の調整中に、UDP ソケットが使用できる送信バッファの最小値 (バイト単位)。 UDP の全ソケットのページ使用量の合計が
+\fIudp_mem\fP pressure を超過している場合であっても、 各 UDP ソケットはデータの送信にこのサイズ分だけは使用することができる。
+.SS ソケットオプション
+UDP ソケットオプションを設定または取得するには、 取得には \fBgetsockopt\fP(2)  を、設定には \fBsetsockopt\fP(2)
+をオプションレベル引数に \fBIPPROTO_UDP\fP を指定して呼び出す。 注釈がない限り、 \fIoptval\fP は \fIint\fP
+へのポインタである。
+.TP 
+\fBUDP_CORK\fP (Linux 2.5.44 以降)
 .\" FIXME document UDP_ENCAP (new in kernel 2.5.67)
 .\" From include/linux/udp.h:
 .\" /* UDP encapsulation types */
 .\" #define UDP_ENCAP_ESPINUDP_NON_IKE      1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
 .\" #define UDP_ENCAP_ESPINUDP      2 /* draft-ietf-ipsec-udp-encaps-06 */
 .\" #define UDP_ENCAP_L2TPINUDP     3 /* rfc2661 */
-.\"O .SS Ioctls
+このオプションが指定されると、このソケットの全てのデータ出力は 一つのデータグラムに蓄積され、このオプションが無効化された時に 送信される。
+このオプションは移植性を考慮したコードでは用いるべきではない。
 .SS ioctl
-.\"O These ioctls can be accessed using
-.\"O .BR ioctl (2).
-°Ê²¼¤Ë¼¨¤¹ ioctl ¤Ï
-.BR ioctl (2)
-¤ò»È¤Ã¤Æ¥¢¥¯¥»¥¹¤Ç¤­¤ë¡£
-.\"O The correct syntax is:
-Àµ¤·¤¤Ê¸Ë¡¤Ï°Ê²¼¤ÎÄ̤ꡣ
+以下に示す ioctl は \fBioctl\fP(2)  を使ってアクセスできる。 正しい文法は以下の通り。
 .PP
 .RS
 .nf
-.BI int " value";
-.IB error " = ioctl(" udp_socket ", " ioctl_type ", &" value ");"
+\fBint\fP\fI value\fP\fB;\fP
+\fIerror\fP\fB = ioctl(\fP\fIudp_socket\fP\fB, \fP\fIioctl_type\fP\fB, &\fP\fIvalue\fP\fB);\fP
 .fi
 .RE
-.TP
-.BR FIONREAD " (" SIOCINQ )
-.\"O Gets a pointer to an integer as argument.
-.\"O Returns the size of the next pending datagram in the integer in bytes,
-.\"O or 0 when no datagram is pending.
-integer ¤Î¥Ý¥¤¥ó¥¿¤ò°ú¿ô¤È¤·¤Æ¼è¤ë¡£
-¼¡¤ËÂÔµ¡¤·¤Æ¤¤¤ë¥Ç¡¼¥¿¥°¥é¥à¤Î¥µ¥¤¥º¤ò¥Ð¥¤¥Èñ°Ì¤ÎÀ°¿ô¤ÇÊÖ¤¹¡£
-ÂÔµ¡¤·¤Æ¤¤¤ë¥Ç¡¼¥¿¥°¥é¥à¤¬¤Ê¤¤¾ì¹ç¤Ï 0 ¤òÊÖ¤¹¡£
-.TP
-.BR TIOCOUTQ " (" SIOCOUTQ )
-.\"O Returns the number of data bytes in the local send queue.
-.\"O Only supported with Linux 2.4 and above.
-¥í¡¼¥«¥ëÁ÷¿®¥­¥å¡¼¤Ë¤¢¤ë¥Ç¡¼¥¿¥µ¥¤¥º¤ò¥Ð¥¤¥Èñ°Ì¤ÇÊÖ¤¹¡£
-Linux 2.4 °Ê¾å¤Ç¤Î¤ßÂбþ¤·¤Æ¤¤¤ë¡£
+.TP 
+\fBFIONREAD\fP (\fBSIOCINQ\fP)
+.\" See http://www.securiteam.com/unixfocus/5KP0I15IKO.html
+.\" "GNUnet DoS (UDP Socket Unreachable)", 14 May 2006
+整数へのポインタを引き数に取り、そのポインタに、次の処理待ちのデータグラムの
+サイズをバイト単位で返す。処理待ちのデータグラムがない場合は 0 を返す。
+\fB警告\fP: \fBFIONREAD\fP を使った場合、処理待ちのデータグラムがない場合と、
+次の処理待ちデータグラムが 0 バイトのデータの場合を区別することができない。
+この両者を区別したい場合は、\fBselect\fP(2), \fBpoll\fP(2), \fBepoll\fP(7)
+を使う方が安全である。
+.TP 
+\fBTIOCOUTQ\fP (\fBSIOCOUTQ\fP)
+ローカル送信キューにあるデータサイズをバイト単位で返す。 Linux 2.4 以上でのみ対応している。
 .PP
-.\"O In addition all ioctls documented in
-.\"O .BR ip (7)
-.\"O and
-.\"O .BR socket (7)
-.\"O are supported.
-¤µ¤é¤Ë¡¢
-.BR ip (7)
-¤È
-.BR socket (7)
-¤Ç½Ò¤Ù¤é¤ì¤Æ¤¤¤ëÁ´¤Æ¤Î ioctl ¤âÂбþ¤·¤Æ¤¤¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.\"O All errors documented for
-.\"O .BR socket (7)
-.\"O or
-.\"O .BR ip (7)
-.\"O may be returned by a send or receive on a UDP socket.
-.BR socket (7)
-¤ä
-.BR ip (7)
-¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ëÁ´¤Æ¤Î¥¨¥é¡¼¤¬¡¢
-UDP ¥½¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤ÇÊÖ¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
-.TP
-.B ECONNREFUSED
-.\"O No receiver was associated with the destination address.
-.\"O This might be caused by a previous packet sent over the socket.
-¹Ô¤­À襢¥É¥ì¥¹¤Ë´ØÏ¢¤Å¤±¤é¤ì¤Æ¤¤¤ë¼õ¿®¼Ô¤¬¤¤¤Ê¤¤¡£
-¤³¤ì¤Ï°ÊÁ°¤Î¥Ñ¥±¥Ã¥È¤¬¤½¤Î¥Ñ¥±¥Ã¥È¤ò
-¾å½ñ¤­Á÷¿®¤·¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¤«¤é¤Ç¤¢¤ë¤³¤È¤¬Â¿¤¤¡£
-.\"O .SH VERSIONS
-.SH ¥Ð¡¼¥¸¥ç¥ó
-.\"O .B IP_RECVERR
-.\"O is a new feature in Linux 2.2.
-.B IP_RECVERR
-¤Ï Linux 2.2 ¤Î¿·¤·¤¤µ¡Ç½¤Ç¤¢¤ë¡£
-.\"O .\" .SH CREDITS
-.\" .SH Ãø¼Ô
-.\"O .\" This man page was written by Andi Kleen.
-.\" ¤³¤Î man ¥Ú¡¼¥¸¤Ï Andi Kleen ¤¬½ñ¤¤¤¿¡£
-.\"O .SH SEE ALSO
-.SH ´ØÏ¢¹àÌÜ
-.BR ip (7),
-.BR raw (7),
-.BR socket (7),
-.BR udplite (7)
+さらに、 \fBip\fP(7)  と \fBsocket\fP(7)  で述べられている全ての ioctl も対応している。
+.SH エラー
+\fBsocket\fP(7)  や \fBip\fP(7)  に記述されている全てのエラーが、 UDP ソケットの送受信で返される可能性がある。
+.TP 
+\fBECONNREFUSED\fP
+行き先アドレスに関連づけられている受信者がいない。 これは以前のパケットがそのパケットを 上書き送信してしまっているからであることが多い。
+.SH バージョン
+.\" .SH CREDITS
+.\" This man page was written by Andi Kleen.
+\fBIP_RECVERR\fP は Linux 2.2 の新しい機能である。
+.SH 関連項目
+\fBip\fP(7), \fBraw\fP(7), \fBsocket\fP(7), \fBudplite\fP(7)
 
-.\"O RFC\ 768 for the User Datagram Protocol.
 RFC\ 768 : User Datagram Protocol
 .br
-.\"O RFC\ 1122 for the host requirements.
-RFC\ 1122 : ¥Û¥¹¥È¤ÎɬÍ×¾ò·ï
+RFC\ 1122 : ホストの必要条件
 .br
-.\"O RFC\ 1191 for a description of path MTU discovery.
-RFC\ 1191 : path MTU discovery ¤Îµ­½Ò
+RFC\ 1191 : path MTU discovery の記述
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。