OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / draft / man7 / udp.7
1 .\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
2 .\" Permission is granted to distribute possibly modified copies
3 .\" of this page provided the header is included verbatim,
4 .\" and in case of nontrivial modification author and date
5 .\" of the modification is added to the header.
6 .\" $Id: udp.7,v 1.7 2000/01/22 01:55:05 freitag Exp $
7 .\"
8 .\" Japanese Version Copyright (c) 1999 NAKANO Takeo all rights reserved.
9 .\" Translated 1999-12-06, NAKANO Takeo <nakano@apm.seikei.ac.jp>
10 .\" Updated 2005-10-09, Kentaro Shirakata <argrath@ub32.org>
11 .\" Updated 2007-01-05, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.43
12 .\" Updated 2008-12-29, Akihiro MOTOKI, LDP v3.14
13 .\" Updated 2010-04-10, Akihiro MOTOKI, LDP v3.24
14 .\"
15 .TH UDP  7 2009-09-30 "Linux" "Linux Programmer's Manual"
16 .\"O .SH NAME
17 .\"O udp \- User Datagram Protocol for IPv4
18 .SH Ì¾Á°
19 udp \- IPv4 ¤Î ¥æ¡¼¥¶¡¼¥Ç¡¼¥¿¥°¥é¥à¥×¥í¥È¥³¥ë
20 .\"O .SH SYNOPSIS
21 .SH ½ñ¼°
22 .B #include <sys/socket.h>
23 .br
24 .B #include <netinet/in.h>
25 .sp
26 .B udp_socket = socket(AF_INET, SOCK_DGRAM, 0);
27 .\"O .SH DESCRIPTION
28 .SH ÀâÌÀ
29 .\"O This is an implementation of the User Datagram Protocol
30 .\"O described in RFC\ 768.
31 .\"O It implements a connectionless, unreliable datagram packet service.
32 .\"O Packets may be reordered or duplicated before they arrive.
33 .\"O UDP generates and checks checksums to catch transmission errors.
34 ¤³¤ì¤Ï RFC\ 768 ¤Çµ­½Ò¤µ¤ì¤Æ¤¤¤ë User Datagram Protocol ¤Î¼ÂÁõ¤Ç¤¢¤ë¡£
35 UDP ¤Ï¥³¥Í¥¯¥·¥ç¥ó¥ì¥¹¤Î¡¢¿®ÍêÀ­¤ÎÄ㤤¥Ç¡¼¥¿¥Ñ¥±¥Ã¥È¥µ¡¼¥Ó¥¹¤Ç¤¢¤ë¡£
36 ¥Ñ¥±¥Ã¥È¤ÏÅþÃåÁ°¤ËʤÓÂؤ¨¤é¤ì¤¿¤êÊ£À½¤µ¤ì¤¿¤ê¤¹¤ë¡£
37 UDP ¤ÏžÁ÷¥¨¥é¡¼¤ò¸¡½Ð¤¹¤ë¤¿¤á¤Ë¥Á¥§¥Ã¥¯¥µ¥à¤òÀ¸À®¡¦¥Á¥§¥Ã¥¯¤¹¤ë¡£
38
39 .\"O When a UDP socket is created,
40 .\"O its local and remote addresses are unspecified.
41 .\"O Datagrams can be sent immediately using
42 .\"O .BR sendto (2)
43 .\"O or
44 .\"O .BR sendmsg (2)
45 .\"O with a valid destination address as an argument.
46 .\"O When
47 .\"O .BR connect (2)
48 .\"O is called on the socket, the default destination address is set and
49 .\"O datagrams can now be sent using
50 .\"O .BR send (2)
51 .\"O or
52 .\"O .BR write (2)
53 .\"O without specifying a destination address.
54 UDP ¥½¥±¥Ã¥È¤¬À¸À®¤µ¤ì¤ë¤È¤­¡¢
55 ¥í¡¼¥«¥ë¥¢¥É¥ì¥¹¤ä¥ê¥â¡¼¥È¥¢¥É¥ì¥¹¤Ï»ØÄꤵ¤ì¤Ê¤¤¡£
56 Àµ¤·¤¤¹Ô¤­À襢¥É¥ì¥¹¤ò°ú¿ô¤È¤·¤Æ
57 .BR sendto (2)
58 ¤ä
59 .BR sendmsg (2)
60 ¤ò¸Æ¤Ù¤Ð¡¢¥Ç¡¼¥¿¥°¥é¥à¤Ï¤¿¤À¤Á¤ËÁ÷¿®¤µ¤ì¤ë¡£
61 ¥½¥±¥Ã¥È¤ËÂФ·¤Æ
62 .BR connect (2)
63 ¤ò¸Æ¤Ö¤È¡¢¥Ç¥Õ¥©¥ë¥È¤Î¹Ô¤­À襢¥É¥ì¥¹¤¬ÀßÄꤵ¤ì¡¢
64 .BR send (2)
65 ¤ä
66 .BR write (2)
67 ¤ò»È¤Ã¤Æ¡¢¹Ô¤­À襢¥É¥ì¥¹¤Î»ØÄê¤Ê¤·¤Ë¥Ç¡¼¥¿¥°¥é¥à¤òÁ÷¿®¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¡£
68 .\"O It is still possible to send to other destinations by passing an
69 .\"O address to
70 .\"O .BR sendto (2)
71 .\"O or
72 .\"O .BR sendmsg (2).
73 ¤³¤Î¾ì¹ç¤Ç¤â¡¢¹Ô¤­À襢¥É¥ì¥¹¤ò
74 .BR sendto (2)
75 ¤ä
76 .BR sendmsg (2)
77 ¤ËÅϤ»¤Ð¡¢¥Ç¥Õ¥©¥ë¥È°Ê³°¤Î¥¢¥É¥ì¥¹¤ËÁ÷¿®²Äǽ¤Ç¤¢¤ë¡£
78 .\"O In order to receive packets, the socket can be bound to a local
79 .\"O address first by using
80 .\"O .BR bind (2).
81 ¥Ñ¥±¥Ã¥È¤ò¼õ¿®¤¹¤ë¤¿¤á¤Ë¡¢¤Þ¤º¥½¥±¥Ã¥È¤ò
82 .BR bind (2)
83 ¤òÍѤ¤¤Æ¥í¡¼¥«¥ë¤Ê¥¢¥É¥ì¥¹¤Ë¥Ð¥¤¥ó¥É¤µ¤»¤ë¤³¤È¤â¤Ç¤­¤ë¡£
84 .\"O Otherwise the socket layer will automatically assign
85 .\"O a free local port out of the range defined by
86 .\"O .I /proc/sys/net/ipv4/ip_local_port_range
87 .\"O and bind the socket to
88 .\"O .BR INADDR_ANY .
89 ¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢¥½¥±¥Ã¥ÈÁؤϼ«Æ°Åª¤Ë
90 .I /proc/sys/net/ipv4/ip_local_port_range
91 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ëÈϰϤγ°¤Ç¶õ¤¤¤Æ¤¤¤ë¥í¡¼¥«¥ë¤Ê¥Ý¡¼¥È¤ò³ä¤êÅö¤Æ¡¢
92 ¥½¥±¥Ã¥È¤ò
93 .B INADDR_ANY
94 ¤Ë¥Ð¥¤¥ó¥É¤¹¤ë¡£
95
96 .\"O All receive operations return only one packet.
97 .\"O When the packet is smaller than the passed buffer, only that much
98 .\"O data is returned, when it is bigger, the packet is truncated and the
99 .\"O .B MSG_TRUNC
100 .\"O flag is set.
101 ¼õ¿®Æ°ºî¤Ï¥Ñ¥±¥Ã¥È¤ò°ì¤Ä¤À¤±ÊÖ¤¹¡£ÅϤ·¤¿¥Ð¥Ã¥Õ¥¡¤è¤ê¤â¥Ñ¥±¥Ã¥È¤¬
102 ¾®¤µ¤±¤ì¤Ð¡¢¤½¤Î¥Ñ¥±¥Ã¥È¤ÎÂ礭¤µ¤Î¥Ç¡¼¥¿¤À¤±¤¬ÊÖ¤µ¤ì¤ë¡£
103 µÕ¤Ë¥Ð¥Ã¥Õ¥¡¤è¤ê¤âÂ礭¤¤¾ì¹ç¤Ï¥Ñ¥±¥Ã¥È¤Ï´Ý¤á¤é¤ì¡¢
104 .B MSG_TRUNC
105 ¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
106 .\"O .B MSG_WAITALL
107 .\"O is not supported.
108 .B MSG_WAITALL
109 ¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¡£
110
111 .\"O IP options may be sent or received using the socket options described in
112 .\"O .BR ip (7).
113 .\"O They are only processed by the kernel when the appropriate
114 .\"O .I /proc
115 .\"O parameter
116 .\"O is enabled (but still passed to the user even when it is turned off).
117 .\"O See
118 .\"O .BR ip (7).
119 IP ¥ª¥×¥·¥ç¥ó¤Ï¡¢
120 .BR ip (7)
121 ¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤òÍѤ¤¤ÆÆɤ߽ñ¤­¤Ç¤­¤ë¡£
122 ¤³¤ì¤é¤ÏŬÀÚ¤Ê
123 .I /proc
124 ¥Ñ¥é¥á¡¼¥¿¤¬Í­¸ú¤Ê¾ì¹ç¤Ë¸Â¤Ã¤Æ¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤Æ½èÍý¤µ¤ì¤ë
125 (¤·¤«¤·Ìµ¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¥æ¡¼¥¶¡¼¤Ë¤ÏÅϤµ¤ì¤ë)¡£
126 .BR ip (7)
127 ¤ò»²¾È¤Î¤³¤È¡£
128
129 .\"O When the
130 .\"O .B MSG_DONTROUTE
131 .\"O flag is set on sending, the destination address must refer to a local
132 .\"O interface address and the packet is only sent to that interface.
133 .B MSG_DONTROUTE
134 ¥Õ¥é¥°¤¬Á÷¿®»þ¤Ë¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢
135 ¹Ô¤­À襢¥É¥ì¥¹¤Ï¥í¡¼¥«¥ë¤Ê¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¥¢¥É¥ì¥¹¤«¤é
136 »²¾È¤Ç¤­¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¥Ñ¥±¥Ã¥È¤Ï¤½¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë¤·¤«Á÷¤é¤ì¤Ê¤¤¡£
137
138 .\"O By default, Linux UDP does path MTU (Maximum Transmission Unit) discovery.
139 .\"O This means the kernel
140 .\"O will keep track of the MTU to a specific target IP address and return
141 .\"O .B EMSGSIZE
142 .\"O when a UDP packet write exceeds it.
143 .\"O When this happens, the application should decrease the packet size.
144 .\"O Path MTU discovery can be also turned off using the
145 .\"O .B IP_MTU_DISCOVER
146 .\"O socket option or the
147 .\"O .I /proc/sys/net/ipv4/ip_no_pmtu_disc
148 .\"O file; see
149 .\"O .BR ip (7)
150 .\"O for details.
151 .\"O When turned off, UDP will fragment outgoing UDP packets
152 .\"O that exceed the interface MTU.
153 .\"O However, disabling it is not recommended
154 .\"O for performance and reliability reasons.
155 ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢Linux ¤Î UDP ¤Ï Path MTU Discovery ¤ò¹Ô¤¦¡£
156 ¤Ä¤Þ¤ê¡¢¥«¡¼¥Í¥ë¤ÏÆÃÄê¤Î°¸Àè IP ¥¢¥É¥ì¥¹¤Î MTU (Maximum Transmission Unit;
157 ºÇÂçžÁ÷ñ°Ì) ¤òµ­Ï¿¤·¡¢UDP ¥Ñ¥±¥Ã¥È¤Î½ñ¤­¹þ¤ß¤¬ MTU ¤òĶ¤¨¤¿¾ì¹ç
158 .B EMSGSIZE
159 ¤òÊÖ¤¹¡£
160 .B EMSGSIZE
161 ¤òÊÖ¤µ¤ì¤¿¾ì¹ç¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¥Ñ¥±¥Ã¥È¥µ¥¤¥º¤ò¾®¤µ¤¯¤¹¤Ù¤­¤Ç¤¢¤ë¡£
162 ¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó
163 .B IP_MTU_DISCOVER
164 ¤Þ¤¿¤Ï
165 .I /proc/sys/net/ipv4/ip_no_pmtu_disc
166 ¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤Æ Path MTU Discovery ¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤â¤Ç¤­¤ë
167 (¾ÜºÙ¤Ï
168 .BR ip (7)
169 ¤ò»²¾È)¡£
170 Path MTU Discovery ¤ò̵¸ú¤Ë¤·¤¿¾ì¹ç¤Ï¡¢¥Ñ¥±¥Ã¥È¥µ¥¤¥º¤¬
171 ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î MTU ¤è¤ê¤âÂ礭¤¤¤È UDP ¤Ï¤½¤Î¥Ñ¥±¥Ã¥È¤ò
172 ¥Õ¥é¥°¥á¥ó¥È²½¤·¤ÆÁ÷½Ð¤¹¤ë¡£
173 ¤·¤«¤·¤Ê¤¬¤é¡¢À­Ç½¤È¿®ÍêÀ­¤ÎÍýͳ¤«¤é Path MTU Discovery ¤ò
174 ̵¸ú¤Ë¤¹¤ë¤Î¤Ï¿ä¾©¤Ç¤­¤Ê¤¤¡£
175 .\"O .SS Address Format
176 .SS ¥¢¥É¥ì¥¹¤Î¥Õ¥©¡¼¥Þ¥Ã¥È
177 .\"O UDP uses the IPv4
178 .\"O .I sockaddr_in
179 .\"O address format described in
180 .\"O .BR ip (7).
181 UDP ¤Ï IPv4 ¤Î
182 .I sockaddr_in
183 ¥¢¥É¥ì¥¹¥Õ¥©¡¼¥Þ¥Ã¥È¤òÍѤ¤¤ë¡£¤³¤ì¤Ï
184 .BR ip (7)
185 ¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë¡£
186 .\"O .SS Error Handling
187 .SS ¥¨¥é¡¼½èÍý
188 .\"O All fatal errors will be passed to the user as an error return even
189 .\"O when the socket is not connected.
190 .\"O This includes asynchronous errors
191 .\"O received from the network.
192 .\"O You may get an error for an earlier packet
193 .\"O that was sent on the same socket.
194 Ã×̿Ū¤Ê¥¨¥é¡¼¤Ï¡¢¤¿¤È¤¨¥½¥±¥Ã¥È¤¬Àܳ¤µ¤ì¤Æ¤¤¤Ê¤¯¤Æ¤â¡¢
195 ¤¹¤Ù¤Æ¥¨¥é¡¼Ìá¤êÃͤȤ·¤Æ¥æ¡¼¥¶¡¼¤ËÅϤµ¤ì¤ë¡£
196 ¤³¤ì¤Ë¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¼õ¤±¼è¤ëÈóƱ´ü¥¨¥é¡¼¤â´Þ¤Þ¤ì¤ë¡£
197 Ʊ¤¸¥½¥±¥Ã¥È¤ò»È¤Ã¤ÆÁ÷¿®¤·¤¿ÀΤΥѥ±¥Ã¥È¤Ë´Ø¤¹¤ë¥¨¥é¡¼¤ò¼õ¤±¼è¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
198 .\"O This behavior differs from many other BSD socket implementations
199 .\"O which don't pass any errors unless the socket is connected.
200 .\"O Linux's behavior is mandated by
201 .\"O .BR RFC\ 1122 .
202 ¤³¤Î¿¶¤ëÉñ¤¤¤Ï¾¤Î BSD ¥½¥±¥Ã¥È¤Î¼ÂÁõ¤Î¿¤¯¤È¤Ï°Û¤Ê¤ë¡£
203 ¤³¤ì¤é¤Ç¤Ï¥½¥±¥Ã¥È¤¬Àܳ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥¨¥é¡¼¤òÁ´¤¯ÊÖ¤µ¤Ê¤¤¡£
204 Linux ¤Î¿¶¤ëÉñ¤¤¤Ï
205 .B RFC\ 1122
206 ¤Ç¤Î»ØÄê¤Ë½¾¤Ã¤¿¤â¤Î¤Ç¤¢¤ë¡£
207
208 .\"O For compatibility with legacy code, in Linux 2.0 and 2.2
209 .\"O it was possible to set the
210 .\"O .B SO_BSDCOMPAT
211 .\"O .B SOL_SOCKET
212 .\"O option to receive remote errors only when the socket has been
213 .\"O connected (except for
214 .\"O .B EPROTO
215 .\"O and
216 .\"O .BR EMSGSIZE ).
217 .\"O Locally generated errors are always passed.
218 .\"O Support for this socket option was removed in later kernels; see
219 .\"O .BR socket (7)
220 .\"O for further information.
221 Linux 2.0 ¤È 2.2 ¤Ç¤Ï¡¢¸Å¤¤¥³¡¼¥É¤È¤Î¸ß´¹À­¤Î¤¿¤á¤Ë¡¢
222 .B SO_BSDCOMPAT
223 .B SOL_SOCKET
224 ¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ì¤Ð¡¢¥½¥±¥Ã¥È¤¬Àܳ¤µ¤ì¤Æ¤¤¤ë
225 ¾ì¹ç¤Ë¸Â¤Ã¤Æ¥ê¥â¡¼¥È¤Î¥¨¥é¡¼¤ò¼õ¿®¤¹¤ë¤è¤¦¤Ë¤Ç¤­¤¿
226 .RB ( EPROTO " ¤È " EMSGSIZE
227 ¤ò½ü¤¯)¡£
228 ¥í¡¼¥«¥ë¤ÇÀ¸À®¤µ¤ì¤¿¥¨¥é¡¼¤Ï¾ï¤ËÅϤµ¤ì¤ë¡£
229 ¤³¤Î¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤Î¥µ¥Ý¡¼¥È¤Ï¤½¤ì°Ê¹ß¤Î¥Ð¡¼¥¸¥ç¥ó¤Î Linux ¤Ç
230 ºï½ü¤µ¤ì¤¿¡£¾ÜºÙ¤Ï
231 .BR socket (7)
232 ¤ò»²¾È¡£
233
234 .\"O When the
235 .\"O .B IP_RECVERR
236 .\"O option is enabled, all errors are stored in the socket error queue
237 .\"O and can be received by
238 .\"O .BR recvmsg (2)
239 .\"O with the
240 .\"O .B MSG_ERRQUEUE
241 .\"O flag set.
242 .B IP_RECVERR
243 ¥ª¥×¥·¥ç¥ó¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È¡¢
244 ¤¹¤Ù¤Æ¤Î¥¨¥é¡¼¤Ï¥½¥±¥Ã¥È¤Î¥¨¥é¡¼¥­¥å¡¼¤ËÊݸ¤µ¤ì¤ë¡£
245 ¤³¤ì¤Ï
246 .B MSG_ERRQUEUE
247 ¥Õ¥é¥°¤ò¥»¥Ã¥È¤·¤Æ
248 .BR recvmsg (2)
249 ¤ò¸Æ¤Ù¤Ð¼õ¿®¤Ç¤­¤ë¡£
250 .\"O .SS /proc interfaces
251 .SS /proc ¥¤¥ó¥¿¥Õ¥§¡¼¥¹
252 .\"O System-wide UDP parameter settings can be accessed by files in the directory
253 .\"O .IR /proc/sys/net/ipv4/ .
254 ¥·¥¹¥Æ¥àÁ´ÂΤΠUDP ¥Ñ¥é¥á¡¼¥¿ÀßÄê¤Ë¤Ï¡¢
255 .I /proc/sys/net/ipv4/
256 ¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¥Õ¥¡¥¤¥ë¤ÎÆɤ߽ñ¤­¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤ë¡£
257 .TP
258 .\"O .IR udp_mem " (since Linux 2.6.25)"
259 .IR udp_mem " (Linux 2.6.25 °Ê¹ß)"
260 .\"O This is a vector of three integers governing the number
261 .\"O of pages allowed for queueing by all UDP sockets.
262 ¤³¤ì¤Ï 3 ¤Ä¤ÎÀ°¿ô¤«¤é¤Ê¤ë¥Ù¥¯¥È¥ëÃͤǡ¢
263 UDP ¤ÎÁ´¥½¥±¥Ã¥È¤Î¥­¥å¡¼¤ÇÍøÍѲÄǽ¤Ê¥Ú¡¼¥¸¿ô¤òÀ©¸æ¤¹¤ë¡£
264 .RS
265 .TP 10
266 .I min
267 .\"O Below this number of pages, UDP is not bothered about its
268 .\"O memory appetite.
269 .\"O When the amount of memory allocated by UDP exceeds
270 .\"O this number, UDP starts to moderate memory usage.
271 ¤³¤Î¥Ú¡¼¥¸¿ô¤è¤ê¾¯¤Ê¤±¤ì¤Ð¡¢UDP ¤Ï¤½¤Î¥á¥â¥ê»ÈÍѤ˴ؤ·¤Æ
272 ´³¾Ä¤µ¤ì¤Ê¤¤¡£
273 UDP ¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥á¥â¥êÁíÎ̤¬¤³¤ÎÃͤòĶ²á¤¹¤ë¤È¡¢
274 UDP ¤Ï¥á¥â¥ê»ÈÍÑÎ̤òÄ´À°¤·»Ï¤á¤ë¡£
275 .TP
276 .I pressure
277 .\"O This value was introduced to follow the format of
278 .\"O .IR tcp_mem
279 .\"O (see
280 .\"O .BR tcp (7)).
281 ¤³¤ÎÃͤÏ
282 .I tcp_mem
283 ¤Î·Á¼°
284 .RB ( tcp (7)
285 »²¾È) ¤È¹ç¤ï¤»¤ë¤¿¤á¤ËƳÆþ¤µ¤ì¤¿
286 .TP
287 .I max
288 .\"O Number of pages allowed for queueing by all UDP sockets.
289 UDP ¤ÎÁ´¥½¥±¥Ã¥È¤Î¥­¥å¡¼¤ÇÍøÍѲÄǽ¤Ê¥Ú¡¼¥¸¿ô¡£
290 .RE
291 .IP
292 .\"O Defaults values for these three items are
293 .\"O calculated at boot time from the amount of available memory.
294 ¤³¤ì¤é¤Î 3 ¤Ä¤ÎÃͤΥǥե©¥ë¥ÈÃͤϡ¢
295 ¥Ö¡¼¥È»þ¤ËÍøÍѲÄǽ¤Ê¥á¥â¥êÁíÎ̤«¤é·×»»¤µ¤ì¤ë¡£
296 .TP
297 .\"O .IR udp_rmem_min " (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
298 .IR udp_rmem_min " (integer; ¥Ç¥Õ¥©¥ë¥ÈÃÍ: PAGE_SIZE; Linux 2.6.25 °Ê¹ß)"
299 .\"O Minimal size, in bites, of receive buffers used by UDP sockets in moderation.
300 .\"O Each UDP socket is able to use the size for receiving data,
301 .\"O even if total pages of UDP sockets exceed
302 .\"O .I udp_mem
303 .\"O pressure.
304 ¥á¥â¥ê»ÈÍÑÎ̤ÎÄ´À°Ãæ¤Ë¡¢UDP ¥½¥±¥Ã¥È¤¬»ÈÍѤǤ­¤ë¼õ¿®¥Ð¥Ã¥Õ¥¡¤ÎºÇ¾®ÃÍ
305 (¥Ð¥¤¥Èñ°Ì)¡£
306 UDP ¤ÎÁ´¥½¥±¥Ã¥È¤Î¥Ú¡¼¥¸»ÈÍÑÎ̤ιç·×¤¬
307 .I udp_mem
308 pressure ¤òĶ²á¤·¤Æ¤¤¤ë¾ì¹ç¤Ç¤¢¤Ã¤Æ¤â¡¢
309 ³Æ UDP ¥½¥±¥Ã¥È¤Ï¥Ç¡¼¥¿¤Î¼õ¿®¤Ë¤³¤Î¥µ¥¤¥ºÊ¬¤À¤±¤Ï»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
310 .TP
311 .\"O .IR udp_wmem_min " (integer; default value: PAGE_SIZE; since Linux 2.6.25)"
312 .IR udp_wmem_min " (integer; ¥Ç¥Õ¥©¥ë¥ÈÃÍ: PAGE_SIZE; Linux 2.6.25 °Ê¹ß)"
313 .\"O Minimal size, in bytes, of send buffer used by UDP sockets in moderation.
314 .\"O Each UDP socket is able to use the size for sending data,
315 .\"O even if total pages of UDP sockets exceed
316 .\"O .I udp_mem
317 .\"O pressure.
318 ¥á¥â¥ê»ÈÍÑÎ̤ÎÄ´À°Ãæ¤Ë¡¢UDP ¥½¥±¥Ã¥È¤¬»ÈÍѤǤ­¤ëÁ÷¿®¥Ð¥Ã¥Õ¥¡¤ÎºÇ¾®ÃÍ
319 (¥Ð¥¤¥Èñ°Ì)¡£
320 UDP ¤ÎÁ´¥½¥±¥Ã¥È¤Î¥Ú¡¼¥¸»ÈÍÑÎ̤ιç·×¤¬
321 .I udp_mem
322 pressure ¤òĶ²á¤·¤Æ¤¤¤ë¾ì¹ç¤Ç¤¢¤Ã¤Æ¤â¡¢
323 ³Æ UDP ¥½¥±¥Ã¥È¤Ï¥Ç¡¼¥¿¤ÎÁ÷¿®¤Ë¤³¤Î¥µ¥¤¥ºÊ¬¤À¤±¤Ï»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
324 .\"O \"O .SS "Socket Options"
325 .SS ¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó
326 .\"O To set or get a UDP socket option, call
327 .\"O .BR getsockopt (2)
328 .\"O to read or
329 .\"O .BR setsockopt (2)
330 .\"O to write the option with the option level argument set to
331 .\"O .BR IPPROTO_UDP .
332 UDP ¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤òÀßÄê¤Þ¤¿¤Ï¼èÆÀ¤¹¤ë¤Ë¤Ï¡¢
333 ¼èÆÀ¤Ë¤Ï
334 .BR getsockopt (2)
335 ¤ò¡¢ÀßÄê¤Ë¤Ï
336 .BR setsockopt (2)
337 ¤ò¥ª¥×¥·¥ç¥ó¥ì¥Ù¥ë°ú¿ô¤Ë
338 .B IPPROTO_UDP
339 ¤ò»ØÄꤷ¤Æ¸Æ¤Ó½Ð¤¹¡£
340 .TP
341 .\"O .BR UDP_CORK " (since Linux 2.5.44)"
342 .BR UDP_CORK " (Linux 2.5.44 °Ê¹ß)"
343 .\"O If this option is enabled, then all data output on this socket
344 .\"O is accumulated into a single datagram that is transmitted when
345 .\"O the option is disabled.
346 .\"O This option should not be used in code intended to be
347 .\"O portable.
348 ¤³¤Î¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤ë¤È¡¢¤³¤Î¥½¥±¥Ã¥È¤ÎÁ´¤Æ¤Î¥Ç¡¼¥¿½ÐÎϤÏ
349 °ì¤Ä¤Î¥Ç¡¼¥¿¥°¥é¥à¤ËÃßÀѤµ¤ì¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤¬Ìµ¸ú²½¤µ¤ì¤¿»þ¤Ë
350 Á÷¿®¤µ¤ì¤ë¡£
351 ¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï°Ü¿¢À­¤ò¹Íθ¤·¤¿¥³¡¼¥É¤Ç¤ÏÍѤ¤¤ë¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
352 .\" FIXME document UDP_ENCAP (new in kernel 2.5.67)
353 .\" From include/linux/udp.h:
354 .\" /* UDP encapsulation types */
355 .\" #define UDP_ENCAP_ESPINUDP_NON_IKE      1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
356 .\" #define UDP_ENCAP_ESPINUDP      2 /* draft-ietf-ipsec-udp-encaps-06 */
357 .\" #define UDP_ENCAP_L2TPINUDP     3 /* rfc2661 */
358 .\"O .SS Ioctls
359 .SS ioctl
360 .\"O These ioctls can be accessed using
361 .\"O .BR ioctl (2).
362 °Ê²¼¤Ë¼¨¤¹ ioctl ¤Ï
363 .BR ioctl (2)
364 ¤ò»È¤Ã¤Æ¥¢¥¯¥»¥¹¤Ç¤­¤ë¡£
365 .\"O The correct syntax is:
366 Àµ¤·¤¤Ê¸Ë¡¤Ï°Ê²¼¤ÎÄ̤ꡣ
367 .PP
368 .RS
369 .nf
370 .BI int " value";
371 .IB error " = ioctl(" udp_socket ", " ioctl_type ", &" value ");"
372 .fi
373 .RE
374 .TP
375 .BR FIONREAD " (" SIOCINQ )
376 .\"O Gets a pointer to an integer as argument.
377 .\"O Returns the size of the next pending datagram in the integer in bytes,
378 .\"O or 0 when no datagram is pending.
379 integer ¤Î¥Ý¥¤¥ó¥¿¤ò°ú¿ô¤È¤·¤Æ¼è¤ë¡£
380 ¼¡¤ËÂÔµ¡¤·¤Æ¤¤¤ë¥Ç¡¼¥¿¥°¥é¥à¤Î¥µ¥¤¥º¤ò¥Ð¥¤¥Èñ°Ì¤ÎÀ°¿ô¤ÇÊÖ¤¹¡£
381 ÂÔµ¡¤·¤Æ¤¤¤ë¥Ç¡¼¥¿¥°¥é¥à¤¬¤Ê¤¤¾ì¹ç¤Ï 0 ¤òÊÖ¤¹¡£
382 .TP
383 .BR TIOCOUTQ " (" SIOCOUTQ )
384 .\"O Returns the number of data bytes in the local send queue.
385 .\"O Only supported with Linux 2.4 and above.
386 ¥í¡¼¥«¥ëÁ÷¿®¥­¥å¡¼¤Ë¤¢¤ë¥Ç¡¼¥¿¥µ¥¤¥º¤ò¥Ð¥¤¥Èñ°Ì¤ÇÊÖ¤¹¡£
387 Linux 2.4 °Ê¾å¤Ç¤Î¤ßÂбþ¤·¤Æ¤¤¤ë¡£
388 .PP
389 .\"O In addition all ioctls documented in
390 .\"O .BR ip (7)
391 .\"O and
392 .\"O .BR socket (7)
393 .\"O are supported.
394 ¤µ¤é¤Ë¡¢
395 .BR ip (7)
396 ¤È
397 .BR socket (7)
398 ¤Ç½Ò¤Ù¤é¤ì¤Æ¤¤¤ëÁ´¤Æ¤Î ioctl ¤âÂбþ¤·¤Æ¤¤¤ë¡£
399 .\"O .SH ERRORS
400 .SH ¥¨¥é¡¼
401 .\"O All errors documented for
402 .\"O .BR socket (7)
403 .\"O or
404 .\"O .BR ip (7)
405 .\"O may be returned by a send or receive on a UDP socket.
406 .BR socket (7)
407 ¤ä
408 .BR ip (7)
409 ¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ëÁ´¤Æ¤Î¥¨¥é¡¼¤¬¡¢
410 UDP ¥½¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤ÇÊÖ¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
411 .TP
412 .B ECONNREFUSED
413 .\"O No receiver was associated with the destination address.
414 .\"O This might be caused by a previous packet sent over the socket.
415 ¹Ô¤­À襢¥É¥ì¥¹¤Ë´ØÏ¢¤Å¤±¤é¤ì¤Æ¤¤¤ë¼õ¿®¼Ô¤¬¤¤¤Ê¤¤¡£
416 ¤³¤ì¤Ï°ÊÁ°¤Î¥Ñ¥±¥Ã¥È¤¬¤½¤Î¥Ñ¥±¥Ã¥È¤ò
417 ¾å½ñ¤­Á÷¿®¤·¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¤«¤é¤Ç¤¢¤ë¤³¤È¤¬Â¿¤¤¡£
418 .\"O .SH VERSIONS
419 .SH ¥Ð¡¼¥¸¥ç¥ó
420 .\"O .B IP_RECVERR
421 .\"O is a new feature in Linux 2.2.
422 .B IP_RECVERR
423 ¤Ï Linux 2.2 ¤Î¿·¤·¤¤µ¡Ç½¤Ç¤¢¤ë¡£
424 .\"O .\" .SH CREDITS
425 .\" .SH Ãø¼Ô
426 .\"O .\" This man page was written by Andi Kleen.
427 .\" ¤³¤Î man ¥Ú¡¼¥¸¤Ï Andi Kleen ¤¬½ñ¤¤¤¿¡£
428 .\"O .SH SEE ALSO
429 .SH ´ØÏ¢¹àÌÜ
430 .BR ip (7),
431 .BR raw (7),
432 .BR socket (7),
433 .BR udplite (7)
434
435 .\"O RFC\ 768 for the User Datagram Protocol.
436 RFC\ 768 : User Datagram Protocol
437 .br
438 .\"O RFC\ 1122 for the host requirements.
439 RFC\ 1122 : ¥Û¥¹¥È¤ÎɬÍ×¾ò·ï
440 .br
441 .\"O RFC\ 1191 for a description of path MTU discovery.
442 RFC\ 1191 : path MTU discovery ¤Îµ­½Ò