OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.39.
[linuxjm/LDP_man-pages.git] / po4a / socket / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2012-04-25 05:36+0900\n"
10 "PO-Revision-Date: 2012-04-24 16:28+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/accept.2:39
20 #, no-wrap
21 msgid "ACCEPT"
22 msgstr "ACCEPT"
23
24 #. type: TH
25 #: build/C/man2/accept.2:39
26 #, no-wrap
27 msgid "2010-09-10"
28 msgstr "2010-09-10"
29
30 #. type: TH
31 #: build/C/man2/accept.2:39 build/C/man2/bind.2:66 build/C/man2/connect.2:65
32 #: build/C/man2/getsockname.2:38 build/C/man2/getsockopt.2:42
33 #: build/C/man2/listen.2:43 build/C/man2/recv.2:39 build/C/man2/recvmmsg.2:26
34 #: build/C/man2/select.2:38 build/C/man2/select_tut.2:30
35 #: build/C/man2/send.2:38 build/C/man2/sendmmsg.2:28
36 #: build/C/man3/sockatmark.3:23 build/C/man2/socket.2:41
37 #: build/C/man7/socket.7:26 build/C/man2/socketcall.2:26
38 #: build/C/man2/socketpair.2:40
39 #, no-wrap
40 msgid "Linux"
41 msgstr "Linux"
42
43 #. type: TH
44 #: build/C/man2/accept.2:39 build/C/man2/bind.2:66
45 #: build/C/man3/bindresvport.3:27 build/C/man2/connect.2:65
46 #: build/C/man3/getifaddrs.3:33 build/C/man2/getsockname.2:38
47 #: build/C/man2/getsockopt.2:42 build/C/man2/listen.2:43
48 #: build/C/man2/recv.2:39 build/C/man2/recvmmsg.2:26 build/C/man2/select.2:38
49 #: build/C/man2/select_tut.2:30 build/C/man2/send.2:38
50 #: build/C/man2/sendmmsg.2:28 build/C/man3/sockatmark.3:23
51 #: build/C/man2/socket.2:41 build/C/man7/socket.7:26
52 #: build/C/man2/socketcall.2:26 build/C/man2/socketpair.2:40
53 #, no-wrap
54 msgid "Linux Programmer's Manual"
55 msgstr "Linux Programmer's Manual"
56
57 #. type: SH
58 #: build/C/man2/accept.2:40 build/C/man2/bind.2:67
59 #: build/C/man3/bindresvport.3:28 build/C/man2/connect.2:66
60 #: build/C/man3/getifaddrs.3:34 build/C/man2/getsockname.2:39
61 #: build/C/man2/getsockopt.2:43 build/C/man2/listen.2:44
62 #: build/C/man2/recv.2:40 build/C/man2/recvmmsg.2:27 build/C/man2/select.2:39
63 #: build/C/man2/select_tut.2:31 build/C/man2/send.2:39
64 #: build/C/man2/sendmmsg.2:29 build/C/man3/sockatmark.3:24
65 #: build/C/man2/socket.2:42 build/C/man7/socket.7:27
66 #: build/C/man2/socketcall.2:27 build/C/man2/socketpair.2:41
67 #, no-wrap
68 msgid "NAME"
69 msgstr "名前"
70
71 #. type: Plain text
72 #: build/C/man2/accept.2:42
73 msgid "accept - accept a connection on a socket"
74 msgstr "accept - ソケットへの接続を受ける"
75
76 #. type: SH
77 #: build/C/man2/accept.2:42 build/C/man2/bind.2:69
78 #: build/C/man3/bindresvport.3:30 build/C/man2/connect.2:68
79 #: build/C/man3/getifaddrs.3:36 build/C/man2/getsockname.2:41
80 #: build/C/man2/getsockopt.2:45 build/C/man2/listen.2:46
81 #: build/C/man2/recv.2:42 build/C/man2/recvmmsg.2:29 build/C/man2/select.2:42
82 #: build/C/man2/select_tut.2:34 build/C/man2/send.2:41
83 #: build/C/man2/sendmmsg.2:31 build/C/man3/sockatmark.3:26
84 #: build/C/man2/socket.2:44 build/C/man7/socket.7:29
85 #: build/C/man2/socketcall.2:29 build/C/man2/socketpair.2:43
86 #, no-wrap
87 msgid "SYNOPSIS"
88 msgstr "書式"
89
90 #. type: Plain text
91 #: build/C/man2/accept.2:46 build/C/man2/bind.2:73
92 #, no-wrap
93 msgid ""
94 "B<#include E<lt>sys/types.hE<gt>>          /* See NOTES */\n"
95 "B<#include E<lt>sys/socket.hE<gt>>\n"
96 msgstr ""
97 "B<#include E<lt>sys/types.hE<gt>>          /* 「注意」参照 */\n"
98 "B<#include E<lt>sys/socket.hE<gt>>\n"
99
100 #. type: Plain text
101 #: build/C/man2/accept.2:48
102 #, no-wrap
103 msgid "B<int accept(int >I<sockfd>B<, struct sockaddr *>I<addr>B<, socklen_t *>I<addrlen>B<);>\n"
104 msgstr "B<int accept(int >I<sockfd>B<, struct sockaddr *>I<addr>B<, socklen_t *>I<addrlen>B<);>\n"
105
106 #. type: Plain text
107 #: build/C/man2/accept.2:51
108 #, no-wrap
109 msgid ""
110 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
111 "B<#include E<lt>sys/socket.hE<gt>>\n"
112 msgstr ""
113 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
114 "B<#include E<lt>sys/socket.hE<gt>>\n"
115
116 #. type: Plain text
117 #: build/C/man2/accept.2:54
118 #, no-wrap
119 msgid ""
120 "B<int accept4(int >I<sockfd>B<, struct sockaddr *>I<addr>B<,>\n"
121 "B<            socklen_t *>I<addrlen>B<, int >I<flags>B<);>\n"
122 msgstr ""
123 "B<int accept4(int >I<sockfd>B<, struct sockaddr *>I<addr>B<,>\n"
124 "B<            socklen_t *>I<addrlen>B<, int >I<flags>B<);>\n"
125
126 #. type: SH
127 #: build/C/man2/accept.2:55 build/C/man2/bind.2:77
128 #: build/C/man3/bindresvport.3:37 build/C/man2/connect.2:77
129 #: build/C/man3/getifaddrs.3:45 build/C/man2/getsockname.2:48
130 #: build/C/man2/getsockopt.2:56 build/C/man2/listen.2:54
131 #: build/C/man2/recv.2:57 build/C/man2/recvmmsg.2:39 build/C/man2/select.2:81
132 #: build/C/man2/select_tut.2:73 build/C/man2/send.2:56
133 #: build/C/man2/sendmmsg.2:40 build/C/man3/sockatmark.3:40
134 #: build/C/man2/socket.2:50 build/C/man7/socket.7:33
135 #: build/C/man2/socketcall.2:31 build/C/man2/socketpair.2:50
136 #, no-wrap
137 msgid "DESCRIPTION"
138 msgstr "説明"
139
140 #. type: Plain text
141 #: build/C/man2/accept.2:70
142 msgid ""
143 "The B<accept>()  system call is used with connection-based socket types "
144 "(B<SOCK_STREAM>, B<SOCK_SEQPACKET>).  It extracts the first connection "
145 "request on the queue of pending connections for the listening socket, "
146 "I<sockfd>, creates a new connected socket, and returns a new file descriptor "
147 "referring to that socket.  The newly created socket is not in the listening "
148 "state.  The original socket I<sockfd> is unaffected by this call."
149 msgstr ""
150 "B<accept>()  システムコールは、接続指向のソケット型 (B<SOCK_STREAM>, "
151 "B<SOCK_SEQPACKET>)  で用いられる。 この関数は、接続待ちソケット I<socket> 宛"
152 "ての保留状態の接続要求が入っているキューから 先頭の接続要求を取り出し、接続済"
153 "みソケットを新規に生成し、 そのソケットを参照する新しいファイル・ディスクリプ"
154 "タを返す。 新規に生成されたソケットは、接続待ち (listen) 状態ではない。 もと"
155 "もとのソケット I<sockfd> はこの呼び出しによって影響を受けない。"
156
157 #. type: Plain text
158 #: build/C/man2/accept.2:79
159 msgid ""
160 "The argument I<sockfd> is a socket that has been created with B<socket>(2), "
161 "bound to a local address with B<bind>(2), and is listening for connections "
162 "after a B<listen>(2)."
163 msgstr ""
164 "引き数 I<sockfd> は、 B<socket>(2)  によって生成され、 B<bind>(2)  によって"
165 "ローカルアドレスにバインドされ、 B<listen>(2)  を経て接続を待っているソケット"
166 "である。"
167
168 #. type: Plain text
169 #: build/C/man2/accept.2:97
170 msgid ""
171 "The argument I<addr> is a pointer to a I<sockaddr> structure.  This "
172 "structure is filled in with the address of the peer socket, as known to the "
173 "communications layer.  The exact format of the address returned I<addr> is "
174 "determined by the socket's address family (see B<socket>(2)  and the "
175 "respective protocol man pages).  When I<addr> is NULL, nothing is filled in; "
176 "in this case, I<addrlen> is not used, and should also be NULL."
177 msgstr ""
178 "I<addr> 引き数は I<sockaddr> 構造体へのポインタである。 この構造体には接続相"
179 "手のソケットのアドレスが入っている。 I<addr> 引き数で返されるアドレスの正確な"
180 "フォーマットは、 ソケットのアドレス種別によって変わる (B<socket>(2)  およびそ"
181 "れぞれのプロトコルの man ページを参照)。 I<addr> が NULL の場合、 I<addr> に"
182 "は何も入らない。この場合、 I<addrlen> は使用されず、この引き数は NULL にして"
183 "おくべきである。"
184
185 #. type: Plain text
186 #: build/C/man2/accept.2:105
187 msgid ""
188 "The I<addrlen> argument is a value-result argument: the caller must "
189 "initialize it to contain the size (in bytes) of the structure pointed to by "
190 "I<addr>; on return it will contain the actual size of the peer address."
191 msgstr ""
192 "I<addrlen> 引き数は入出力両用の引き数である。呼び出し時には、呼び出し元が "
193 "I<addr> が指す構造体のサイズ (バイト単位) で初期化しておかなければならない。 "
194 "返ってくる時には、接続相手のアドレスの実際の大きさが格納される。"
195
196 #. type: Plain text
197 #: build/C/man2/accept.2:110 build/C/man2/getsockname.2:65
198 msgid ""
199 "The returned address is truncated if the buffer provided is too small; in "
200 "this case, I<addrlen> will return a value greater than was supplied to the "
201 "call."
202 msgstr ""
203 "渡されたバッファが小さ過ぎた場合は、返されるアドレスの末尾が切り詰められ"
204 "る。\n"
205 "この場合には、 I<addrlen> には、呼び出し時に指定された値よりも大きな値が格納"
206 "される。"
207
208 #. type: Plain text
209 #: build/C/man2/accept.2:123
210 msgid ""
211 "If no pending connections are present on the queue, and the socket is not "
212 "marked as nonblocking, B<accept>()  blocks the caller until a connection is "
213 "present.  If the socket is marked nonblocking and no pending connections are "
214 "present on the queue, B<accept>()  fails with the error B<EAGAIN> or "
215 "B<EWOULDBLOCK>."
216 msgstr ""
217 "キューに保留となっている接続要求がなく、 かつソケットが非停止になっていないと"
218 "きは、 B<accept>()  は接続が発生するまで呼び出し元を停止 (block) する。 ソ"
219 "ケットが非停止になっていて、 待ち状態の接続要求がキューに無いときは、 "
220 "B<accept>()  はエラー B<EAGAIN> か B<EWOULDBLOCK> で失敗する。"
221
222 #. type: Plain text
223 #: build/C/man2/accept.2:137
224 msgid ""
225 "In order to be notified of incoming connections on a socket, you can use "
226 "B<select>(2)  or B<poll>(2).  A readable event will be delivered when a new "
227 "connection is attempted and you may then call B<accept>()  to get a socket "
228 "for that connection.  Alternatively, you can set the socket to deliver "
229 "B<SIGIO> when activity occurs on a socket; see B<socket>(7)  for details."
230 msgstr ""
231 "ソケットへの接続到着を知るには、 B<select>(2)  または B<poll>(2)  を用いれば"
232 "よい。 新しい接続要求が来るとソケットは読み込み可能になるので、 そうしたら "
233 "B<accept>()  を呼んでその接続に対するソケットを取得すればよい。 あるいはソ"
234 "ケットに設定を行い、何らかのアクションがあったときに B<SIGIO> を配送 "
235 "(deliver) させるようにすることもできる。詳細は B<socket>(7)  を参照のこと。"
236
237 #. type: Plain text
238 #: build/C/man2/accept.2:150
239 msgid ""
240 "For certain protocols which require an explicit confirmation, such as "
241 "DECNet, B<accept>()  can be thought of as merely dequeuing the next "
242 "connection request and not implying confirmation.  Confirmation can be "
243 "implied by a normal read or write on the new file descriptor, and rejection "
244 "can be implied by closing the new socket.  Currently only DECNet has these "
245 "semantics on Linux."
246 msgstr ""
247 "明示的な接続確認 (confirmation) を必要とするようなプロトコル (DECNet など) で"
248 "は、 B<accept>()  は単に次の接続要求をキューから取り出すだけであり、 接続確認"
249 "は行わないことに注意せよ。接続確認は、 新しいファイル・ディスクリプタに対す"
250 "る 通常の読み取り/書き込みによってなされ、接続拒否 (rejection)  は新しいソ"
251 "ケットをクローズすることによってなされる。 現在のところ、 Linux 上でこれらの"
252 "セマンティクスを持つのは DECNet だけである。"
253
254 #. type: Plain text
255 #: build/C/man2/accept.2:160
256 msgid ""
257 "If I<flags> is 0, then B<accept4>()  is the same as B<accept>().  The "
258 "following values can be bitwise ORed in I<flags> to obtain different "
259 "behavior:"
260 msgstr ""
261 "I<flags> が 0 の場合、 B<accept4>()  は B<accept>()  と同じである。 I<flags> "
262 "に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることが"
263 "できる。"
264
265 #. type: TP
266 #: build/C/man2/accept.2:160 build/C/man2/socket.2:162
267 #, no-wrap
268 msgid "B<SOCK_NONBLOCK>"
269 msgstr "B<SOCK_NONBLOCK>"
270
271 #. type: Plain text
272 #: build/C/man2/accept.2:168 build/C/man2/socket.2:170
273 msgid ""
274 "Set the B<O_NONBLOCK> file status flag on the new open file description.  "
275 "Using this flag saves extra calls to B<fcntl>(2)  to achieve the same result."
276 msgstr ""
277 "新しく生成されるオープンファイル記述 (open file description) の "
278 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
279 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
280 "なる。"
281
282 #. type: TP
283 #: build/C/man2/accept.2:168 build/C/man2/socket.2:170
284 #, no-wrap
285 msgid "B<SOCK_CLOEXEC>"
286 msgstr "B<SOCK_CLOEXEC>"
287
288 #. type: Plain text
289 #: build/C/man2/accept.2:178 build/C/man2/socket.2:180
290 msgid ""
291 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
292 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
293 "may be useful."
294 msgstr ""
295 "新しいファイルディスクリプタに対して close-on-exec (B<FD_CLOEXEC>)  フラグを"
296 "セットする。 このフラグが役に立つ理由については、 B<open>(2)  の "
297 "B<O_CLOEXEC> フラグの説明を参照のこと。"
298
299 #. type: SH
300 #: build/C/man2/accept.2:178 build/C/man2/bind.2:150
301 #: build/C/man3/bindresvport.3:64 build/C/man2/connect.2:125
302 #: build/C/man3/getifaddrs.3:137 build/C/man2/getsockname.2:65
303 #: build/C/man2/getsockopt.2:129 build/C/man2/listen.2:80
304 #: build/C/man2/recv.2:386 build/C/man2/recvmmsg.2:141
305 #: build/C/man2/select.2:285 build/C/man2/select_tut.2:483
306 #: build/C/man2/send.2:273 build/C/man2/sendmmsg.2:119
307 #: build/C/man3/sockatmark.3:49 build/C/man2/socket.2:312
308 #: build/C/man2/socketpair.2:67
309 #, no-wrap
310 msgid "RETURN VALUE"
311 msgstr "返り値"
312
313 #. type: Plain text
314 #: build/C/man2/accept.2:185
315 msgid ""
316 "On success, these system calls return a nonnegative integer that is a "
317 "descriptor for the accepted socket.  On error, -1 is returned, and I<errno> "
318 "is set appropriately."
319 msgstr ""
320 "成功した場合、これらのシステムコールは 受け付けたソケットのディスクリプタであ"
321 "る非負の整数値を返す。 エラーが発生した場合は -1 を返し、 I<errno> を適切に設"
322 "定する。"
323
324 #. type: SS
325 #: build/C/man2/accept.2:185
326 #, no-wrap
327 msgid "Error Handling"
328 msgstr "エラー処理"
329
330 #. type: Plain text
331 #: build/C/man2/accept.2:212
332 msgid ""
333 "Linux B<accept>()  (and B<accept4>())  passes already-pending network errors "
334 "on the new socket as an error code from B<accept>().  This behavior differs "
335 "from other BSD socket implementations.  For reliable operation the "
336 "application should detect the network errors defined for the protocol after "
337 "B<accept>()  and treat them like B<EAGAIN> by retrying.  In case of TCP/IP "
338 "these are B<ENETDOWN>, B<EPROTO>, B<ENOPROTOOPT>, B<EHOSTDOWN>, B<ENONET>, "
339 "B<EHOSTUNREACH>, B<EOPNOTSUPP>, and B<ENETUNREACH>."
340 msgstr ""
341 "Linux の B<accept>()  (と B<accept4>())  は、新しいソケットにおける、発生済み"
342 "のネットワークエラーを B<accept>()  からのエラーコードとして渡す。 この振舞い"
343 "は BSD ソケットの実装とは異なる。 信頼性の高い動作を行うためには、 アプリケー"
344 "ションはプロトコルで定義されているネットワークエラーの検知を B<accept>()  の"
345 "あとに行い、それらのエラーを B<EAGAIN> と同じように扱い、再試行 (retry) を行"
346 "うべきである。 TCP/IP では、以下のエラーが該当する: B<ENETDOWN>, B<EPROTO>, "
347 "B<ENOPROTOOPT>, B<EHOSTDOWN>, B<ENONET>, B<EHOSTUNREACH>, B<EOPNOTSUPP>, "
348 "B<ENETUNREACH>"
349
350 #. type: SH
351 #: build/C/man2/accept.2:212 build/C/man2/bind.2:155
352 #: build/C/man3/bindresvport.3:69 build/C/man2/connect.2:130
353 #: build/C/man3/getifaddrs.3:144 build/C/man2/getsockname.2:70
354 #: build/C/man2/getsockopt.2:134 build/C/man2/listen.2:85
355 #: build/C/man2/recv.2:391 build/C/man2/recvmmsg.2:149
356 #: build/C/man2/select.2:302 build/C/man2/send.2:278
357 #: build/C/man2/sendmmsg.2:133 build/C/man3/sockatmark.3:54
358 #: build/C/man2/socket.2:317 build/C/man2/socketpair.2:72
359 #, no-wrap
360 msgid "ERRORS"
361 msgstr "エラー"
362
363 #. type: TP
364 #: build/C/man2/accept.2:213 build/C/man2/recv.2:396 build/C/man2/send.2:291
365 #, no-wrap
366 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
367 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
368
369 #.  Actually EAGAIN on Linux
370 #. type: Plain text
371 #: build/C/man2/accept.2:221
372 msgid ""
373 "The socket is marked nonblocking and no connections are present to be "
374 "accepted.  POSIX.1-2001 allows either error to be returned for this case, "
375 "and does not require these constants to have the same value, so a portable "
376 "application should check for both possibilities."
377 msgstr ""
378 "ソケットが非停止になっていて、 かつ受付け対象の接続が存在しない。 "
379 "POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これら 2 つ"
380 "の定数が同じ値を持つことも求めていない。 したがって、移植性が必要なアプリケー"
381 "ションでは、両方の可能性を 確認すべきである。"
382
383 #. type: TP
384 #: build/C/man2/accept.2:221 build/C/man2/bind.2:163
385 #: build/C/man2/connect.2:167 build/C/man2/getsockname.2:71
386 #: build/C/man2/getsockopt.2:135 build/C/man2/listen.2:89
387 #: build/C/man2/recv.2:405 build/C/man2/select.2:303 build/C/man2/send.2:299
388 #: build/C/man3/sockatmark.3:55
389 #, no-wrap
390 msgid "B<EBADF>"
391 msgstr "B<EBADF>"
392
393 #. type: Plain text
394 #: build/C/man2/accept.2:224
395 msgid "The descriptor is invalid."
396 msgstr "ディスクリプタが不正。"
397
398 #. type: TP
399 #: build/C/man2/accept.2:224
400 #, no-wrap
401 msgid "B<ECONNABORTED>"
402 msgstr "B<ECONNABORTED>"
403
404 #. type: Plain text
405 #: build/C/man2/accept.2:227
406 msgid "A connection has been aborted."
407 msgstr "接続が中止された。"
408
409 #. type: TP
410 #: build/C/man2/accept.2:227 build/C/man2/bind.2:189
411 #: build/C/man2/connect.2:173 build/C/man2/getsockname.2:76
412 #: build/C/man2/getsockopt.2:140 build/C/man2/recv.2:414
413 #: build/C/man2/send.2:308 build/C/man2/socketpair.2:76
414 #, no-wrap
415 msgid "B<EFAULT>"
416 msgstr "B<EFAULT>"
417
418 #. type: Plain text
419 #: build/C/man2/accept.2:232
420 msgid ""
421 "The I<addr> argument is not in a writable part of the user address space."
422 msgstr "I<addr> 引き数がユーザアドレス空間の書き込み可能領域にない。"
423
424 #. type: TP
425 #: build/C/man2/accept.2:232 build/C/man2/connect.2:201
426 #: build/C/man2/recv.2:418 build/C/man2/select.2:308 build/C/man2/send.2:311
427 #, no-wrap
428 msgid "B<EINTR>"
429 msgstr "B<EINTR>"
430
431 #. type: Plain text
432 #: build/C/man2/accept.2:237
433 msgid ""
434 "The system call was interrupted by a signal that was caught before a valid "
435 "connection arrived; see B<signal>(7)."
436 msgstr ""
437 "有効な接続が到着する前に捕捉されたシグナルによって システムコールが中断され"
438 "た。 B<signal>(7)  参照。"
439
440 #. type: TP
441 #: build/C/man2/accept.2:237 build/C/man2/accept.2:242 build/C/man2/bind.2:167
442 #: build/C/man2/bind.2:193 build/C/man2/getsockname.2:82
443 #: build/C/man2/getsockopt.2:150 build/C/man2/recv.2:423
444 #: build/C/man2/recvmmsg.2:153 build/C/man2/select.2:312
445 #: build/C/man2/send.2:315 build/C/man3/sockatmark.3:59
446 #: build/C/man2/socket.2:325 build/C/man2/socket.2:328
447 #, no-wrap
448 msgid "B<EINVAL>"
449 msgstr "B<EINVAL>"
450
451 #. type: Plain text
452 #: build/C/man2/accept.2:242
453 msgid ""
454 "Socket is not listening for connections, or I<addrlen> is invalid (e.g., is "
455 "negative)."
456 msgstr ""
457 "ソケットが接続待ち状態ではない。もしくは、 I<addrlen> が不正である (例えば、"
458 "負の場合など)。"
459
460 #. type: Plain text
461 #: build/C/man2/accept.2:247
462 msgid "(B<accept4>())  invalid value in I<flags>."
463 msgstr "(B<accept4>())  I<flags> に不正な値が指定されている。"
464
465 #. type: TP
466 #: build/C/man2/accept.2:247 build/C/man2/socket.2:333
467 #: build/C/man2/socketpair.2:81
468 #, no-wrap
469 msgid "B<EMFILE>"
470 msgstr "B<EMFILE>"
471
472 #. type: Plain text
473 #: build/C/man2/accept.2:250
474 msgid "The per-process limit of open file descriptors has been reached."
475 msgstr "1プロセスがオープンできるファイル・ディスクリプタ数の上限に達した。"
476
477 #. type: TP
478 #: build/C/man2/accept.2:250 build/C/man2/socket.2:336
479 #: build/C/man2/socketpair.2:84
480 #, no-wrap
481 msgid "B<ENFILE>"
482 msgstr "B<ENFILE>"
483
484 #. type: Plain text
485 #: build/C/man2/accept.2:253 build/C/man2/socket.2:339
486 #: build/C/man2/socketpair.2:87
487 msgid "The system limit on the total number of open files has been reached."
488 msgstr "オープンされたファイルの総数がシステム全体の上限に達していた。"
489
490 #. type: TP
491 #: build/C/man2/accept.2:253
492 #, no-wrap
493 msgid "B<ENOBUFS>, B<ENOMEM>"
494 msgstr "B<ENOBUFS>, B<ENOMEM>"
495
496 #. type: Plain text
497 #: build/C/man2/accept.2:258
498 msgid ""
499 "Not enough free memory.  This often means that the memory allocation is "
500 "limited by the socket buffer limits, not by the system memory."
501 msgstr ""
502 "メモリが足りない。 多くの場合は、システムメモリが足りないわけではなく、 ソ"
503 "ケットバッファの大きさによるメモリ割り当ての制限である。"
504
505 #. type: TP
506 #: build/C/man2/accept.2:258 build/C/man2/bind.2:172
507 #: build/C/man2/connect.2:213 build/C/man2/getsockname.2:90
508 #: build/C/man2/getsockopt.2:164 build/C/man2/listen.2:94
509 #: build/C/man2/recv.2:438 build/C/man2/send.2:344
510 #, no-wrap
511 msgid "B<ENOTSOCK>"
512 msgstr "B<ENOTSOCK>"
513
514 #. type: Plain text
515 #: build/C/man2/accept.2:261
516 msgid "The descriptor references a file, not a socket."
517 msgstr "ディスクリプタはソケットではなくファイルを参照している。"
518
519 #. type: TP
520 #: build/C/man2/accept.2:261 build/C/man2/listen.2:99 build/C/man2/send.2:349
521 #: build/C/man2/socketpair.2:87
522 #, no-wrap
523 msgid "B<EOPNOTSUPP>"
524 msgstr "B<EOPNOTSUPP>"
525
526 #. type: Plain text
527 #: build/C/man2/accept.2:265
528 msgid "The referenced socket is not of type B<SOCK_STREAM>."
529 msgstr "参照しているソケットの型が B<SOCK_STREAM> でない。"
530
531 #. type: TP
532 #: build/C/man2/accept.2:265
533 #, no-wrap
534 msgid "B<EPROTO>"
535 msgstr "B<EPROTO>"
536
537 #. type: Plain text
538 #: build/C/man2/accept.2:268
539 msgid "Protocol error."
540 msgstr "プロトコル・エラー。"
541
542 #. type: Plain text
543 #: build/C/man2/accept.2:272
544 msgid "In addition, Linux B<accept>()  may fail if:"
545 msgstr "上記に加えて、Linux の B<accept>()  は以下のエラーで失敗する:"
546
547 #. type: TP
548 #: build/C/man2/accept.2:272
549 #, no-wrap
550 msgid "B<EPERM>"
551 msgstr "B<EPERM>"
552
553 #. type: Plain text
554 #: build/C/man2/accept.2:275
555 msgid "Firewall rules forbid connection."
556 msgstr "ファイアウォールのルールにより接続が禁止された。"
557
558 #. type: Plain text
559 #: build/C/man2/accept.2:287
560 msgid ""
561 "In addition, network errors for the new socket and as defined for the "
562 "protocol may be returned.  Various Linux kernels can return other errors "
563 "such as B<ENOSR>, B<ESOCKTNOSUPPORT>, B<EPROTONOSUPPORT>, B<ETIMEDOUT>.  The "
564 "value B<ERESTARTSYS> may be seen during a trace."
565 msgstr ""
566 "この他に、新しいソケットに対するネットワークエラーが返されることもある。 これ"
567 "らはそれぞれのプロトコルで定義されている。 いろいろな Linux カーネルでは、 以"
568 "下に示すようなエラーを返すこともある。 B<ENOSR>, B<ESOCKTNOSUPPORT>, "
569 "B<EPROTONOSUPPORT>, B<ETIMEDOUT>.  B<ERESTARTSYS> がトレースの最中に現れるこ"
570 "ともある。"
571
572 #. type: SH
573 #: build/C/man2/accept.2:287 build/C/man3/getifaddrs.3:157
574 #: build/C/man2/recvmmsg.2:157 build/C/man2/select.2:321
575 #: build/C/man2/sendmmsg.2:145 build/C/man3/sockatmark.3:66
576 #: build/C/man7/socket.7:697
577 #, no-wrap
578 msgid "VERSIONS"
579 msgstr "バージョン"
580
581 #. type: Plain text
582 #: build/C/man2/accept.2:292
583 msgid ""
584 "The B<accept4>()  system call is available starting with Linux 2.6.28; "
585 "support in glibc is available starting with version 2.10."
586 msgstr ""
587 "B<accept4>()  システムコールは Linux 2.6.28 以降で利用可能である。 glibc での"
588 "サポートはバージョン 2.10 以降で利用可能である。"
589
590 #. type: SH
591 #: build/C/man2/accept.2:292 build/C/man2/bind.2:220
592 #: build/C/man3/bindresvport.3:89 build/C/man2/connect.2:223
593 #: build/C/man3/getifaddrs.3:165 build/C/man2/getsockname.2:95
594 #: build/C/man2/getsockopt.2:169 build/C/man2/listen.2:104
595 #: build/C/man2/recv.2:443 build/C/man2/recvmmsg.2:162
596 #: build/C/man2/select.2:327 build/C/man2/send.2:363
597 #: build/C/man2/sendmmsg.2:150 build/C/man3/sockatmark.3:69
598 #: build/C/man2/socket.2:350 build/C/man2/socketcall.2:43
599 #: build/C/man2/socketpair.2:93
600 #, no-wrap
601 msgid "CONFORMING TO"
602 msgstr "準拠"
603
604 #.  The BSD man page documents five possible error returns
605 #.  (EBADF, ENOTSOCK, EOPNOTSUPP, EWOULDBLOCK, EFAULT).
606 #.  POSIX.1-2001 documents errors
607 #.  EAGAIN, EBADF, ECONNABORTED, EINTR, EINVAL, EMFILE,
608 #.  ENFILE, ENOBUFS, ENOMEM, ENOTSOCK, EOPNOTSUPP, EPROTO, EWOULDBLOCK.
609 #.  In addition, SUSv2 documents EFAULT and ENOSR.
610 #. type: Plain text
611 #: build/C/man2/accept.2:304
612 msgid ""
613 "B<accept>(): POSIX.1-2001, SVr4, 4.4BSD, (B<accept>()  first appeared in "
614 "4.2BSD)."
615 msgstr ""
616 "B<accept>(): POSIX.1-2001, SVr4, 4.4BSD, (B<accept>()  は 4.2BSD で初めて実装"
617 "された)."
618
619 #. type: Plain text
620 #: build/C/man2/accept.2:307
621 msgid "B<accept4>()  is a nonstandard Linux extension."
622 msgstr "B<accept4>()  は非標準の Linux による拡張である。"
623
624 #.  Some testing seems to show that Tru64 5.1 and HP-UX 11 also
625 #.  do not inherit file status flags -- MTK Jun 05
626 #. type: Plain text
627 #: build/C/man2/accept.2:322
628 msgid ""
629 "On Linux, the new socket returned by B<accept>()  does I<not> inherit file "
630 "status flags such as B<O_NONBLOCK> and B<O_ASYNC> from the listening "
631 "socket.  This behavior differs from the canonical BSD sockets "
632 "implementation.  Portable programs should not rely on inheritance or "
633 "noninheritance of file status flags and always explicitly set all required "
634 "flags on the socket returned from B<accept>()."
635 msgstr ""
636 "Linux では、 B<accept>()  が返す新しいソケットは listen を行っているソケット"
637 "の ファイル状態フラグ (B<O_NONBLOCK> や B<O_ASYNC> など) を継承「しない」。 "
638 "この動作は標準的な BSD ソケットの実装とは異なっている。 移植性を考慮したプロ"
639 "グラムではファイル状態フラグが継承されるかどうかは 前提にせず、常に B<accept>"
640 "()  が返したソケットに対して全ての必要なフラグを明示的に設定するように すべき"
641 "である。"
642
643 #. type: SH
644 #: build/C/man2/accept.2:322 build/C/man2/bind.2:232
645 #: build/C/man3/bindresvport.3:92 build/C/man2/connect.2:239
646 #: build/C/man3/getifaddrs.3:185 build/C/man2/getsockname.2:101
647 #: build/C/man2/getsockopt.2:176 build/C/man2/listen.2:109
648 #: build/C/man2/recv.2:453 build/C/man2/select.2:342
649 #: build/C/man2/select_tut.2:501 build/C/man2/send.2:377
650 #: build/C/man2/sendmmsg.2:153 build/C/man3/sockatmark.3:71
651 #: build/C/man2/socket.2:364 build/C/man7/socket.7:711
652 #: build/C/man2/socketcall.2:46 build/C/man2/socketpair.2:101
653 #, no-wrap
654 msgid "NOTES"
655 msgstr "注意"
656
657 #. type: Plain text
658 #: build/C/man2/accept.2:328 build/C/man2/bind.2:238
659 #: build/C/man2/connect.2:245 build/C/man2/getsockopt.2:182
660 #: build/C/man2/listen.2:135 build/C/man2/socket.2:370
661 #: build/C/man2/socketpair.2:122
662 msgid ""
663 "POSIX.1-2001 does not require the inclusion of I<E<lt>sys/types.hE<gt>>, and "
664 "this header file is not required on Linux.  However, some historical (BSD) "
665 "implementations required this header file, and portable applications are "
666 "probably wise to include it."
667 msgstr ""
668 "POSIX.1-2001 では I<E<lt>sys/types.hE<gt>> のインクルードは必須とされておら"
669 "ず、 Linux ではこのヘッダファイルは必要ではない。 しかし、歴史的には、いくつ"
670 "かの実装 (BSD 系) でこのヘッダファイルが 必要であり、移植性が必要なアプリケー"
671 "ションではこのファイルを インクルードするのが賢明であろう。"
672
673 #. type: Plain text
674 #: build/C/man2/accept.2:349
675 msgid ""
676 "There may not always be a connection waiting after a B<SIGIO> is delivered "
677 "or B<select>(2)  or B<poll>(2)  return a readability event because the "
678 "connection might have been removed by an asynchronous network error or "
679 "another thread before B<accept>()  is called.  If this happens then the call "
680 "will block waiting for the next connection to arrive.  To ensure that "
681 "B<accept>()  never blocks, the passed socket I<sockfd> needs to have the "
682 "B<O_NONBLOCK> flag set (see B<socket>(7))."
683 msgstr ""
684 "B<SIGIO> が届けられた後や、 B<select>(2)  または B<poll>(2)  が読み込み可能イ"
685 "ベントを返した後に、 必ずしも待機中の接続があるとは限らない。 なぜならその接"
686 "続は、 B<accept>()  が呼ばれる前に、非同期的なネットワークエラーや 他のスレッ"
687 "ドから呼ばれた (別の) accept によって 削除されているかもしれないからである。 "
688 "この場合、その B<accept>()  呼び出しは停止 (block) し、次の接続の到着を待ちつ"
689 "づける。 B<accept>()  に停止を行わせないようにするには、引き数に渡すソケット "
690 "I<sockfd> に B<O_NONBLOCK> フラグをセットしておく必要がある (B<socket>(7)  を"
691 "見よ)。"
692
693 #. type: SS
694 #: build/C/man2/accept.2:349
695 #, no-wrap
696 msgid "The socklen_t type"
697 msgstr "socklen_t 型"
698
699 #. type: Plain text
700 #: build/C/man2/accept.2:359
701 msgid ""
702 "The third argument of B<accept>()  was originally declared as an I<int *> "
703 "(and is that under libc4 and libc5 and on many other systems like 4.x BSD, "
704 "SunOS 4, SGI); a POSIX.1g draft standard wanted to change it into a I<size_t "
705 "*>, and that is what it is for SunOS 5.  Later POSIX drafts have I<socklen_t "
706 "*>, and so do the Single UNIX Specification and glibc2.  Quoting Linus "
707 "Torvalds:"
708 msgstr ""
709 "B<accept>()  の第 3 引き数は、もともと I<int *> と宣言されていた (libc4 や "
710 "libc5, 4.x BSD, SunOS 4, SGI など多くのシステムではそうなっている)。 "
711 "POSIX.1g draft 標準は、 これを I<size_t *> に変更しようとし、SunOS 5 ではそう"
712 "宣言されている。 後に POSIX drafts には I<socklen_t *> が含まれるようにな"
713 "り、 Single UNIX Specification や glibc2 ではこのように宣言されるようになっ"
714 "た。 Linus Torvald の発言を引用する:"
715
716 #.  .I fails: only italicizes a single line
717 #. type: Plain text
718 #: build/C/man2/accept.2:376
719 msgid ""
720 "\"_Any_ sane library _must_ have \"socklen_t\" be the same size as int.  "
721 "Anything else breaks any BSD socket layer stuff.  POSIX initially I<did> "
722 "make it a size_t, and I (and hopefully others, but obviously not too many) "
723 "complained to them very loudly indeed.  Making it a size_t is completely "
724 "broken, exactly because size_t very seldom is the same size as \"int\" on 64-"
725 "bit architectures, for example.  And it I<has> to be the same size as \"int"
726 "\" because that's what the BSD socket interface is.  Anyway, the POSIX "
727 "people eventually got a clue, and created \"socklen_t\".  They shouldn't "
728 "have touched it in the first place, but once they did they felt it had to "
729 "have a named type for some unfathomable reason (probably somebody didn't "
730 "like losing face over having done the original stupid thing, so they "
731 "silently just renamed their blunder).\""
732 msgstr ""
733 "「まともなライブラリを作りたければ、 \"socklen_t\" のサイズは int と同じにし"
734 "なきゃならない。 さもないと BSD ソケット層を破壊することになっちゃう。 POSIX "
735 "は最初こいつを size_t にしたんで、 ぼくは彼らに文句をがなりたてた (多分そうい"
736 "う人は他にもいたと思う。多くはなかったようだけど)。 こいつを size_t にするの"
737 "は完全にいかれてる。 例えば 64 ビットアーキテクチャでは、 size_t が \"int\" "
738 "と同じサイズだなんてことはほとんどないからね。 このサイズは \"int\" と 同じで"
739 "なきゃ『ダメ』なんだ。 BSD ソケットインターフェースっていうのはそういうものな"
740 "んだから。 まあともかく POSIX の人たちも、 \"socklen_t\" を作るという解決策を"
741 "なんとかひねり出した。 そもそも最初から放っておけば良かったんだが、 いじっ"
742 "ちゃった以上、 名前付きの型を持たせなきゃならない、と思ったみたいだね。 なん"
743 "でかはわかんないけど (きっと最初にやっちまった馬鹿な間違いで顔をつぶしたくな"
744 "かったから、 こっそり名前を付け替えて自分たちの大失敗をごまかそうとしたんだろ"
745 "う)。」"
746
747 #. type: SH
748 #: build/C/man2/accept.2:376 build/C/man2/bind.2:252
749 #: build/C/man2/connect.2:256 build/C/man3/getifaddrs.3:198
750 #: build/C/man2/listen.2:164 build/C/man2/recv.2:488 build/C/man2/select.2:484
751 #: build/C/man2/select_tut.2:527 build/C/man2/send.2:414
752 #: build/C/man3/sockatmark.3:95 build/C/man2/socket.2:382
753 #, no-wrap
754 msgid "EXAMPLE"
755 msgstr "例"
756
757 #. type: Plain text
758 #: build/C/man2/accept.2:379 build/C/man2/listen.2:167
759 msgid "See B<bind>(2)."
760 msgstr "B<bind>(2)  参照。"
761
762 #. type: SH
763 #: build/C/man2/accept.2:379 build/C/man2/bind.2:317
764 #: build/C/man3/bindresvport.3:98 build/C/man2/connect.2:261
765 #: build/C/man3/getifaddrs.3:281 build/C/man2/getsockname.2:110
766 #: build/C/man2/getsockopt.2:200 build/C/man2/listen.2:167
767 #: build/C/man2/recv.2:493 build/C/man2/recvmmsg.2:165
768 #: build/C/man2/select.2:521 build/C/man2/select_tut.2:817
769 #: build/C/man2/send.2:419 build/C/man2/sendmmsg.2:168
770 #: build/C/man3/sockatmark.3:130 build/C/man2/socket.2:387
771 #: build/C/man7/socket.7:742 build/C/man2/socketcall.2:54
772 #: build/C/man2/socketpair.2:122
773 #, no-wrap
774 msgid "SEE ALSO"
775 msgstr "関連項目"
776
777 #. type: Plain text
778 #: build/C/man2/accept.2:385
779 msgid ""
780 "B<bind>(2), B<connect>(2), B<listen>(2), B<select>(2), B<socket>(2), "
781 "B<socket>(7)"
782 msgstr ""
783 "B<bind>(2), B<connect>(2), B<listen>(2), B<select>(2), B<socket>(2), "
784 "B<socket>(7)"
785
786 #. type: TH
787 #: build/C/man2/bind.2:66
788 #, no-wrap
789 msgid "BIND"
790 msgstr "BIND"
791
792 #. type: TH
793 #: build/C/man2/bind.2:66
794 #, no-wrap
795 msgid "2007-12-28"
796 msgstr "2007-12-28"
797
798 #. type: Plain text
799 #: build/C/man2/bind.2:69
800 msgid "bind - bind a name to a socket"
801 msgstr "bind - ソケットに名前をつける"
802
803 #. type: Plain text
804 #: build/C/man2/bind.2:76
805 #, no-wrap
806 msgid ""
807 "B<int bind(int >I<sockfd>B<, const struct sockaddr *>I<addr>B<,>\n"
808 "B<         socklen_t >I<addrlen>B<);>\n"
809 msgstr ""
810 "B<int bind(int >I<sockfd>B<, const struct sockaddr *>I<addr>B<,>\n"
811 "B<         socklen_t >I<addrlen>B<);>\n"
812
813 #. type: Plain text
814 #: build/C/man2/bind.2:90
815 msgid ""
816 "When a socket is created with B<socket>(2), it exists in a name space "
817 "(address family) but has no address assigned to it.  B<bind>()  assigns the "
818 "address specified to by I<addr> to the socket referred to by the file "
819 "descriptor I<sockfd>.  I<addrlen> specifies the size, in bytes, of the "
820 "address structure pointed to by I<addr>.  Traditionally, this operation is "
821 "called \\(lqassigning a name to a socket\\(rq."
822 msgstr ""
823 "B<socket>(2)  でソケットが作成されたとき、そのソケットは名前空間 (アドレス・"
824 "ファミリー) に 存在するが、アドレスは割り当てられていない。 B<bind>()  は、"
825 "ファイルディスクリプタ I<sockfd> で参照されるソケットに I<addr> で指定された"
826 "アドレスを割り当てる。 I<addrlen> には I<addr> が指すアドレス構造体のサイズを"
827 "バイト単位で指定する。 伝統的にこの操作は 「ソケットに名前をつける」 と呼ばれ"
828 "る。"
829
830 #. type: Plain text
831 #: build/C/man2/bind.2:97
832 msgid ""
833 "It is normally necessary to assign a local address using B<bind>()  before a "
834 "B<SOCK_STREAM> socket may receive connections (see B<accept>(2))."
835 msgstr ""
836 "B<SOCK_STREAM> ソケットが接続を受け付けられるようにするには (B<accept>(2)  を"
837 "参照)、通常その前に B<bind>()  を使用してローカルアドレスを割り当てる必要があ"
838 "る。"
839
840 #. type: Plain text
841 #: build/C/man2/bind.2:128
842 msgid ""
843 "The rules used in name binding vary between address families.  Consult the "
844 "manual entries in Section 7 for detailed information.  For B<AF_INET> see "
845 "B<ip>(7), for B<AF_INET6> see B<ipv6>(7), for B<AF_UNIX> see B<unix>(7), for "
846 "B<AF_APPLETALK> see B<ddp>(7), for B<AF_PACKET> see B<packet>(7), for "
847 "B<AF_X25> see B<x25>(7)  and for B<AF_NETLINK> see B<netlink>(7)."
848 msgstr ""
849 "名前付けのルールはアドレス・ファミリーごとに異なっている。詳細な情報は 第 7 "
850 "章の各マニュアルを参照すること。 B<AF_INET> は B<ip>(7)  を、 B<AF_INET6> は "
851 "B<ipv6>(7)  を、 B<AF_UNIX> は B<unix>(7)  を、 B<AF_APPLETALK> は B<ddp>"
852 "(7)  を、 B<AF_PACKET> は B<packet>(7)  を、 B<AF_X25> は B<x25>(7)  を、 "
853 "B<AF_NETLINK> は B<netlink>(7)  を参照。"
854
855 #. type: Plain text
856 #: build/C/man2/bind.2:135
857 msgid ""
858 "The actual structure passed for the I<addr> argument will depend on the "
859 "address family.  The I<sockaddr> structure is defined as something like:"
860 msgstr ""
861 "I<addr> 引き数に実際にどのような構造体が渡されるかは、 アドレス・ファミリーに"
862 "依存する。 I<sockaddr> 構造体は以下のような感じで定義されている:"
863
864 #. type: Plain text
865 #: build/C/man2/bind.2:142
866 #, no-wrap
867 msgid ""
868 "struct sockaddr {\n"
869 "    sa_family_t sa_family;\n"
870 "    char        sa_data[14];\n"
871 "}\n"
872 msgstr ""
873 "struct sockaddr {\n"
874 "    sa_family_t sa_family;\n"
875 "    char        sa_data[14];\n"
876 "}\n"
877
878 #. type: Plain text
879 #: build/C/man2/bind.2:150
880 msgid ""
881 "The only purpose of this structure is to cast the structure pointer passed "
882 "in I<addr> in order to avoid compiler warnings.  See EXAMPLE below."
883 msgstr ""
884 "この構造体は、 I<addr> に渡される構造体へのポインタをキャストし、 コンパイラ"
885 "の警告メッセージを抑えるためだけに存在する。 下記の「例」を参照。"
886
887 #. type: Plain text
888 #: build/C/man2/bind.2:155 build/C/man2/getsockname.2:70
889 #: build/C/man2/getsockopt.2:134 build/C/man2/listen.2:85
890 #: build/C/man2/socketpair.2:72
891 msgid ""
892 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
893 "appropriately."
894 msgstr ""
895 "成功した場合にはゼロが返される。エラー時には -1 が返され、 I<errno> が適切に"
896 "設定される。"
897
898 #. type: TP
899 #: build/C/man2/bind.2:156 build/C/man2/bind.2:180
900 #: build/C/man3/bindresvport.3:74 build/C/man2/connect.2:133
901 #: build/C/man2/send.2:283 build/C/man2/socket.2:318
902 #, no-wrap
903 msgid "B<EACCES>"
904 msgstr "B<EACCES>"
905
906 #.  e.g., privileged port in AF_INET domain
907 #. type: Plain text
908 #: build/C/man2/bind.2:160
909 msgid "The address is protected, and the user is not the superuser."
910 msgstr "そのアドレスは保護されていて、かつユーザがスーパーユーザではない。"
911
912 #. type: TP
913 #: build/C/man2/bind.2:160 build/C/man3/bindresvport.3:79
914 #: build/C/man2/connect.2:146 build/C/man2/listen.2:86
915 #, no-wrap
916 msgid "B<EADDRINUSE>"
917 msgstr "B<EADDRINUSE>"
918
919 #. type: Plain text
920 #: build/C/man2/bind.2:163
921 msgid "The given address is already in use."
922 msgstr "指定されたアドレスが既に使用中である。"
923
924 #. type: Plain text
925 #: build/C/man2/bind.2:167
926 msgid "I<sockfd> is not a valid descriptor."
927 msgstr "I<sockfd> が不正なディスクリプタである。"
928
929 #.  This may change in the future: see
930 #.  .I linux/unix/sock.c for details.
931 #. type: Plain text
932 #: build/C/man2/bind.2:172
933 msgid "The socket is already bound to an address."
934 msgstr "ソケットがすでにアドレスに結びつけ (bind) られている。"
935
936 #. type: Plain text
937 #: build/C/man2/bind.2:176
938 msgid "I<sockfd> is a descriptor for a file, not a socket."
939 msgstr ""
940 "I<sockfd> がファイルに対するディスクリプタで、ソケットに対するものではない。"
941
942 #. type: Plain text
943 #: build/C/man2/bind.2:180
944 msgid "The following errors are specific to UNIX domain (B<AF_UNIX>)  sockets:"
945 msgstr "以下のエラーは UNIXドメイン (B<AF_UNIX>)  のソケット特有である:"
946
947 #. type: Plain text
948 #: build/C/man2/bind.2:185
949 msgid ""
950 "Search permission is denied on a component of the path prefix.  (See also "
951 "B<path_resolution>(7).)"
952 msgstr ""
953 "パス名の構成要素に検索許可 (search permission) がない (B<path_resolution>"
954 "(7)  も参照すること)。"
955
956 #. type: TP
957 #: build/C/man2/bind.2:185
958 #, no-wrap
959 msgid "B<EADDRNOTAVAIL>"
960 msgstr "B<EADDRNOTAVAIL>"
961
962 #. type: Plain text
963 #: build/C/man2/bind.2:189
964 msgid ""
965 "A nonexistent interface was requested or the requested address was not local."
966 msgstr ""
967 "存在しないインタフェースが要求されたか、要求されたアドレスが ローカルではな"
968 "かった。"
969
970 #. type: Plain text
971 #: build/C/man2/bind.2:193
972 msgid "I<addr> points outside the user's accessible address space."
973 msgstr "I<addr> がユーザのアクセス可能なアドレス空間の外を指している。"
974
975 #. type: Plain text
976 #: build/C/man2/bind.2:200
977 msgid ""
978 "The I<addrlen> is wrong, or the socket was not in the B<AF_UNIX> family."
979 msgstr "I<addrlen> が不正であるか、ソケットが B<AF_UNIX> ファミリーではない。"
980
981 #. type: TP
982 #: build/C/man2/bind.2:200
983 #, no-wrap
984 msgid "B<ELOOP>"
985 msgstr "B<ELOOP>"
986
987 #. type: Plain text
988 #: build/C/man2/bind.2:204
989 msgid "Too many symbolic links were encountered in resolving I<addr>."
990 msgstr "I<addr> を解決する際に遭遇したシンボリック・リンクが多過ぎる。"
991
992 #. type: TP
993 #: build/C/man2/bind.2:204
994 #, no-wrap
995 msgid "B<ENAMETOOLONG>"
996 msgstr "B<ENAMETOOLONG>"
997
998 #. type: Plain text
999 #: build/C/man2/bind.2:208
1000 msgid "I<addr> is too long."
1001 msgstr "I<addr> が長過ぎる。"
1002
1003 #. type: TP
1004 #: build/C/man2/bind.2:208
1005 #, no-wrap
1006 msgid "B<ENOENT>"
1007 msgstr "B<ENOENT>"
1008
1009 #. type: Plain text
1010 #: build/C/man2/bind.2:211
1011 msgid "The file does not exist."
1012 msgstr "ファイルが存在しない。"
1013
1014 #. type: TP
1015 #: build/C/man2/bind.2:211 build/C/man2/recv.2:427 build/C/man2/select.2:318
1016 #: build/C/man2/send.2:338
1017 #, no-wrap
1018 msgid "B<ENOMEM>"
1019 msgstr "B<ENOMEM>"
1020
1021 #. type: Plain text
1022 #: build/C/man2/bind.2:214
1023 msgid "Insufficient kernel memory was available."
1024 msgstr "カーネルに、利用可能なメモリーが十分にない。"
1025
1026 #. type: TP
1027 #: build/C/man2/bind.2:214
1028 #, no-wrap
1029 msgid "B<ENOTDIR>"
1030 msgstr "B<ENOTDIR>"
1031
1032 #. type: Plain text
1033 #: build/C/man2/bind.2:217
1034 msgid "A component of the path prefix is not a directory."
1035 msgstr "パス名の構成要素がディレクトリではない。"
1036
1037 #. type: TP
1038 #: build/C/man2/bind.2:217
1039 #, no-wrap
1040 msgid "B<EROFS>"
1041 msgstr "B<EROFS>"
1042
1043 #. type: Plain text
1044 #: build/C/man2/bind.2:220
1045 msgid "The socket inode would reside on a read-only file system."
1046 msgstr "ソケット inode が読み込み専用のファイルシステム上にある。"
1047
1048 #.  SVr4 documents an additional
1049 #.  .B ENOSR
1050 #.  general error condition, and
1051 #.  additional
1052 #.  .B EIO
1053 #.  and
1054 #.  .B EISDIR
1055 #.  UNIX-domain error conditions.
1056 #. type: Plain text
1057 #: build/C/man2/bind.2:232
1058 msgid "SVr4, 4.4BSD, POSIX.1-2001 (B<bind>()  first appeared in 4.2BSD)."
1059 msgstr "SVr4, 4.4BSD, POSIX.1-2001 (B<bind>()  は 4.2BSD で最初に現われた)。"
1060
1061 #. type: Plain text
1062 #: build/C/man2/bind.2:249
1063 msgid ""
1064 "The third argument of B<bind>()  is in reality an I<int> (and this is what 4."
1065 "x BSD and libc4 and libc5 have).  Some POSIX confusion resulted in the "
1066 "present I<socklen_t>, also used by glibc.  See also B<accept>(2)."
1067 msgstr ""
1068 "B<bind>()  の三番目の引き数は (4.x BSD や libc4, libc5 と同様に) 実際には "
1069 "I<int> である。glibc でも使われている現在の I<socklen_t> に関して、POSIX には"
1070 "少し混乱がある。 詳しくは B<accept>(2)  を参照のこと。"
1071
1072 #. type: SH
1073 #: build/C/man2/bind.2:249 build/C/man2/getsockopt.2:197
1074 #: build/C/man2/select.2:425 build/C/man2/send.2:409
1075 #: build/C/man3/sockatmark.3:91 build/C/man7/socket.7:729
1076 #, no-wrap
1077 msgid "BUGS"
1078 msgstr "バグ"
1079
1080 #.  FIXME What *are* transparent proxy options?
1081 #. type: Plain text
1082 #: build/C/man2/bind.2:252
1083 msgid "The transparent proxy options are not described."
1084 msgstr "透過的プロキシ (transparent proxy) オプションについて記述していない。"
1085
1086 #. type: Plain text
1087 #: build/C/man2/bind.2:257
1088 msgid ""
1089 "An example of the use of B<bind>()  with Internet domain sockets can be "
1090 "found in B<getaddrinfo>(3)."
1091 msgstr ""
1092 "インターネット・ドメイン・ソケットでの B<bind>()  の利用例が B<getaddrinfo>"
1093 "(3)  に記載されている。"
1094
1095 #.  listen.7 refers to this example.
1096 #.  accept.7 refers to this example.
1097 #.  unix.7 refers to this example.
1098 #. type: Plain text
1099 #: build/C/man2/bind.2:264
1100 msgid ""
1101 "The following example shows how to bind a stream socket in the UNIX "
1102 "(B<AF_UNIX>)  domain, and accept connections:"
1103 msgstr ""
1104 "以下の例は、UNIX ドメイン (B<AF_UNIX>)  でストリームソケットを bind する方法"
1105 "を示したものである。"
1106
1107 #. type: Plain text
1108 #: build/C/man2/bind.2:271
1109 #, no-wrap
1110 msgid ""
1111 "#include E<lt>sys/socket.hE<gt>\n"
1112 "#include E<lt>sys/un.hE<gt>\n"
1113 "#include E<lt>stdlib.hE<gt>\n"
1114 "#include E<lt>stdio.hE<gt>\n"
1115 "#include E<lt>string.hE<gt>\n"
1116 msgstr ""
1117 "#include E<lt>sys/socket.hE<gt>\n"
1118 "#include E<lt>sys/un.hE<gt>\n"
1119 "#include E<lt>stdlib.hE<gt>\n"
1120 "#include E<lt>stdio.hE<gt>\n"
1121 "#include E<lt>string.hE<gt>\n"
1122
1123 #. type: Plain text
1124 #: build/C/man2/bind.2:274
1125 #, no-wrap
1126 msgid ""
1127 "#define MY_SOCK_PATH \"/somepath\"\n"
1128 "#define LISTEN_BACKLOG 50\n"
1129 msgstr ""
1130 "#define MY_SOCK_PATH \"/somepath\"\n"
1131 "#define LISTEN_BACKLOG 50\n"
1132
1133 #. type: Plain text
1134 #: build/C/man2/bind.2:277
1135 #, no-wrap
1136 msgid ""
1137 "#define handle_error(msg) \\e\n"
1138 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1139 msgstr ""
1140 "#define handle_error(msg) \\e\n"
1141 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1142
1143 #. type: Plain text
1144 #: build/C/man2/bind.2:284
1145 #, no-wrap
1146 msgid ""
1147 "int\n"
1148 "main(int argc, char *argv[])\n"
1149 "{\n"
1150 "    int sfd, cfd;\n"
1151 "    struct sockaddr_un my_addr, peer_addr;\n"
1152 "    socklen_t peer_addr_size;\n"
1153 msgstr ""
1154 "int\n"
1155 "main(int argc, char *argv[])\n"
1156 "{\n"
1157 "    int sfd, cfd;\n"
1158 "    struct sockaddr_un my_addr, peer_addr;\n"
1159 "    socklen_t peer_addr_size;\n"
1160
1161 #. type: Plain text
1162 #: build/C/man2/bind.2:288
1163 #, no-wrap
1164 msgid ""
1165 "    sfd = socket(AF_UNIX, SOCK_STREAM, 0);\n"
1166 "    if (sfd == -1)\n"
1167 "        handle_error(\"socket\");\n"
1168 msgstr ""
1169 "    sfd = socket(AF_UNIX, SOCK_STREAM, 0);\n"
1170 "    if (sfd == -1)\n"
1171 "        handle_error(\"socket\");\n"
1172
1173 #. type: Plain text
1174 #: build/C/man2/bind.2:294
1175 #, no-wrap
1176 msgid ""
1177 "    memset(&my_addr, 0, sizeof(struct sockaddr_un));\n"
1178 "                        /* Clear structure */\n"
1179 "    my_addr.sun_family = AF_UNIX;\n"
1180 "    strncpy(my_addr.sun_path, MY_SOCK_PATH,\n"
1181 "            sizeof(my_addr.sun_path) - 1);\n"
1182 msgstr ""
1183 "    memset(&my_addr, 0, sizeof(struct sockaddr_un));\n"
1184 "                        /* Clear structure */\n"
1185 "    my_addr.sun_family = AF_UNIX;\n"
1186 "    strncpy(my_addr.sun_path, MY_SOCK_PATH,\n"
1187 "            sizeof(my_addr.sun_path) - 1);\n"
1188
1189 #. type: Plain text
1190 #: build/C/man2/bind.2:298
1191 #, no-wrap
1192 msgid ""
1193 "    if (bind(sfd, (struct sockaddr *) &my_addr,\n"
1194 "            sizeof(struct sockaddr_un)) == -1)\n"
1195 "        handle_error(\"bind\");\n"
1196 msgstr ""
1197 "    if (bind(sfd, (struct sockaddr *) &my_addr,\n"
1198 "            sizeof(struct sockaddr_un)) == -1)\n"
1199 "        handle_error(\"bind\");\n"
1200
1201 #. type: Plain text
1202 #: build/C/man2/bind.2:301
1203 #, no-wrap
1204 msgid ""
1205 "    if (listen(sfd, LISTEN_BACKLOG) == -1)\n"
1206 "        handle_error(\"listen\");\n"
1207 msgstr ""
1208 "    if (listen(sfd, LISTEN_BACKLOG) == -1)\n"
1209 "        handle_error(\"listen\");\n"
1210
1211 #. type: Plain text
1212 #: build/C/man2/bind.2:304
1213 #, no-wrap
1214 msgid ""
1215 "    /* Now we can accept incoming connections one\n"
1216 "       at a time using accept(2) */\n"
1217 msgstr ""
1218 "    /* Now we can accept incoming connections one\n"
1219 "       at a time using accept(2) */\n"
1220
1221 #. type: Plain text
1222 #: build/C/man2/bind.2:310
1223 #, no-wrap
1224 msgid ""
1225 "    peer_addr_size = sizeof(struct sockaddr_un);\n"
1226 "    cfd = accept(sfd, (struct sockaddr *) &peer_addr,\n"
1227 "                 &peer_addr_size);\n"
1228 "    if (cfd == -1)\n"
1229 "        handle_error(\"accept\");\n"
1230 msgstr ""
1231 "    peer_addr_size = sizeof(struct sockaddr_un);\n"
1232 "    cfd = accept(sfd, (struct sockaddr *) &peer_addr,\n"
1233 "                 &peer_addr_size)\n"
1234 "    if (cfd == -1)\n"
1235 "        handle_error(\"accept\");\n"
1236
1237 #. type: Plain text
1238 #: build/C/man2/bind.2:312
1239 #, no-wrap
1240 msgid "    /* Code to deal with incoming connection(s)... */\n"
1241 msgstr "    /* Code to deal with incoming connection(s)... */\n"
1242
1243 #. type: Plain text
1244 #: build/C/man2/bind.2:316
1245 #, no-wrap
1246 msgid ""
1247 "    /* When no longer required, the socket pathname, MY_SOCK_PATH\n"
1248 "       should be deleted using unlink(2) or remove(3) */\n"
1249 "}\n"
1250 msgstr ""
1251 "    /* When no longer required, the socket pathname, MY_SOCK_PATH\n"
1252 "       should be deleted using unlink(2) or remove(3) */\n"
1253 "}\n"
1254
1255 #. type: Plain text
1256 #: build/C/man2/bind.2:329
1257 msgid ""
1258 "B<accept>(2), B<connect>(2), B<getsockname>(2), B<listen>(2), B<socket>(2), "
1259 "B<getaddrinfo>(3), B<getifaddrs>(3), B<ip>(7), B<ipv6>(7), B<path_resolution>"
1260 "(7), B<socket>(7), B<unix>(7)"
1261 msgstr ""
1262 "B<accept>(2), B<connect>(2), B<getsockname>(2), B<listen>(2), B<socket>(2), "
1263 "B<getaddrinfo>(3), B<getifaddrs>(3), B<ip>(7), B<ipv6>(7), B<path_resolution>"
1264 "(7), B<socket>(7), B<unix>(7)"
1265
1266 #. type: TH
1267 #: build/C/man3/bindresvport.3:27
1268 #, no-wrap
1269 msgid "BINDRESVPORT"
1270 msgstr "BINDRESVPORT"
1271
1272 #. type: TH
1273 #: build/C/man3/bindresvport.3:27 build/C/man2/connect.2:65
1274 #: build/C/man2/getsockname.2:38 build/C/man2/getsockopt.2:42
1275 #: build/C/man3/sockatmark.3:23
1276 #, no-wrap
1277 msgid "2008-12-03"
1278 msgstr "2008-12-03"
1279
1280 #. type: Plain text
1281 #: build/C/man3/bindresvport.3:30
1282 msgid "bindresvport - bind a socket to a privileged IP port"
1283 msgstr "bindresvport - ソケットを特権 IP ポートにバインドする"
1284
1285 #. type: Plain text
1286 #: build/C/man3/bindresvport.3:34
1287 #, no-wrap
1288 msgid ""
1289 "B<#include E<lt>sys/types.hE<gt>>\n"
1290 "B<#include E<lt>netinet/in.hE<gt>>\n"
1291 msgstr ""
1292 "B<#include E<lt>sys/types.hE<gt>>\n"
1293 "B<#include E<lt>netinet/in.hE<gt>>\n"
1294
1295 #. type: Plain text
1296 #: build/C/man3/bindresvport.3:36
1297 #, no-wrap
1298 msgid "B<int bindresvport(int >I<sockfd>B<, struct sockaddr_in *>I<sin>B<);>\n"
1299 msgstr "B<int bindresvport(int >I<sockfd>B<, struct sockaddr_in *>I<sin>B<);>\n"
1300
1301 #.  Glibc actually starts searching with a port # in the range 600 to 1023
1302 #. type: Plain text
1303 #: build/C/man3/bindresvport.3:43
1304 msgid ""
1305 "B<bindresvport>()  is used to bind a socket descriptor to a privileged "
1306 "anonymous IP port, that is, a port number arbitrarily selected from the "
1307 "range 512 to 1023."
1308 msgstr ""
1309 "B<bindresvport>()  は、ソケット・ディスクリプタを特権無名 (privileged "
1310 "anonymous) IP ポートに バインドするのに使う。特権無名 IP ポートとは、 ポート"
1311 "番号が 512 から 1023 の範囲から任意に選択されるポートである。"
1312
1313 #. type: Plain text
1314 #: build/C/man3/bindresvport.3:53
1315 msgid ""
1316 "If the B<bind>(2)  performed by B<bindresvport>()  is successful, and I<sin> "
1317 "is not NULL, then I<sin-E<gt>sin_port> returns the port number actually "
1318 "allocated."
1319 msgstr ""
1320 "B<bindresvport>()  によって実行された B<bind>(2)  が成功し、 I<sin> が NULL "
1321 "以外の場合、実際に割り当てられたポート番号が I<sin-E<gt>sin_port> に入れて返"
1322 "される。"
1323
1324 #. type: Plain text
1325 #: build/C/man3/bindresvport.3:64
1326 msgid ""
1327 "I<sin> can be NULL, in which case I<sin-E<gt>sin_family> is implicitly taken "
1328 "to be B<AF_INET>.  However, in this case, B<bindresvport>()  has no way to "
1329 "return the port number actually allocated.  (This information can later be "
1330 "obtained using B<getsockname>(2).)"
1331 msgstr ""
1332 "I<sin> には NULL を指定することもでき、その場合には I<sin-E<gt>sin_family> は"
1333 "暗黙のうちに B<AF_INET> とみなされる。 しかし、この場合には、 B<bindresvport>"
1334 "()  は実際に割り当てられたポート番号を返す手段を持たない (割り当てられたポー"
1335 "ト番号は、後で B<getsockname>(2)  を使って取得できる)。"
1336
1337 #. type: Plain text
1338 #: build/C/man3/bindresvport.3:69
1339 msgid ""
1340 "B<bindresvport>()  returns 0 on success; otherwise -1 is returned and "
1341 "I<errno> set to indicate the cause of the error."
1342 msgstr ""
1343 "B<bindresvport>()  は成功すると 0 を返す。それ以外の場合、-1 を返し、 "
1344 "I<errno> にエラーの原因を示す値を設定する。"
1345
1346 #. type: Plain text
1347 #: build/C/man3/bindresvport.3:74
1348 msgid ""
1349 "B<bindresvport>()  can fail for any of the same reasons as B<bind>(2).  In "
1350 "addition, the following errors may occur:"
1351 msgstr ""
1352 "B<bindresvport>()  は B<bind>(2)  と同じ原因で失敗する可能性がある。 さらに、"
1353 "以下のエラーが発生することがある:"
1354
1355 #. type: Plain text
1356 #: build/C/man3/bindresvport.3:79
1357 msgid ""
1358 "The caller did not have superuser privilege (to be precise: the "
1359 "B<CAP_NET_BIND_SERVICE> capability is required)."
1360 msgstr ""
1361 "呼び出し元がスーパーユーザの特権を持っていなかった (より正確に言うと、 "
1362 "B<CAP_NET_BIND_SERVICE> ケーパビリティが必要である)。"
1363
1364 #. type: Plain text
1365 #: build/C/man3/bindresvport.3:82
1366 msgid "All privileged ports are in use."
1367 msgstr "全ての特権ポートが使用中である。"
1368
1369 #. type: TP
1370 #: build/C/man3/bindresvport.3:82
1371 #, no-wrap
1372 msgid "B<EAFNOSUPPORT> (B<EPFNOSUPPORT> in glibc 2.7 and earlier)"
1373 msgstr "B<EAFNOSUPPORT> (glibc 2.7 以前では B<EPFNOSUPPORT>)"
1374
1375 #. type: Plain text
1376 #: build/C/man3/bindresvport.3:89
1377 msgid "I<sin> is not NULL and I<sin-E<gt>sin_family> is not B<AF_INET>."
1378 msgstr ""
1379 "I<sin> が NULL 以外で、かつ I<sin-E<gt>sin_family> が B<AF_INET> でなかった。"
1380
1381 #. type: Plain text
1382 #: build/C/man3/bindresvport.3:92
1383 msgid ""
1384 "Not in POSIX.1-2001.  Present on the BSDs, Solaris, and many other systems."
1385 msgstr ""
1386 "POSIX.1-2001 にはない。 BSD, Solaris およびその他の多くのシステムに存在する。"
1387
1388 #. type: Plain text
1389 #: build/C/man3/bindresvport.3:98
1390 msgid ""
1391 "Unlike some B<bindresvport>()  implementations, the glibc implementation "
1392 "ignores any value that the caller supplies in I<sin-E<gt>sin_port>."
1393 msgstr ""
1394 "B<bindresvport>()  のいくつかの実装と異なり、glibc の実装では呼び出し元が "
1395 "I<sin-E<gt>sin_port> で渡した値はどんな値であっても無視される。"
1396
1397 #. type: Plain text
1398 #: build/C/man3/bindresvport.3:100
1399 msgid "B<bind>(2), B<getsockname>(2)"
1400 msgstr "B<bind>(2), B<getsockname>(2)"
1401
1402 #. type: TH
1403 #: build/C/man2/connect.2:65
1404 #, no-wrap
1405 msgid "CONNECT"
1406 msgstr "CONNECT"
1407
1408 #. type: Plain text
1409 #: build/C/man2/connect.2:68
1410 msgid "connect - initiate a connection on a socket"
1411 msgstr "connect - ソケットの接続を行う"
1412
1413 #. type: Plain text
1414 #: build/C/man2/connect.2:71 build/C/man2/getsockopt.2:48
1415 #: build/C/man2/listen.2:49
1416 #, no-wrap
1417 msgid "B<#include E<lt>sys/types.hE<gt>>          /* See NOTES */\n"
1418 msgstr "B<#include E<lt>sys/types.hE<gt>>          /* 「注意」参照 */\n"
1419
1420 #. type: Plain text
1421 #: build/C/man2/connect.2:73 build/C/man2/getsockname.2:44
1422 #: build/C/man2/getsockopt.2:50 build/C/man2/listen.2:51
1423 #: build/C/man2/recv.2:49
1424 #, no-wrap
1425 msgid "B<#include E<lt>sys/socket.hE<gt>>\n"
1426 msgstr "B<#include E<lt>sys/socket.hE<gt>>\n"
1427
1428 #. type: Plain text
1429 #: build/C/man2/connect.2:76
1430 #, no-wrap
1431 msgid ""
1432 "B<int connect(int >I<sockfd>B<, const struct sockaddr *>I<addr>B<,>\n"
1433 "B<            socklen_t >I<addrlen>B<);>\n"
1434 msgstr ""
1435 "B<int connect(int >I<sockfd>B<, const struct sockaddr *>I<addr>B<,>\n"
1436 "B<            socklen_t >I<addrlen>B<);>\n"
1437
1438 #. type: Plain text
1439 #: build/C/man2/connect.2:95
1440 msgid ""
1441 "The B<connect>()  system call connects the socket referred to by the file "
1442 "descriptor I<sockfd> to the address specified by I<addr>.  The I<addrlen> "
1443 "argument specifies the size of I<addr>.  The format of the address in "
1444 "I<addr> is determined by the address space of the socket I<sockfd>; see "
1445 "B<socket>(2)  for further details."
1446 msgstr ""
1447 "B<connect>()  システムコールは、ファイルディスクリプタ I<sockfd> が参照してい"
1448 "るソケットを I<addr> で指定されたアドレスに接続する。 I<addrlen> 引き数は "
1449 "I<addr> の大きさを示す。 I<addr> のアドレスのフォーマットはソケット "
1450 "I<sockfd> のアドレス空間により異なる。 さらなる詳細は B<socket>(2)  を参照の"
1451 "こと。"
1452
1453 #. type: Plain text
1454 #: build/C/man2/connect.2:111
1455 msgid ""
1456 "If the socket I<sockfd> is of type B<SOCK_DGRAM> then I<addr> is the address "
1457 "to which datagrams are sent by default, and the only address from which "
1458 "datagrams are received.  If the socket is of type B<SOCK_STREAM> or "
1459 "B<SOCK_SEQPACKET>, this call attempts to make a connection to the socket "
1460 "that is bound to the address specified by I<addr>."
1461 msgstr ""
1462 "ソケット I<sockfd> が B<SOCK_DGRAM> 型であれば、 I<addr> は、デフォルトのデー"
1463 "タグラムの送信先のアドレスであり、 データグラムを受信する唯一のアドレスを示す"
1464 "に過ぎない。 ソケットが B<SOCK_STREAM> 型もしくは B<SOCK_SEQPACKET> 型であれ"
1465 "ば、このシステムコールは I<addr> で指定されたアドレスに結び付けられたソケット"
1466 "に対する接続の 作成を試みる。"
1467
1468 #. type: Plain text
1469 #: build/C/man2/connect.2:125
1470 msgid ""
1471 "Generally, connection-based protocol sockets may successfully B<connect>()  "
1472 "only once; connectionless protocol sockets may use B<connect>()  multiple "
1473 "times to change their association.  Connectionless sockets may dissolve the "
1474 "association by connecting to an address with the I<sa_family> member of "
1475 "I<sockaddr> set to B<AF_UNSPEC> (supported on Linux since kernel 2.2)."
1476 msgstr ""
1477 "一般的に、接続指向 (connection-oriented) プロトコルでは一度だけ B<connect>"
1478 "()  が成功する。 非接続 (connectionless) プロトコルでは対応を変更するために何"
1479 "度も B<connect>()  を使用できる。 非接続ソケットは I<sockaddr> の "
1480 "I<sa_family> メンバに B<AF_UNSPEC> を設定することで、接続アドレスの対応を解消"
1481 "することができる (B<AF_UNSPEC> はカーネル 2.2 以降の Linux でサポート)。"
1482
1483 #. type: Plain text
1484 #: build/C/man2/connect.2:130
1485 msgid ""
1486 "If the connection or binding succeeds, zero is returned.  On error, -1 is "
1487 "returned, and I<errno> is set appropriately."
1488 msgstr ""
1489 "接続または対応づけに成功するとゼロを返す。 失敗すると -1 を返し、 I<errno> に"
1490 "適切な値を設定する。"
1491
1492 #. type: Plain text
1493 #: build/C/man2/connect.2:133
1494 msgid ""
1495 "The following are general socket errors only.  There may be other domain-"
1496 "specific error codes."
1497 msgstr ""
1498 "以下は一般的なソケットについてのエラーである。他にドメイン特有のエラー が発生"
1499 "する可能性がある。"
1500
1501 #. type: Plain text
1502 #: build/C/man2/connect.2:141
1503 msgid ""
1504 "For UNIX domain sockets, which are identified by pathname: Write permission "
1505 "is denied on the socket file, or search permission is denied for one of the "
1506 "directories in the path prefix.  (See also B<path_resolution>(7).)"
1507 msgstr ""
1508 "UNIX ドメインソケットはパス名で識別される。 ソケット・ファイルへの書き込み許"
1509 "可がなかったか、パス名へ 到達するまでのディレクトリのいずれかに対する検索許可"
1510 "がなかった。 (B<path_resolution>(7)  も参照のこと)"
1511
1512 #. type: TP
1513 #: build/C/man2/connect.2:141
1514 #, no-wrap
1515 msgid "B<EACCES>, B<EPERM>"
1516 msgstr "B<EACCES>, B<EPERM>"
1517
1518 #. type: Plain text
1519 #: build/C/man2/connect.2:146
1520 msgid ""
1521 "The user tried to connect to a broadcast address without having the socket "
1522 "broadcast flag enabled or the connection request failed because of a local "
1523 "firewall rule."
1524 msgstr ""
1525 "ソケットのブロードキャスト・フラグが有効になっていないのに ユーザがブロード"
1526 "キャストへ接続を試みた。または、ローカルのファイアウォールの 規則により接続の"
1527 "要求が失敗した。"
1528
1529 #. type: Plain text
1530 #: build/C/man2/connect.2:149
1531 msgid "Local address is already in use."
1532 msgstr "ローカルアドレスが既に使用されている。"
1533
1534 #. type: TP
1535 #: build/C/man2/connect.2:149 build/C/man2/socket.2:322
1536 #: build/C/man2/socketpair.2:73
1537 #, no-wrap
1538 msgid "B<EAFNOSUPPORT>"
1539 msgstr "B<EAFNOSUPPORT>"
1540
1541 #. type: Plain text
1542 #: build/C/man2/connect.2:154
1543 msgid ""
1544 "The passed address didn't have the correct address family in its "
1545 "I<sa_family> field."
1546 msgstr ""
1547 "渡されたアドレスの I<sa_family> フィールドが正しいアドレス・ファミリーではな"
1548 "い。"
1549
1550 #. type: TP
1551 #: build/C/man2/connect.2:154
1552 #, no-wrap
1553 msgid "B<EAGAIN>"
1554 msgstr "B<EAGAIN>"
1555
1556 #. type: Plain text
1557 #: build/C/man2/connect.2:163
1558 msgid ""
1559 "No more free local ports or insufficient entries in the routing cache.  For "
1560 "B<AF_INET> see the description of I</proc/sys/net/ipv4/ip_local_port_range> "
1561 "B<ip>(7)  for information on how to increase the number of local ports."
1562 msgstr ""
1563 "使用可能なローカルのポートがないか、 ルーティングキャッシュに十分なエントリが"
1564 "ない。 B<AF_INET> の場合に、ローカルポートの数を増やす方法については、 B<ip>"
1565 "(7)  の I</proc/sys/net/ipv4/ip_local_port_range> の説明を参照のこと。"
1566
1567 #. type: TP
1568 #: build/C/man2/connect.2:163
1569 #, no-wrap
1570 msgid "B<EALREADY>"
1571 msgstr "B<EALREADY>"
1572
1573 #. type: Plain text
1574 #: build/C/man2/connect.2:167
1575 msgid ""
1576 "The socket is nonblocking and a previous connection attempt has not yet been "
1577 "completed."
1578 msgstr ""
1579 "ソケットが非停止 (nonblocking) に設定されており、 前の接続が完了していない。"
1580
1581 #. type: Plain text
1582 #: build/C/man2/connect.2:170
1583 msgid "The file descriptor is not a valid index in the descriptor table."
1584 msgstr ""
1585 "ファイルディスクリプターがディスクリプターテーブルの 有効なインデックスではな"
1586 "い。"
1587
1588 #. type: TP
1589 #: build/C/man2/connect.2:170 build/C/man2/recv.2:410
1590 #, no-wrap
1591 msgid "B<ECONNREFUSED>"
1592 msgstr "B<ECONNREFUSED>"
1593
1594 #. type: Plain text
1595 #: build/C/man2/connect.2:173
1596 msgid "No-one listening on the remote address."
1597 msgstr "リモートアドレスで接続を待っているプログラムがない。"
1598
1599 #. type: Plain text
1600 #: build/C/man2/connect.2:176
1601 msgid "The socket structure address is outside the user's address space."
1602 msgstr "ソケット構造体のアドレスがユーザーのアドレス空間外にある。"
1603
1604 #. type: TP
1605 #: build/C/man2/connect.2:176
1606 #, no-wrap
1607 msgid "B<EINPROGRESS>"
1608 msgstr "B<EINPROGRESS>"
1609
1610 #. type: Plain text
1611 #: build/C/man2/connect.2:201
1612 msgid ""
1613 "The socket is nonblocking and the connection cannot be completed "
1614 "immediately.  It is possible to B<select>(2)  or B<poll>(2)  for completion "
1615 "by selecting the socket for writing.  After B<select>(2)  indicates "
1616 "writability, use B<getsockopt>(2)  to read the B<SO_ERROR> option at level "
1617 "B<SOL_SOCKET> to determine whether B<connect>()  completed successfully "
1618 "(B<SO_ERROR> is zero) or unsuccessfully (B<SO_ERROR> is one of the usual "
1619 "error codes listed here, explaining the reason for the failure)."
1620 msgstr ""
1621 "ソケットが非停止 (nonblocking) に設定されていて、接続をすぐに 完了することが"
1622 "できない。その場合、 B<select>(2)  や B<poll>(2)  を使ってそのソケットが書き"
1623 "込み可能になるのを待つことで、 接続の完了を知ることができる。 B<select>(2)  "
1624 "で書き込み可能になった後に、 B<getsockopt>(2)  を使って B<SOL_SOCKET> レベル"
1625 "で B<SO_ERROR> オプションを読み出すこ とにより、 B<connect>()  が成功したか、"
1626 "失敗したかを判断できる。 成功の場合 B<SO_ERROR> が 0 であり、 失敗の場合 "
1627 "B<SO_ERROR> がここのリストにあるいずれかのエラーコードであり、 それにより失敗"
1628 "の原因が分かる。"
1629
1630 #.  For TCP, the connection will complete asynchronously.
1631 #.  See http://lkml.org/lkml/2005/7/12/254
1632 #. type: Plain text
1633 #: build/C/man2/connect.2:207
1634 msgid ""
1635 "The system call was interrupted by a signal that was caught; see B<signal>"
1636 "(7)."
1637 msgstr ""
1638 "捕捉されたシグナルによりシステムコールが中断された。 B<signal>(7)  参照。"
1639
1640 #. type: TP
1641 #: build/C/man2/connect.2:207 build/C/man2/send.2:318
1642 #, no-wrap
1643 msgid "B<EISCONN>"
1644 msgstr "B<EISCONN>"
1645
1646 #. type: Plain text
1647 #: build/C/man2/connect.2:210
1648 msgid "The socket is already connected."
1649 msgstr "ソケットは既に接続 (connect) されている。"
1650
1651 #. type: TP
1652 #: build/C/man2/connect.2:210
1653 #, no-wrap
1654 msgid "B<ENETUNREACH>"
1655 msgstr "B<ENETUNREACH>"
1656
1657 #. type: Plain text
1658 #: build/C/man2/connect.2:213
1659 msgid "Network is unreachable."
1660 msgstr "到達できないネットワークである。"
1661
1662 #. type: Plain text
1663 #: build/C/man2/connect.2:216
1664 msgid "The file descriptor is not associated with a socket."
1665 msgstr "ファイルディスクリプターがソケットと関連付けられていない。"
1666
1667 #. type: TP
1668 #: build/C/man2/connect.2:216
1669 #, no-wrap
1670 msgid "B<ETIMEDOUT>"
1671 msgstr "B<ETIMEDOUT>"
1672
1673 #. type: Plain text
1674 #: build/C/man2/connect.2:223
1675 msgid ""
1676 "Timeout while attempting connection.  The server may be too busy to accept "
1677 "new connections.  Note that for IP sockets the timeout may be very long when "
1678 "syncookies are enabled on the server."
1679 msgstr ""
1680 "接続を試みている途中で時間切れ (timeout) になった。サーバーが混雑していて 新"
1681 "たな接続を受け入れられないのかもしれない。 IP ソケットでは、 syncookie がサー"
1682 "バーで有効になっている場合、 タイムアウトが非常に長くなる場合があるので注意す"
1683 "ること。"
1684
1685 #.  SVr4 documents the additional
1686 #.  general error codes
1687 #.  .BR EADDRNOTAVAIL ,
1688 #.  .BR EINVAL ,
1689 #.  .BR EAFNOSUPPORT ,
1690 #.  .BR EALREADY ,
1691 #.  .BR EINTR ,
1692 #.  .BR EPROTOTYPE ,
1693 #.  and
1694 #.  .BR ENOSR .
1695 #.  It also
1696 #.  documents many additional error conditions not described here.
1697 #. type: Plain text
1698 #: build/C/man2/connect.2:239
1699 msgid ""
1700 "SVr4, 4.4BSD, (the B<connect>()  function first appeared in 4.2BSD), "
1701 "POSIX.1-2001."
1702 msgstr ""
1703 "SVr4, 4.4BSD, (B<connect>()  関数は 4.2BSD で最初に登場した), POSIX.1-2001."
1704
1705 #. type: Plain text
1706 #: build/C/man2/connect.2:256
1707 msgid ""
1708 "The third argument of B<connect>()  is in reality an I<int> (and this is "
1709 "what 4.x BSD and libc4 and libc5 have).  Some POSIX confusion resulted in "
1710 "the present I<socklen_t>, also used by glibc.  See also B<accept>(2)."
1711 msgstr ""
1712 "B<connect>()  の三番目の引き数は 4.x BSD や libc4, libc5 と同様に実際には "
1713 "I<int> である。 POSIX では紆余曲折を経て現在の I<socklen_t> になっており、 "
1714 "glibc でも I<socklen_t> を使っている。 B<accept>(2)  も参照のこと。"
1715
1716 #. type: Plain text
1717 #: build/C/man2/connect.2:261
1718 msgid "An example of the use of B<connect>()  is shown in B<getaddrinfo>(3)."
1719 msgstr "B<connect>()  の利用例が B<getaddrinfo>(3)  に記載されている。"
1720
1721 #. type: Plain text
1722 #: build/C/man2/connect.2:267
1723 msgid ""
1724 "B<accept>(2), B<bind>(2), B<getsockname>(2), B<listen>(2), B<socket>(2), "
1725 "B<path_resolution>(7)"
1726 msgstr ""
1727 "B<accept>(2), B<bind>(2), B<getsockname>(2), B<listen>(2), B<socket>(2), "
1728 "B<path_resolution>(7)"
1729
1730 #. type: TH
1731 #: build/C/man3/getifaddrs.3:33
1732 #, no-wrap
1733 msgid "GETIFADDRS"
1734 msgstr "GETIFADDRS"
1735
1736 #. type: TH
1737 #: build/C/man3/getifaddrs.3:33
1738 #, no-wrap
1739 msgid "2010-10-06"
1740 msgstr "2010-10-06"
1741
1742 #. type: TH
1743 #: build/C/man3/getifaddrs.3:33
1744 #, no-wrap
1745 msgid "GNU"
1746 msgstr "GNU"
1747
1748 #. type: Plain text
1749 #: build/C/man3/getifaddrs.3:36
1750 msgid "getifaddrs, freeifaddrs - get interface addresses"
1751 msgstr "getifaddrs, freeifaddrs - get interface addresses"
1752
1753 #. type: Plain text
1754 #: build/C/man3/getifaddrs.3:40
1755 #, no-wrap
1756 msgid ""
1757 "B<#include E<lt>sys/types.hE<gt>>\n"
1758 "B<#include E<lt>ifaddrs.hE<gt>>\n"
1759 msgstr ""
1760 "B<#include E<lt>sys/types.hE<gt>>\n"
1761 "B<#include E<lt>ifaddrs.hE<gt>>\n"
1762
1763 #. type: Plain text
1764 #: build/C/man3/getifaddrs.3:42
1765 #, no-wrap
1766 msgid "B<int getifaddrs(struct ifaddrs **>I<ifap>B<);>\n"
1767 msgstr "B<int getifaddrs(struct ifaddrs **>I<ifap>B<);>\n"
1768
1769 #. type: Plain text
1770 #: build/C/man3/getifaddrs.3:44
1771 #, no-wrap
1772 msgid "B<void freeifaddrs(struct ifaddrs *>I<ifa>B<);>\n"
1773 msgstr "B<void freeifaddrs(struct ifaddrs *>I<ifa>B<);>\n"
1774
1775 #. type: Plain text
1776 #: build/C/man3/getifaddrs.3:55
1777 msgid ""
1778 "The B<getifaddrs>()  function creates a linked list of structures describing "
1779 "the network interfaces of the local system, and stores the address of the "
1780 "first item of the list in I<*ifap>.  The list consists of I<ifaddrs> "
1781 "structures, defined as follows:"
1782 msgstr ""
1783 "The B<getifaddrs>()  function creates a linked list of structures describing "
1784 "the network interfaces of the local system, and stores the address of the "
1785 "first item of the list in I<*ifap>.  The list consists of I<ifaddrs> "
1786 "structures, defined as follows:"
1787
1788 #. type: Plain text
1789 #: build/C/man3/getifaddrs.3:74
1790 #, no-wrap
1791 msgid ""
1792 "struct ifaddrs {\n"
1793 "    struct ifaddrs  *ifa_next;    /* Next item in list */\n"
1794 "    char            *ifa_name;    /* Name of interface */\n"
1795 "    unsigned int     ifa_flags;   /* Flags from SIOCGIFFLAGS */\n"
1796 "    struct sockaddr *ifa_addr;    /* Address of interface */\n"
1797 "    struct sockaddr *ifa_netmask; /* Netmask of interface */\n"
1798 "    union {\n"
1799 "        struct sockaddr *ifu_broadaddr;\n"
1800 "                         /* Broadcast address of interface */\n"
1801 "        struct sockaddr *ifu_dstaddr;\n"
1802 "                         /* Point-to-point destination address */\n"
1803 "    } ifa_ifu;\n"
1804 "#define              ifa_broadaddr ifa_ifu.ifu_broadaddr\n"
1805 "#define              ifa_dstaddr   ifa_ifu.ifu_dstaddr\n"
1806 "    void            *ifa_data;    /* Address-specific data */\n"
1807 "};\n"
1808 msgstr ""
1809 "struct ifaddrs {\n"
1810 "    struct ifaddrs  *ifa_next;    /* Next item in list */\n"
1811 "    char            *ifa_name;    /* Name of interface */\n"
1812 "    unsigned int     ifa_flags;   /* Flags from SIOCGIFFLAGS */\n"
1813 "    struct sockaddr *ifa_addr;    /* Address of interface */\n"
1814 "    struct sockaddr *ifa_netmask; /* Netmask of interface */\n"
1815 "    union {\n"
1816 "        struct sockaddr *ifu_broadaddr;\n"
1817 "                         /* Broadcast address of interface */\n"
1818 "        struct sockaddr *ifu_dstaddr;\n"
1819 "                         /* Point-to-point destination address */\n"
1820 "    } ifa_ifu;\n"
1821 "#define              ifa_broadaddr ifa_ifu.ifu_broadaddr\n"
1822 "#define              ifa_dstaddr   ifa_ifu.ifu_dstaddr\n"
1823 "    void            *ifa_data;    /* Address-specific data */\n"
1824 "};\n"
1825
1826 #. type: Plain text
1827 #: build/C/man3/getifaddrs.3:81
1828 msgid ""
1829 "The I<ifa_next> field contains a pointer to the next structure on the list, "
1830 "or NULL if this is the last item of the list."
1831 msgstr ""
1832 "The I<ifa_next> field contains a pointer to the next structure on the list, "
1833 "or NULL if this is the last item of the list."
1834
1835 #.  The constant
1836 #.  .B IF NAMESIZE
1837 #.  indicates the maximum length of this field.
1838 #. type: Plain text
1839 #: build/C/man3/getifaddrs.3:88
1840 msgid "The I<ifa_name> points to the null-terminated interface name."
1841 msgstr "The I<ifa_name> points to the null-terminated interface name."
1842
1843 #. type: Plain text
1844 #: build/C/man3/getifaddrs.3:97
1845 msgid ""
1846 "The I<ifa_flags> field contains the interface flags, as returned by the "
1847 "B<SIOCGIFFLAGS> B<ioctl>(2)  operation (see B<netdevice>(7)  for a list of "
1848 "these flags)."
1849 msgstr ""
1850 "The I<ifa_flags> field contains the interface flags, as returned by the "
1851 "B<SIOCGIFFLAGS> B<ioctl>(2)  operation (see B<netdevice>(7)  for a list of "
1852 "these flags)."
1853
1854 #. type: Plain text
1855 #: build/C/man3/getifaddrs.3:105
1856 msgid ""
1857 "The I<ifa_addr> field points to a structure containing the interface "
1858 "address.  (The I<sa_family> subfield should be consulted to determine the "
1859 "format of the address structure.)"
1860 msgstr ""
1861 "The I<ifa_addr> field points to a structure containing the interface "
1862 "address.  (The I<sa_family> subfield should be consulted to determine the "
1863 "format of the address structure.)"
1864
1865 #. type: Plain text
1866 #: build/C/man3/getifaddrs.3:111
1867 msgid ""
1868 "The I<ifa_netmask> field points to a structure containing the netmask "
1869 "associated with I<ifa_addr>, if applicable for the address family."
1870 msgstr ""
1871 "The I<ifa_netmask> field points to a structure containing the netmask "
1872 "associated with I<ifa_addr>, if applicable for the address family."
1873
1874 #. type: Plain text
1875 #: build/C/man3/getifaddrs.3:126
1876 msgid ""
1877 "Depending on whether the bit B<IFF_BROADCAST> or B<IFF_POINTOPOINT> is set "
1878 "in I<ifa_flags> (only one can be set at a time), either I<ifa_broadaddr> "
1879 "will contain the broadcast address associated with I<ifa_addr> (if "
1880 "applicable for the address family) or I<ifa_dstaddr> will contain the "
1881 "destination address of the point-to-point interface."
1882 msgstr ""
1883 "Depending on whether the bit B<IFF_BROADCAST> or B<IFF_POINTOPOINT> is set "
1884 "in I<ifa_flags> (only one can be set at a time), either I<ifa_broadaddr> "
1885 "will contain the broadcast address associated with I<ifa_addr> (if "
1886 "applicable for the address family) or I<ifa_dstaddr> will contain the "
1887 "destination address of the point-to-point interface."
1888
1889 #. type: Plain text
1890 #: build/C/man3/getifaddrs.3:131
1891 msgid ""
1892 "The I<ifa_data> field points to a buffer containing address-family-specific "
1893 "data; this field may be NULL if there is no such data for this interface."
1894 msgstr ""
1895 "The I<ifa_data> field points to a buffer containing address-family-specific "
1896 "data; this field may be NULL if there is no such data for this interface."
1897
1898 #. type: Plain text
1899 #: build/C/man3/getifaddrs.3:137
1900 msgid ""
1901 "The data returned by B<getifaddrs>()  is dynamically allocated and should be "
1902 "freed using B<freeifaddrs>()  when no longer needed."
1903 msgstr ""
1904 "The data returned by B<getifaddrs>()  is dynamically allocated and should be "
1905 "freed using B<freeifaddrs>()  when no longer needed."
1906
1907 #. type: Plain text
1908 #: build/C/man3/getifaddrs.3:144
1909 msgid ""
1910 "On success, B<getifaddrs>()  returns zero; on error, -1 is returned, and "
1911 "I<errno> is set appropriately."
1912 msgstr ""
1913 "On success, B<getifaddrs>()  returns zero; on error, -1 is returned, and "
1914 "I<errno> is set appropriately."
1915
1916 #. type: Plain text
1917 #: build/C/man3/getifaddrs.3:157
1918 msgid ""
1919 "B<getifaddrs>()  may fail and set I<errno> for any of the errors specified "
1920 "for B<socket>(2), B<bind>(2), B<getsockname>(2), B<recvmsg>(2), B<sendto>"
1921 "(2), B<malloc>(3), or B<realloc>(3)."
1922 msgstr ""
1923 "B<getifaddrs>()  may fail and set I<errno> for any of the errors specified "
1924 "for B<socket>(2), B<bind>(2), B<getsockname>(2), B<recvmsg>(2), B<sendto>"
1925 "(2), B<malloc>(3), or B<realloc>(3)."
1926
1927 #. type: Plain text
1928 #: build/C/man3/getifaddrs.3:165
1929 msgid ""
1930 "The B<getifaddrs>()  function first appeared in glibc 2.3, but before glibc "
1931 "2.3.3, the implementation only supported IPv4 addresses; IPv6 support was "
1932 "added in glibc 2.3.3.  Support of address families other than IPv4 is only "
1933 "available on kernels that support netlink."
1934 msgstr ""
1935 "The B<getifaddrs>()  function first appeared in glibc 2.3, but before glibc "
1936 "2.3.3, the implementation only supported IPv4 addresses; IPv6 support was "
1937 "added in glibc 2.3.3.  Support of address families other than IPv4 is only "
1938 "available on kernels that support netlink."
1939
1940 #.  , but the BSD-derived documentation generally
1941 #.  appears to be confused and obsolete on this point.
1942 #.  i.e., commonly it still says one of them will be NULL, even if
1943 #.  the ifa_ifu union is already present
1944 #. type: Plain text
1945 #: build/C/man3/getifaddrs.3:185
1946 msgid ""
1947 "Not in POSIX.1-2001.  This function first appeared in BSDi and is present on "
1948 "the BSD systems, but with slightly different semantics documented"
1949 "\\(emreturning one entry per interface, not per address.  This means "
1950 "I<ifa_addr> and other fields can actually be NULL if the interface has no "
1951 "address, and no link-level address is returned if the interface has an IP "
1952 "address assigned.  Also, the way of choosing either I<ifa_broadaddr> or "
1953 "I<ifa_dstaddr> differs on various systems."
1954 msgstr ""
1955 "Not in POSIX.1-2001.  This function first appeared in BSDi and is present on "
1956 "the BSD systems, but with slightly different semantics documented"
1957 "\\(emreturning one entry per interface, not per address.  This means "
1958 "I<ifa_addr> and other fields can actually be NULL if the interface has no "
1959 "address, and no link-level address is returned if the interface has an IP "
1960 "address assigned.  Also, the way of choosing either I<ifa_broadaddr> or "
1961 "I<ifa_dstaddr> differs on various systems."
1962
1963 #. type: Plain text
1964 #: build/C/man3/getifaddrs.3:198
1965 msgid ""
1966 "The addresses returned on Linux will usually be the IPv4 and IPv6 addresses "
1967 "assigned to the interface, but also one B<AF_PACKET> address per interface "
1968 "containing lower-level details about the interface and its physical layer.  "
1969 "In this case, the I<ifa_data> field may contain a pointer to a I<struct "
1970 "net_device_stats>, defined in I<E<lt>linux/netdevice.hE<gt>>, which contains "
1971 "various interface attributes and statistics."
1972 msgstr ""
1973 "The addresses returned on Linux will usually be the IPv4 and IPv6 addresses "
1974 "assigned to the interface, but also one B<AF_PACKET> address per interface "
1975 "containing lower-level details about the interface and its physical layer.  "
1976 "In this case, the I<ifa_data> field may contain a pointer to a I<struct "
1977 "net_device_stats>, defined in I<E<lt>linux/netdevice.hE<gt>>, which contains "
1978 "various interface attributes and statistics."
1979
1980 #. type: Plain text
1981 #: build/C/man3/getifaddrs.3:205
1982 msgid ""
1983 "The program below demonstrates the use of B<getifaddrs>(), B<freeifaddrs>(), "
1984 "and B<getnameinfo>(3).  Here is what we see when running this program on one "
1985 "system:"
1986 msgstr ""
1987 "The program below demonstrates the use of B<getifaddrs>(), B<freeifaddrs>(), "
1988 "and B<getnameinfo>(3).  Here is what we see when running this program on one "
1989 "system:"
1990
1991 #. type: Plain text
1992 #: build/C/man3/getifaddrs.3:219
1993 #, no-wrap
1994 msgid ""
1995 "$ B<./a.out>\n"
1996 "lo      address family: 17 (AF_PACKET)\n"
1997 "eth0    address family: 17 (AF_PACKET)\n"
1998 "lo      address family: 2 (AF_INET)\n"
1999 "        address: E<lt>127.0.0.1E<gt>\n"
2000 "eth0    address family: 2 (AF_INET)\n"
2001 "        address: E<lt>10.1.1.4E<gt>\n"
2002 "lo      address family: 10 (AF_INET6)\n"
2003 "        address: E<lt>::1E<gt>\n"
2004 "eth0    address family: 10 (AF_INET6)\n"
2005 "        address: E<lt>fe80::2d0:59ff:feda:eb51%eth0E<gt>\n"
2006 msgstr ""
2007 "$ B<./a.out>\n"
2008 "lo      address family: 17 (AF_PACKET)\n"
2009 "eth0    address family: 17 (AF_PACKET)\n"
2010 "lo      address family: 2 (AF_INET)\n"
2011 "        address: E<lt>127.0.0.1E<gt>\n"
2012 "eth0    address family: 2 (AF_INET)\n"
2013 "        address: E<lt>10.1.1.4E<gt>\n"
2014 "lo      address family: 10 (AF_INET6)\n"
2015 "        address: E<lt>::1E<gt>\n"
2016 "eth0    address family: 10 (AF_INET6)\n"
2017 "        address: E<lt>fe80::2d0:59ff:feda:eb51%eth0E<gt>\n"
2018
2019 #. type: SS
2020 #: build/C/man3/getifaddrs.3:221
2021 #, no-wrap
2022 msgid "Program source"
2023 msgstr "Program source"
2024
2025 #. type: Plain text
2026 #: build/C/man3/getifaddrs.3:231
2027 #, no-wrap
2028 msgid ""
2029 "#include E<lt>arpa/inet.hE<gt>\n"
2030 "#include E<lt>sys/socket.hE<gt>\n"
2031 "#include E<lt>netdb.hE<gt>\n"
2032 "#include E<lt>ifaddrs.hE<gt>\n"
2033 "#include E<lt>stdio.hE<gt>\n"
2034 "#include E<lt>stdlib.hE<gt>\n"
2035 "#include E<lt>unistd.hE<gt>\n"
2036 msgstr ""
2037 "#include E<lt>arpa/inet.hE<gt>\n"
2038 "#include E<lt>sys/socket.hE<gt>\n"
2039 "#include E<lt>netdb.hE<gt>\n"
2040 "#include E<lt>ifaddrs.hE<gt>\n"
2041 "#include E<lt>stdio.hE<gt>\n"
2042 "#include E<lt>stdlib.hE<gt>\n"
2043 "#include E<lt>unistd.hE<gt>\n"
2044
2045 #. type: Plain text
2046 #: build/C/man3/getifaddrs.3:238
2047 #, no-wrap
2048 msgid ""
2049 "int\n"
2050 "main(int argc, char *argv[])\n"
2051 "{\n"
2052 "    struct ifaddrs *ifaddr, *ifa;\n"
2053 "    int family, s;\n"
2054 "    char host[NI_MAXHOST];\n"
2055 msgstr ""
2056 "int\n"
2057 "main(int argc, char *argv[])\n"
2058 "{\n"
2059 "    struct ifaddrs *ifaddr, *ifa;\n"
2060 "    int family, s;\n"
2061 "    char host[NI_MAXHOST];\n"
2062
2063 #. type: Plain text
2064 #: build/C/man3/getifaddrs.3:243
2065 #, no-wrap
2066 msgid ""
2067 "    if (getifaddrs(&ifaddr) == -1) {\n"
2068 "        perror(\"getifaddrs\");\n"
2069 "        exit(EXIT_FAILURE);\n"
2070 "    }\n"
2071 msgstr ""
2072 "    if (getifaddrs(&ifaddr) == -1) {\n"
2073 "        perror(\"getifaddrs\");\n"
2074 "        exit(EXIT_FAILURE);\n"
2075 "    }\n"
2076
2077 #. type: Plain text
2078 #: build/C/man3/getifaddrs.3:246
2079 #, no-wrap
2080 msgid ""
2081 "    /* Walk through linked list, maintaining head pointer so we\n"
2082 "       can free list later */\n"
2083 msgstr ""
2084 "    /* Walk through linked list, maintaining head pointer so we\n"
2085 "       can free list later */\n"
2086
2087 #. type: Plain text
2088 #: build/C/man3/getifaddrs.3:250
2089 #, no-wrap
2090 msgid ""
2091 "    for (ifa = ifaddr; ifa != NULL; ifa = ifa-E<gt>ifa_next) {\n"
2092 "        if (ifa-E<gt>ifa_addr == NULL)\n"
2093 "            continue;\n"
2094 msgstr ""
2095 "    for (ifa = ifaddr; ifa != NULL; ifa = ifa-E<gt>ifa_next) {\n"
2096 "        if (ifa-E<gt>ifa_addr == NULL)\n"
2097 "            continue;\n"
2098
2099 #. type: Plain text
2100 #: build/C/man3/getifaddrs.3:252
2101 #, no-wrap
2102 msgid "        family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n"
2103 msgstr "        family = ifa-E<gt>ifa_addr-E<gt>sa_family;\n"
2104
2105 #. type: Plain text
2106 #: build/C/man3/getifaddrs.3:255
2107 #, no-wrap
2108 msgid ""
2109 "        /* Display interface name and family (including symbolic\n"
2110 "           form of the latter for the common families) */\n"
2111 msgstr ""
2112 "        /* Display interface name and family (including symbolic\n"
2113 "           form of the latter for the common families) */\n"
2114
2115 #. type: Plain text
2116 #: build/C/man3/getifaddrs.3:261
2117 #, no-wrap
2118 msgid ""
2119 "        printf(\"%s\\t  address family: %d%s\\en\",\n"
2120 "                ifa-E<gt>ifa_name, family,\n"
2121 "                (family == AF_PACKET) ? \" (AF_PACKET)\" :\n"
2122 "                (family == AF_INET) ?   \" (AF_INET)\" :\n"
2123 "                (family == AF_INET6) ?  \" (AF_INET6)\" : \"\");\n"
2124 msgstr ""
2125 "        printf(\"%s\\t  address family: %d%s\\en\",\n"
2126 "                ifa-E<gt>ifa_name, family,\n"
2127 "                (family == AF_PACKET) ? \" (AF_PACKET)\" :\n"
2128 "                (family == AF_INET) ?   \" (AF_INET)\" :\n"
2129 "                (family == AF_INET6) ?  \" (AF_INET6)\" : \"\");\n"
2130
2131 #. type: Plain text
2132 #: build/C/man3/getifaddrs.3:263
2133 #, no-wrap
2134 msgid "        /* For an AF_INET* interface address, display the address */\n"
2135 msgstr "        /* For an AF_INET* interface address, display the address */\n"
2136
2137 #. type: Plain text
2138 #: build/C/man3/getifaddrs.3:276
2139 #, no-wrap
2140 msgid ""
2141 "        if (family == AF_INET || family == AF_INET6) {\n"
2142 "            s = getnameinfo(ifa-E<gt>ifa_addr,\n"
2143 "                    (family == AF_INET) ? sizeof(struct sockaddr_in) :\n"
2144 "                                          sizeof(struct sockaddr_in6),\n"
2145 "                    host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);\n"
2146 "            if (s != 0) {\n"
2147 "                printf(\"getnameinfo() failed: %s\\en\", gai_strerror(s));\n"
2148 "                exit(EXIT_FAILURE);\n"
2149 "            }\n"
2150 "            printf(\"\\etaddress: E<lt>%sE<gt>\\en\", host);\n"
2151 "        }\n"
2152 "    }\n"
2153 msgstr ""
2154 "        if (family == AF_INET || family == AF_INET6) {\n"
2155 "            s = getnameinfo(ifa-E<gt>ifa_addr,\n"
2156 "                    (family == AF_INET) ? sizeof(struct sockaddr_in) :\n"
2157 "                                          sizeof(struct sockaddr_in6),\n"
2158 "                    host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);\n"
2159 "            if (s != 0) {\n"
2160 "                printf(\"getnameinfo() failed: %s\\en\", gai_strerror(s));\n"
2161 "                exit(EXIT_FAILURE);\n"
2162 "            }\n"
2163 "            printf(\"\\etaddress: E<lt>%sE<gt>\\en\", host);\n"
2164 "        }\n"
2165 "    }\n"
2166
2167 #. type: Plain text
2168 #: build/C/man3/getifaddrs.3:280
2169 #, no-wrap
2170 msgid ""
2171 "    freeifaddrs(ifaddr);\n"
2172 "    exit(EXIT_SUCCESS);\n"
2173 "}\n"
2174 msgstr ""
2175 "    freeifaddrs(ifaddr);\n"
2176 "    exit(EXIT_SUCCESS);\n"
2177 "}\n"
2178
2179 #. type: Plain text
2180 #: build/C/man3/getifaddrs.3:286
2181 msgid ""
2182 "B<bind>(2), B<getsockname>(2), B<socket>(2), B<packet>(7), B<ifconfig>(8)"
2183 msgstr ""
2184 "B<bind>(2), B<getsockname>(2), B<socket>(2), B<packet>(7), B<ifconfig>(8)"
2185
2186 #. type: TH
2187 #: build/C/man2/getsockname.2:38
2188 #, no-wrap
2189 msgid "GETSOCKNAME"
2190 msgstr "GETSOCKNAME"
2191
2192 #. type: Plain text
2193 #: build/C/man2/getsockname.2:41
2194 msgid "getsockname - get socket name"
2195 msgstr "getsockname - ソケットの名前を取得する"
2196
2197 #. type: Plain text
2198 #: build/C/man2/getsockname.2:47
2199 #, no-wrap
2200 msgid "B<int getsockname(int >I<sockfd>B<, struct sockaddr *>I<addr>B<, socklen_t *>I<addrlen>B<);>\n"
2201 msgstr "B<int getsockname(int >I<sockfd>B<, struct sockaddr *>I<addr>B<, socklen_t *>I<addrlen>B<);>\n"
2202
2203 #. type: Plain text
2204 #: build/C/man2/getsockname.2:60
2205 msgid ""
2206 "B<getsockname>()  returns the current address to which the socket I<sockfd> "
2207 "is bound, in the buffer pointed to by I<addr>.  The I<addrlen> argument "
2208 "should be initialized to indicate the amount of space (in bytes) pointed to "
2209 "by I<addr>.  On return it contains the actual size of the socket address."
2210 msgstr ""
2211 "B<getsockname>()  は、ソケット I<sockfd> に結び付けられている現在のアドレス"
2212 "を、 I<addr> が指すバッファに格納して返す。 I<addrlen> 引き数は、 I<addr> が"
2213 "指している領域のサイズ (バイト単位) に初期化しておかなければならない。 関数が"
2214 "返る時には、 I<addrlen> にはソケットアドレスの実際のサイズ (バイト単位) が格"
2215 "納される。"
2216
2217 #. type: Plain text
2218 #: build/C/man2/getsockname.2:76 build/C/man2/getsockopt.2:140
2219 #: build/C/man2/listen.2:94
2220 msgid "The argument I<sockfd> is not a valid descriptor."
2221 msgstr "引き数 I<sockfd> は有効なディスクリプターでない。"
2222
2223 #. type: Plain text
2224 #: build/C/man2/getsockname.2:82
2225 msgid ""
2226 "The I<addr> argument points to memory not in a valid part of the process "
2227 "address space."
2228 msgstr ""
2229 "引き数 I<addr> の指しているメモリがプロセスのアドレス空間の有効な部分ではな"
2230 "い。"
2231
2232 #. type: Plain text
2233 #: build/C/man2/getsockname.2:86
2234 msgid "I<addrlen> is invalid (e.g., is negative)."
2235 msgstr "I<addrlen> が不正である (例えば、負で場合など)。"
2236
2237 #. type: TP
2238 #: build/C/man2/getsockname.2:86 build/C/man2/send.2:330
2239 #, no-wrap
2240 msgid "B<ENOBUFS>"
2241 msgstr "B<ENOBUFS>"
2242
2243 #. type: Plain text
2244 #: build/C/man2/getsockname.2:90
2245 msgid ""
2246 "Insufficient resources were available in the system to perform the operation."
2247 msgstr "処理をするだけの十分なリソースがシステムに無い。"
2248
2249 #. type: Plain text
2250 #: build/C/man2/getsockname.2:95 build/C/man2/getsockopt.2:169
2251 msgid "The argument I<sockfd> is a file, not a socket."
2252 msgstr "引き数 I<sockfd> がソケットではなくファイルである。"
2253
2254 #.  SVr4 documents additional ENOMEM
2255 #.  and ENOSR error codes.
2256 #. type: Plain text
2257 #: build/C/man2/getsockname.2:101
2258 msgid ""
2259 "SVr4, 4.4BSD (the B<getsockname>()  function call appeared in 4.2BSD), "
2260 "POSIX.1-2001."
2261 msgstr ""
2262 "SVr4, 4.4BSD (B<getsockname>()  関数は 4.2BSD で追加された), POSIX.1-2001."
2263
2264 #. type: Plain text
2265 #: build/C/man2/getsockname.2:110
2266 msgid ""
2267 "The third argument of B<getsockname>()  is in reality an I<int *> (and this "
2268 "is what 4.x BSD and libc4 and libc5 have).  Some POSIX confusion resulted in "
2269 "the present I<socklen_t>, also used by glibc.  See also B<accept>(2)."
2270 msgstr ""
2271 "B<getsockname>()  の三番目の引き数は (4.x BSD や libc4, libc5 と同様に) 実際"
2272 "には I<int *> である。 glibc でも使われている現在の I<socklen_t> に関して、 "
2273 "POSIX には少し混乱がある。 詳しくは B<accept>(2)  を参照のこと。"
2274
2275 #. type: Plain text
2276 #: build/C/man2/getsockname.2:116
2277 msgid ""
2278 "B<bind>(2), B<socket>(2), B<getifaddrs>(3), B<ip>(7), B<socket>(7), B<unix>"
2279 "(7)"
2280 msgstr ""
2281 "B<bind>(2), B<socket>(2), B<getifaddrs>(3), B<ip>(7), B<socket>(7), B<unix>"
2282 "(7)"
2283
2284 #. type: TH
2285 #: build/C/man2/getsockopt.2:42
2286 #, no-wrap
2287 msgid "GETSOCKOPT"
2288 msgstr "GETSOCKOPT"
2289
2290 #. type: Plain text
2291 #: build/C/man2/getsockopt.2:45
2292 msgid "getsockopt, setsockopt - get and set options on sockets"
2293 msgstr "getsockopt, setsockopt - ソケットのオプションの設定と取得を行なう"
2294
2295 #. type: Plain text
2296 #: build/C/man2/getsockopt.2:55
2297 #, no-wrap
2298 msgid ""
2299 "B<int getsockopt(int >I<sockfd>B<, int >I<level>B<, int >I<optname>B<,>\n"
2300 "B<               void *>I<optval>B<, socklen_t *>I<optlen>B<);>\n"
2301 "B<int setsockopt(int >I<sockfd>B<, int >I<level>B<, int >I<optname>B<,>\n"
2302 "B<               const void *>I<optval>B<, socklen_t >I<optlen>B<);>\n"
2303 msgstr ""
2304 "B<int getsockopt(int >I<sockfd>B<, int >I<level>B<, int >I<optname>B<,>\n"
2305 "B<               void *>I<optval>B<, socklen_t *>I<optlen>B<);>\n"
2306 "B<int setsockopt(int >I<sockfd>B<, int >I<level>B<, int >I<optname>B<,>\n"
2307 "B<               const void *>I<optval>B<, socklen_t >I<optlen>B<);>\n"
2308
2309 #. type: Plain text
2310 #: build/C/man2/getsockopt.2:65
2311 msgid ""
2312 "B<getsockopt>()  and B<setsockopt>()  manipulate options for the socket "
2313 "referred to by the file descriptor I<sockfd>.  Options may exist at multiple "
2314 "protocol levels; they are always present at the uppermost socket level."
2315 msgstr ""
2316 "B<getsockopt>()  と B<setsockopt>()  は、ファイルディスクリプタ I<socket> で"
2317 "参照されるソケットに関連するオプションの操作を行う。 オプションは複数のプロト"
2318 "コル層(level)に存在するかもしれないが、 これらは常に最上位のソケット層へと設"
2319 "定される。"
2320
2321 #. type: Plain text
2322 #: build/C/man2/getsockopt.2:84
2323 msgid ""
2324 "When manipulating socket options, the level at which the option resides and "
2325 "the name of the option must be specified.  To manipulate options at the "
2326 "sockets API level, I<level> is specified as B<SOL_SOCKET>.  To manipulate "
2327 "options at any other level the protocol number of the appropriate protocol "
2328 "controlling the option is supplied.  For example, to indicate that an option "
2329 "is to be interpreted by the B<TCP> protocol, I<level> should be set to the "
2330 "protocol number of B<TCP>; see B<getprotoent>(3)."
2331 msgstr ""
2332 "ソケット・オプションを操作する際には、オプションの層 (level) と オプションの"
2333 "名前を指定しなければならない。 ソケット API 層でオプションを操作する為には、 "
2334 "I<level> を B<SOL_SOCKET> に指定する。 他の全ての層でオプションを操作する為に"
2335 "は、与えられたオプションの 制御主体となるプロトコルのプロトコル番号を指定す"
2336 "る。例えば、 オプションが B<TCP> プロトコルで解釈されるべきことを指示するに"
2337 "は、 I<level> に B<TCP> のプロトコル番号を指定しなければならない。 "
2338 "B<getprotoent>(3)  を参照すること。"
2339
2340 #. type: Plain text
2341 #: build/C/man2/getsockopt.2:106
2342 msgid ""
2343 "The arguments I<optval> and I<optlen> are used to access option values for "
2344 "B<setsockopt>().  For B<getsockopt>()  they identify a buffer in which the "
2345 "value for the requested option(s) are to be returned.  For B<getsockopt>(), "
2346 "I<optlen> is a value-result argument, initially containing the size of the "
2347 "buffer pointed to by I<optval>, and modified on return to indicate the "
2348 "actual size of the value returned.  If no option value is to be supplied or "
2349 "returned, I<optval> may be NULL."
2350 msgstr ""
2351 "I<optval> と I<optlen> 引き数は B<setsockopt>()  のオプションの値にアクセスす"
2352 "るために用いられる。 B<getsockopt>()  では要求したオプションの値を返すための"
2353 "バッファーを指定する。 B<getsockopt>()  では I<optlen> は値と結果両用の引き数"
2354 "で、最初に I<optval> の指しているバッファーのサイズを与え、実際に返される値の"
2355 "サイズに 書き換えられる。もしオプション値を与えず、返されもしない場合には "
2356 "I<optval> は NULL でも良い。"
2357
2358 #. type: Plain text
2359 #: build/C/man2/getsockopt.2:116
2360 msgid ""
2361 "I<Optname> and any specified options are passed uninterpreted to the "
2362 "appropriate protocol module for interpretation.  The include file I<E<lt>sys/"
2363 "socket.hE<gt>> contains definitions for socket level options, described "
2364 "below.  Options at other protocol levels vary in format and name; consult "
2365 "the appropriate entries in section 4 of the manual."
2366 msgstr ""
2367 "I<optname> および指定されたオプションは解釈されずに、適切なプロトコル・モ"
2368 "ジュールに 渡されて解釈される。インクルード・ファイル I<E<lt>sys/socket."
2369 "hE<gt>> には後述のソケット層のオプションの定義が含まれている。 他のプロトコル"
2370 "層では名前や形式は異なる。 マニュアルのセクション 4 の適切なエントリを参照す"
2371 "ること。"
2372
2373 #. type: Plain text
2374 #: build/C/man2/getsockopt.2:125
2375 msgid ""
2376 "Most socket-level options utilize an I<int> argument for I<optval>.  For "
2377 "B<setsockopt>(), the argument should be nonzero to enable a boolean option, "
2378 "or zero if the option is to be disabled."
2379 msgstr ""
2380 "ほとんどのソケット層のオプションは I<optval> に I<int> 引き数を利用する。 "
2381 "B<setsockopt>()  で、二値(boolean)オプションを有効(enable)にするにはゼロ以外"
2382 "を指定し、 無効(disable)にするにはゼロを指定する。"
2383
2384 #. type: Plain text
2385 #: build/C/man2/getsockopt.2:129
2386 msgid ""
2387 "For a description of the available socket options see B<socket>(7)  and the "
2388 "appropriate protocol man pages."
2389 msgstr ""
2390 "利用可能なソケットオプションの説明に関しては、 B<socket>(7)  と適切なプロトコ"
2391 "ルの man ページを参照のこと。"
2392
2393 #. type: Plain text
2394 #: build/C/man2/getsockopt.2:150
2395 msgid ""
2396 "The address pointed to by I<optval> is not in a valid part of the process "
2397 "address space.  For B<getsockopt>(), this error may also be returned if "
2398 "I<optlen> is not in a valid part of the process address space."
2399 msgstr ""
2400 "I<optval> で指定されたアドレスがプロセスのアドレス空間の有効な部分ではない。 "
2401 "B<getsockopt>()  の場合、 I<optlen> がプロセスのアドレス空間の有効な部分でな"
2402 "い場合にもこのエラーが返される。"
2403
2404 #. type: Plain text
2405 #: build/C/man2/getsockopt.2:161
2406 msgid ""
2407 "I<optlen> invalid in B<setsockopt>().  In some cases this error can also "
2408 "occur for an invalid value in I<optval> (e.g., for the B<IP_ADD_MEMBERSHIP> "
2409 "option described in B<ip>(7))."
2410 msgstr ""
2411 "B<setsockopt>()  で I<option> が不正である。 I<optval> に無効な値が指定された"
2412 "場合にも、このエラーが発生する可能性がある (例えば、 B<ip>(7)  に説明がある "
2413 "B<IP_ADD_MEMBERSHIP> オプションなど)。"
2414
2415 #. type: TP
2416 #: build/C/man2/getsockopt.2:161
2417 #, no-wrap
2418 msgid "B<ENOPROTOOPT>"
2419 msgstr "B<ENOPROTOOPT>"
2420
2421 #. type: Plain text
2422 #: build/C/man2/getsockopt.2:164
2423 msgid "The option is unknown at the level indicated."
2424 msgstr "指定された層(level)にはこのオプションは存在しない。"
2425
2426 #.  SVr4 documents additional ENOMEM and ENOSR error codes, but does
2427 #.  not document the
2428 #.  .BR SO_SNDLOWAT ", " SO_RCVLOWAT ", " SO_SNDTIMEO ", " SO_RCVTIMEO
2429 #.  options
2430 #. type: Plain text
2431 #: build/C/man2/getsockopt.2:176
2432 msgid ""
2433 "SVr4, 4.4BSD (these system calls first appeared in 4.2BSD), POSIX.1-2001."
2434 msgstr ""
2435 "SVr4, 4.4BSD (これらのシステム・コールは 4.2BSD で最初に現れた), "
2436 "POSIX.1-2001."
2437
2438 #. type: Plain text
2439 #: build/C/man2/getsockopt.2:197
2440 msgid ""
2441 "The I<optlen> argument of B<getsockopt>()  and B<setsockopt>()  is in "
2442 "reality an I<int [*]> (and this is what 4.x BSD and libc4 and libc5 have).  "
2443 "Some POSIX confusion resulted in the present I<socklen_t>, also used by "
2444 "glibc.  See also B<accept>(2)."
2445 msgstr ""
2446 "B<getsockopt>()  と B<setsockopt>()  の I<optlen> 引き数は実際は I<int [*]> "
2447 "である (そして 4.x BSD と libc4 と libc5 はそうなっている)。 POSIX では紆余曲"
2448 "折を経て現在の I<socklen_t> になっており、 glibc でも I<socklen_t> を使ってい"
2449 "る。 B<accept>(2)  も参照のこと。"
2450
2451 #. type: Plain text
2452 #: build/C/man2/getsockopt.2:200
2453 msgid ""
2454 "Several of the socket options should be handled at lower levels of the "
2455 "system."
2456 msgstr ""
2457 "ソケットのオプションのいくつかはシステムのより低い層で 処理されるべきである。"
2458
2459 #. type: Plain text
2460 #: build/C/man2/getsockopt.2:207
2461 msgid ""
2462 "B<ioctl>(2), B<socket>(2), B<getprotoent>(3), B<protocols>(5), B<socket>(7), "
2463 "B<tcp>(7), B<unix>(7)"
2464 msgstr ""
2465 "B<ioctl>(2), B<socket>(2), B<getprotoent>(3), B<protocols>(5), B<socket>(7), "
2466 "B<tcp>(7), B<unix>(7)"
2467
2468 #. type: TH
2469 #: build/C/man2/listen.2:43
2470 #, no-wrap
2471 msgid "LISTEN"
2472 msgstr "LISTEN"
2473
2474 #. type: TH
2475 #: build/C/man2/listen.2:43
2476 #, no-wrap
2477 msgid "2008-11-20"
2478 msgstr "2008-11-20"
2479
2480 #. type: Plain text
2481 #: build/C/man2/listen.2:46
2482 msgid "listen - listen for connections on a socket"
2483 msgstr "listen - ソケット(socket)上の接続を待つ"
2484
2485 #. type: Plain text
2486 #: build/C/man2/listen.2:53
2487 #, no-wrap
2488 msgid "B<int listen(int >I<sockfd>B<, int >I<backlog>B<);>\n"
2489 msgstr "B<int listen(int >I<sockfd>B<, int >I<backlog>B<);>\n"
2490
2491 #. type: Plain text
2492 #: build/C/man2/listen.2:61
2493 msgid ""
2494 "B<listen>()  marks the socket referred to by I<sockfd> as a passive socket, "
2495 "that is, as a socket that will be used to accept incoming connection "
2496 "requests using B<accept>(2)."
2497 msgstr ""
2498 "B<listen>()  は I<sockfd> が参照するソケットを接続待ちソケット (passive "
2499 "socket) として印をつける。 接続待ちソケットとは、 B<accept>(2)  を使って到着"
2500 "した接続要求を受け付けるのに使用されるソケットである。"
2501
2502 #. type: Plain text
2503 #: build/C/man2/listen.2:68
2504 msgid ""
2505 "The I<sockfd> argument is a file descriptor that refers to a socket of type "
2506 "B<SOCK_STREAM> or B<SOCK_SEQPACKET>."
2507 msgstr ""
2508 "I<sockfd> 引き数は、 B<SOCK_STREAM> 型か B<SOCK_SEQPACKET> 型のソケットを参照"
2509 "するファイルディスクリプタである。"
2510
2511 #. type: Plain text
2512 #: build/C/man2/listen.2:80
2513 msgid ""
2514 "The I<backlog> argument defines the maximum length to which the queue of "
2515 "pending connections for I<sockfd> may grow.  If a connection request arrives "
2516 "when the queue is full, the client may receive an error with an indication "
2517 "of B<ECONNREFUSED> or, if the underlying protocol supports retransmission, "
2518 "the request may be ignored so that a later reattempt at connection succeeds."
2519 msgstr ""
2520 "I<backlog> 引き数は、 I<sockfd> についての保留中の接続のキューの最大長を指定"
2521 "する。 キューがいっぱいの状態で接続要求が到着すると、クライアントは "
2522 "B<ECONNREFUSED> というエラーを受け取る。下位層のプロトコルが再送信をサポート "
2523 "していれば、要求は無視され、これ以降の接続要求の再送信が成功するかもしれな"
2524 "い。"
2525
2526 #. type: Plain text
2527 #: build/C/man2/listen.2:89
2528 msgid "Another socket is already listening on the same port."
2529 msgstr "別のソケットが既に同じポートを listen している。"
2530
2531 #. type: Plain text
2532 #: build/C/man2/listen.2:99 build/C/man2/send.2:349
2533 msgid "The argument I<sockfd> is not a socket."
2534 msgstr "引き数 I<sockfd> はソケットではない。"
2535
2536 #. type: Plain text
2537 #: build/C/man2/listen.2:104
2538 msgid "The socket is not of a type that supports the B<listen>()  operation."
2539 msgstr "ソケットは B<listen>()  がサポートしている型ではない。"
2540
2541 #. type: Plain text
2542 #: build/C/man2/listen.2:109
2543 msgid ""
2544 "4.4BSD, POSIX.1-2001.  The B<listen>()  function call first appeared in "
2545 "4.2BSD."
2546 msgstr "4.4BSD, POSIX.1-2001.  B<listen>()  関数は 4.2BSDで初めて実装された。"
2547
2548 #. type: Plain text
2549 #: build/C/man2/listen.2:111
2550 msgid "To accept connections, the following steps are performed:"
2551 msgstr "接続を受け付けるには、以下の処理が実行される。"
2552
2553 #. type: TP
2554 #: build/C/man2/listen.2:112 build/C/man2/select_tut.2:345
2555 #, no-wrap
2556 msgid "1."
2557 msgstr "1."
2558
2559 #. type: Plain text
2560 #: build/C/man2/listen.2:115
2561 msgid "A socket is created with B<socket>(2)."
2562 msgstr "B<socket>(2)  でソケットを作成する。"
2563
2564 #. type: TP
2565 #: build/C/man2/listen.2:115 build/C/man2/select_tut.2:354
2566 #, no-wrap
2567 msgid "2."
2568 msgstr "2."
2569
2570 #. type: Plain text
2571 #: build/C/man2/listen.2:121
2572 msgid ""
2573 "The socket is bound to a local address using B<bind>(2), so that other "
2574 "sockets may be B<connect>(2)ed to it."
2575 msgstr ""
2576 "B<bind>(2)  を使ってソケットにローカルアドレスを割り当てて、 他のソケットがこ"
2577 "のソケットに B<connect>(2)  できるようにする。"
2578
2579 #. type: TP
2580 #: build/C/man2/listen.2:121 build/C/man2/select_tut.2:358
2581 #, no-wrap
2582 msgid "3."
2583 msgstr "3."
2584
2585 #. type: Plain text
2586 #: build/C/man2/listen.2:125
2587 msgid ""
2588 "A willingness to accept incoming connections and a queue limit for incoming "
2589 "connections are specified with B<listen>()."
2590 msgstr ""
2591 "B<listen>()  を使って、接続要求を受け付ける意志と接続要求を入れるキュー長を指"
2592 "定する。"
2593
2594 #. type: TP
2595 #: build/C/man2/listen.2:125 build/C/man2/select_tut.2:365
2596 #, no-wrap
2597 msgid "4."
2598 msgstr "4."
2599
2600 #. type: Plain text
2601 #: build/C/man2/listen.2:128
2602 msgid "Connections are accepted with B<accept>(2)."
2603 msgstr "B<accept>(2)  を使って接続を受け付ける。"
2604
2605 #. type: Plain text
2606 #: build/C/man2/listen.2:151
2607 msgid ""
2608 "The behavior of the I<backlog> argument on TCP sockets changed with Linux "
2609 "2.2.  Now it specifies the queue length for I<completely> established "
2610 "sockets waiting to be accepted, instead of the number of incomplete "
2611 "connection requests.  The maximum length of the queue for incomplete sockets "
2612 "can be set using I</proc/sys/net/ipv4/tcp_max_syn_backlog>.  When syncookies "
2613 "are enabled there is no logical maximum length and this setting is ignored.  "
2614 "See B<tcp>(7)  for more information."
2615 msgstr ""
2616 "TCP ソケットでの I<backlog> 引き数の振る舞いは Linux 2.2 で変更された。 現在"
2617 "ではこの引き数は、 受け付けられるのを待っている、 I<完全に> 確立されたソケッ"
2618 "トのキューの長さを指定する。 以前は不完全な接続要求の数であったが、これを置き"
2619 "換えた。 不完全なソケットのキューの最大長は I</proc/sys/net/ipv4/"
2620 "tcp_max_syn_backlog> を用いて設定できる。 syncookie が有効になっている場合、 "
2621 "論理的な最大長は存在せず、この設定は無視される。"
2622
2623 #.  The following is now rather historic information (MTK, Jun 05)
2624 #.  Don't rely on this value in portable applications since BSD
2625 #.  (and some BSD-derived systems) limit the backlog to 5.
2626 #. type: Plain text
2627 #: build/C/man2/listen.2:164
2628 msgid ""
2629 "If the I<backlog> argument is greater than the value in I</proc/sys/net/core/"
2630 "somaxconn>, then it is silently truncated to that value; the default value "
2631 "in this file is 128.  In kernels before 2.4.25, this limit was a hard coded "
2632 "value, B<SOMAXCONN>, with the value 128."
2633 msgstr ""
2634 "I<backlog> 引き数が I</proc/sys/net/core/somaxconn> の値よりも大きければ、 "
2635 "I<backlog> の値は暗黙のうちにこの値に切り詰められる。 このファイルのデフォル"
2636 "ト値は 128 である。 バージョン 2.4.5 以前のカーネルでは、この上限値は コード"
2637 "埋め込みの固定値 B<SOMAXCONN> であり、その値は 128 であった。"
2638
2639 #. type: Plain text
2640 #: build/C/man2/listen.2:172
2641 msgid "B<accept>(2), B<bind>(2), B<connect>(2), B<socket>(2), B<socket>(7)"
2642 msgstr "B<accept>(2), B<bind>(2), B<connect>(2), B<socket>(2), B<socket>(7)"
2643
2644 #. type: TH
2645 #: build/C/man2/recv.2:39
2646 #, no-wrap
2647 msgid "RECV"
2648 msgstr "RECV"
2649
2650 #. type: TH
2651 #: build/C/man2/recv.2:39
2652 #, no-wrap
2653 msgid "2011-09-16"
2654 msgstr "2011-09-16"
2655
2656 #. type: Plain text
2657 #: build/C/man2/recv.2:42
2658 msgid "recv, recvfrom, recvmsg - receive a message from a socket"
2659 msgstr "recv, recvfrom, recvmsg - ソケットからメッセージを受け取る"
2660
2661 #. type: Plain text
2662 #: build/C/man2/recv.2:47 build/C/man2/select.2:53
2663 #: build/C/man2/select_tut.2:45
2664 #, no-wrap
2665 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
2666 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
2667
2668 #. type: Plain text
2669 #: build/C/man2/recv.2:51
2670 #, no-wrap
2671 msgid "B<ssize_t recv(int >I<sockfd>B<, void *>I<buf>B<, size_t >I<len>B<, int >I<flags>B<);>\n"
2672 msgstr "B<ssize_t recv(int >I<sockfd>B<, void *>I<buf>B<, size_t >I<len>B<, int >I<flags>B<);>\n"
2673
2674 #. type: Plain text
2675 #: build/C/man2/recv.2:54
2676 #, no-wrap
2677 msgid ""
2678 "B<ssize_t recvfrom(int >I<sockfd>B<, void *>I<buf>B<, size_t >I<len>B<, int >I<flags>B<,>\n"
2679 "B<                 struct sockaddr *>I<src_addr>B<, socklen_t *>I<addrlen>B<);>\n"
2680 msgstr ""
2681 "B<ssize_t recvfrom(int >I<sockfd>B<, void *>I<buf>B<, size_t >I<len>B<, int >I<flags>B<,>\n"
2682 "B<                 struct sockaddr *>I<src_addr>B<, socklen_t *>I<addrlen>B<);>\n"
2683
2684 #. type: Plain text
2685 #: build/C/man2/recv.2:56
2686 #, no-wrap
2687 msgid "B<ssize_t recvmsg(int >I<sockfd>B<, struct msghdr *>I<msg>B<, int >I<flags>B<);>\n"
2688 msgstr "B<ssize_t recvmsg(int >I<sockfd>B<, struct msghdr *>I<msg>B<, int >I<flags>B<);>\n"
2689
2690 #. type: Plain text
2691 #: build/C/man2/recv.2:64
2692 msgid ""
2693 "The B<recvfrom>()  and B<recvmsg>()  calls are used to receive messages from "
2694 "a socket, and may be used to receive data on a socket whether or not it is "
2695 "connection-oriented."
2696 msgstr ""
2697 "B<recvfrom>()  と B<recvmsg>()  コールは、ソケットからメッセージを受け取るの"
2698 "に使用する。 またソケットのデータ受信にも使うことができ、 このときソケットは"
2699 "接続指向 (connection-oriened) であってもなくてもよい。"
2700
2701 #.  (Note: for datagram sockets in both the UNIX and Internet domains,
2702 #.  .I src_addr
2703 #.  is filled in.
2704 #.  .I src_addr
2705 #.  is also filled in for stream sockets in the UNIX domain, but is not
2706 #.  filled in for stream sockets in the Internet domain.)
2707 #.  [The above notes on AF_UNIX and AF_INET sockets apply as at
2708 #.  Kernel 2.4.18. (MTK, 22 Jul 02)]
2709 #. type: Plain text
2710 #: build/C/man2/recv.2:93
2711 msgid ""
2712 "If I<src_addr> is not NULL, and the underlying protocol provides the source "
2713 "address, this source address is filled in.  When I<src_addr> is NULL, "
2714 "nothing is filled in; in this case, I<addrlen> is not used, and should also "
2715 "be NULL.  The argument I<addrlen> is a value-result argument, which the "
2716 "caller should initialize before the call to the size of the buffer "
2717 "associated with I<src_addr>, and modified on return to indicate the actual "
2718 "size of the source address.  The returned address is truncated if the buffer "
2719 "provided is too small; in this case, I<addrlen> will return a value greater "
2720 "than was supplied to the call."
2721 msgstr ""
2722 "I<src_addr> が NULL 以外で、下層のプロトコルから送信元アドレスが分かる場合、 "
2723 "I<src_addr> にはこの送信元アドレスが入れられる。 I<src_addr> が NULL の場"
2724 "合、 I<src_addr> には何も入らない。この場合、 I<addrlen> は使用されず、この引"
2725 "き数は NULL にしておくべきである。 引き数 I<addrlen> は入出力両用の引き数であ"
2726 "る。呼び出し時には、呼び出し元が I<src_addr> に割り当てたバッファの大きさで初"
2727 "期化しておくべきである。 返ってくる時には、送信元アドレスの実際の大きさに変更"
2728 "される。 渡されたバッファが小さ過ぎる場合には、返されるアドレスの末尾は 切り"
2729 "詰められる。この場合には、 I<addrlen> では、呼び出し時に渡された値よりも大き"
2730 "な値が返される。"
2731
2732 #. type: Plain text
2733 #: build/C/man2/recv.2:105
2734 msgid ""
2735 "The B<recv>()  call is normally used only on a I<connected> socket (see "
2736 "B<connect>(2))  and is identical to B<recvfrom>()  with a NULL I<src_addr> "
2737 "argument."
2738 msgstr ""
2739 "B<recv>()  コールは通常 I<接続済みの (connected)> ソケット (B<connect>(2)  を"
2740 "参照) についてのみ使用され、 I<src_addr> 引き数に NULL を指定した B<recvfrom>"
2741 "()  と等価である。"
2742
2743 #. type: Plain text
2744 #: build/C/man2/recv.2:111
2745 msgid ""
2746 "All three routines return the length of the message on successful "
2747 "completion.  If a message is too long to fit in the supplied buffer, excess "
2748 "bytes may be discarded depending on the type of socket the message is "
2749 "received from."
2750 msgstr ""
2751 "これらの三つのルーチンはいずれも、成功した場合にはメッセージの長さを返す。 "
2752 "メッセージが長過ぎて指定されたバッファに入り切らなかった場合には、 メッセージ"
2753 "を受信したソケットの種類によっては余分のバイトが捨てられる かもしれない。"
2754
2755 #. type: Plain text
2756 #: build/C/man2/recv.2:121
2757 msgid ""
2758 "If no messages are available at the socket, the receive calls wait for a "
2759 "message to arrive, unless the socket is nonblocking (see B<fcntl>(2)), in "
2760 "which case the value -1 is returned and the external variable I<errno> is "
2761 "set to B<EAGAIN> or B<EWOULDBLOCK>.  The receive calls normally return any "
2762 "data available, up to the requested amount, rather than waiting for receipt "
2763 "of the full amount requested."
2764 msgstr ""
2765 "ソケットに受け取るメッセージが存在しなかった場合、 受信用のコールはメッセージ"
2766 "が到着するまで待つ。 ただし、ソケットが非停止 (nonblocking)  に設定されていた"
2767 "場合 (B<fcntl>(2)  を参照) は -1 を返し、外部変数 I<errno> に B<EAGAIN> か "
2768 "B<EWOULDBLOCK> を設定する。 これらの受信用のコールは、受信したデータのサイズ"
2769 "が要求したサイズに 達するまで待つのではなく、何らかのデータを受信すると復帰す"
2770 "る (受信されるデータの最大サイズは要求したサイズである)。"
2771
2772 #. type: Plain text
2773 #: build/C/man2/recv.2:127
2774 msgid ""
2775 "The B<select>(2)  or B<poll>(2)  call may be used to determine when more "
2776 "data arrives."
2777 msgstr ""
2778 "B<select>(2)  や B<poll>(2)  コールを使って、次のデータがいつ届くかを判断でき"
2779 "る。"
2780
2781 #. type: Plain text
2782 #: build/C/man2/recv.2:133
2783 msgid ""
2784 "The I<flags> argument to a B<recv>()  call is formed by ORing one or more of "
2785 "the following values:"
2786 msgstr ""
2787 "B<recv>()  コールの I<flags> 引き数には、以下の値を 1つ以上、ビット単位の論理"
2788 "和 を取ったものを指定する:"
2789
2790 #. type: TP
2791 #: build/C/man2/recv.2:133
2792 #, no-wrap
2793 msgid "B<MSG_CMSG_CLOEXEC> (B<recvmsg>() only; since Linux 2.6.23)"
2794 msgstr "B<MSG_CMSG_CLOEXEC> (B<recvmsg>() のみ; Linux 2.6.23)"
2795
2796 #. type: Plain text
2797 #: build/C/man2/recv.2:144
2798 msgid ""
2799 "Set the close-on-exec flag for the file descriptor received via a UNIX "
2800 "domain file descriptor using the B<SCM_RIGHTS> operation (described in "
2801 "B<unix>(7)).  This flag is useful for the same reasons as the B<O_CLOEXEC> "
2802 "flag of B<open>(2)."
2803 msgstr ""
2804 "(B<unix>(7)  で説明されている)  B<SCM_RIGHTS> 操作を使って UNIX ドメインの"
2805 "ファイルディスクリプタ経由で受信した ファイルディスクリプタについて close-on-"
2806 "exec フラグをセットする。 このフラグは、 B<open>(2)  の B<O_CLOEXEC> フラグと"
2807 "同じ理由で有用である。"
2808
2809 #. type: TP
2810 #: build/C/man2/recv.2:144 build/C/man2/send.2:186
2811 #, no-wrap
2812 msgid "B<MSG_DONTWAIT> (since Linux 2.2)"
2813 msgstr "B<MSG_DONTWAIT> (Linux 2.2 以降)"
2814
2815 #. type: Plain text
2816 #: build/C/man2/recv.2:154
2817 msgid ""
2818 "Enables nonblocking operation; if the operation would block, the call fails "
2819 "with the error B<EAGAIN> or B<EWOULDBLOCK> (this can also be enabled using "
2820 "the B<O_NONBLOCK> flag with the B<F_SETFL> B<fcntl>(2))."
2821 msgstr ""
2822 "非停止 (nonblocking) 操作を有効にする。 操作が停止するような場合にエラー "
2823 "B<EAGAIN> か B<EWOULDBLOCK> で呼び出しが失敗する (B<fcntl>(2)  の B<F_SETFL> "
2824 "で B<O_NONBLOCK> フラグを指定することによっても有効にできる)。"
2825
2826 #. type: TP
2827 #: build/C/man2/recv.2:154
2828 #, no-wrap
2829 msgid "B<MSG_ERRQUEUE> (since Linux 2.2)"
2830 msgstr "B<MSG_ERRQUEUE> (Linux 2.2 以降)"
2831
2832 #. type: Plain text
2833 #: build/C/man2/recv.2:173
2834 msgid ""
2835 "This flag specifies that queued errors should be received from the socket "
2836 "error queue.  The error is passed in an ancillary message with a type "
2837 "dependent on the protocol (for IPv4 B<IP_RECVERR>).  The user should supply "
2838 "a buffer of sufficient size.  See B<cmsg>(3)  and B<ip>(7)  for more "
2839 "information.  The payload of the original packet that caused the error is "
2840 "passed as normal data via I<msg_iovec>.  The original destination address of "
2841 "the datagram that caused the error is supplied via I<msg_name>."
2842 msgstr ""
2843 "このフラグを指定すると、 キューに入れられたエラーをソケットのエラーキューから"
2844 "取りだせるようになる。 このエラーは補助メッセージに組み込まれて渡され、 この"
2845 "補助メッセージの種別はプロトコルに依存する (IPv4 の場合は B<IP_RECVERR>)。 "
2846 "ユーザは十分なサイズのバッファを用意しなければならない。 補助メッセージに関す"
2847 "るより詳細な情報は B<cmsg>(3)  および B<ip>(7)  を参照のこと。 エラーの原因と"
2848 "なったオリジナルパケットのペイロードは、 I<msg_iovec> 経由で通常のデータとし"
2849 "て渡される。 エラーを起こしたデータグラムのオリジナルの宛先アドレスは、 "
2850 "I<msg_name> 経由で参照できる。"
2851
2852 #. type: Plain text
2853 #: build/C/man2/recv.2:185 build/C/man2/recv.2:248
2854 msgid ""
2855 "For local errors, no address is passed (this can be checked with the "
2856 "I<cmsg_len> member of the I<cmsghdr>).  For error receives, the "
2857 "B<MSG_ERRQUEUE> is set in the I<msghdr>.  After an error has been passed, "
2858 "the pending socket error is regenerated based on the next queued error and "
2859 "will be passed on the next socket operation."
2860 msgstr ""
2861 "ローカルなエラーの場合はアドレスは渡されない\n"
2862 "(これは I<cmsghdr> の I<cmsg_len> メンバーでチェックできる)。\n"
2863 "受信エラーの場合は B<MSG_ERRQUIE> が I<msghdr> にセットされる。\n"
2864 "エラーが渡された後には、キューに入っている次のエラーに基いて、\n"
2865 "処理待ちのソケット・エラーが再生成され、次のソケット操作の際に渡される。"
2866
2867 #. type: Plain text
2868 #: build/C/man2/recv.2:189
2869 msgid "The error is supplied in a I<sock_extended_err> structure:"
2870 msgstr "このエラーは I<sock_extended_err> 構造体で提供される:"
2871
2872 #. type: Plain text
2873 #: build/C/man2/recv.2:196
2874 #, no-wrap
2875 msgid ""
2876 "#define SO_EE_ORIGIN_NONE    0\n"
2877 "#define SO_EE_ORIGIN_LOCAL   1\n"
2878 "#define SO_EE_ORIGIN_ICMP    2\n"
2879 "#define SO_EE_ORIGIN_ICMP6   3\n"
2880 msgstr ""
2881 "#define SO_EE_ORIGIN_NONE    0\n"
2882 "#define SO_EE_ORIGIN_LOCAL   1\n"
2883 "#define SO_EE_ORIGIN_ICMP    2\n"
2884 "#define SO_EE_ORIGIN_ICMP6   3\n"
2885
2886 #. type: Plain text
2887 #: build/C/man2/recv.2:208
2888 #, no-wrap
2889 msgid ""
2890 "struct sock_extended_err\n"
2891 "{\n"
2892 "    uint32_t ee_errno;   /* error number */\n"
2893 "    uint8_t  ee_origin;  /* where the error originated */\n"
2894 "    uint8_t  ee_type;    /* type */\n"
2895 "    uint8_t  ee_code;    /* code */\n"
2896 "    uint8_t  ee_pad;     /* padding */\n"
2897 "    uint32_t ee_info;    /* additional information */\n"
2898 "    uint32_t ee_data;    /* other data */\n"
2899 "    /* More data may follow */\n"
2900 "};\n"
2901 msgstr ""
2902 "struct sock_extended_err\n"
2903 "{\n"
2904 "    uint32_t ee_errno;   /* error number */\n"
2905 "    uint8_t  ee_origin;  /* where the error originated */\n"
2906 "    uint8_t  ee_type;    /* type */\n"
2907 "    uint8_t  ee_code;    /* code */\n"
2908 "    uint8_t  ee_pad;     /* padding */\n"
2909 "    uint32_t ee_info;    /* additional information */\n"
2910 "    uint32_t ee_data;    /* other data */\n"
2911 "    /* More data may follow */\n"
2912 "};\n"
2913
2914 #. type: Plain text
2915 #: build/C/man2/recv.2:210
2916 #, no-wrap
2917 msgid "struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *);\n"
2918 msgstr "struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *);\n"
2919
2920 #. type: Plain text
2921 #: build/C/man2/recv.2:234
2922 msgid ""
2923 "I<ee_errno> contains the I<errno> number of the queued error.  I<ee_origin> "
2924 "is the origin code of where the error originated.  The other fields are "
2925 "protocol-specific.  The macro B<SOCK_EE_OFFENDER> returns a pointer to the "
2926 "address of the network object where the error originated from given a "
2927 "pointer to the ancillary message.  If this address is not known, the "
2928 "I<sa_family> member of the I<sockaddr> contains B<AF_UNSPEC> and the other "
2929 "fields of the I<sockaddr> are undefined.  The payload of the packet that "
2930 "caused the error is passed as normal data."
2931 msgstr ""
2932 "I<ee_errno> にはキューに入れられたエラーの I<errno> が入っている。 "
2933 "I<ee_origin> にはエラーが発生した場所のオリジン・コード (origin code) が入っ"
2934 "ている。 他のフィールドはプロトコル依存である。 B<SO_EE_OFFENDER> マクロは、"
2935 "この補助的なメッセージを引き数に取って、 エラーの発生したネットワークオブジェ"
2936 "クトのアドレスへのポインタを返す。 アドレスが不明の場合には、 I<sockaddr> の "
2937 "I<sa_family> メンバーが B<AF_UNSPEC> になっている。 I<sockaddr> の他のフィー"
2938 "ルドは不定である。 エラーの発生したパケットのペイロードは通常のデータとして渡"
2939 "される。"
2940
2941 #. type: TP
2942 #: build/C/man2/recv.2:248 build/C/man2/recv.2:379 build/C/man2/send.2:228
2943 #, no-wrap
2944 msgid "B<MSG_OOB>"
2945 msgstr "B<MSG_OOB>"
2946
2947 #. type: Plain text
2948 #: build/C/man2/recv.2:255
2949 msgid ""
2950 "This flag requests receipt of out-of-band data that would not be received in "
2951 "the normal data stream.  Some protocols place expedited data at the head of "
2952 "the normal data queue, and thus this flag cannot be used with such protocols."
2953 msgstr ""
2954 "このフラグは、通常のデータ・ストリームでは受信できない 帯域外 (out-of-band) "
2955 "データの受信を要求する。 プロトコルによっては、 通常のデータ・キューの先頭に"
2956 "速達データを置くものがあるが、 そのようなプロトコルではこのフラグは使用できな"
2957 "い。"
2958
2959 #. type: TP
2960 #: build/C/man2/recv.2:255
2961 #, no-wrap
2962 msgid "B<MSG_PEEK>"
2963 msgstr "B<MSG_PEEK>"
2964
2965 #. type: Plain text
2966 #: build/C/man2/recv.2:262
2967 msgid ""
2968 "This flag causes the receive operation to return data from the beginning of "
2969 "the receive queue without removing that data from the queue.  Thus, a "
2970 "subsequent receive call will return the same data."
2971 msgstr ""
2972 "このフラグを指定すると、 受信キューの最初のデータを返すとき、キューからデータ"
2973 "を削除しない。 したがって、この後でもう一度受信コールを呼び出すと、同じデータ"
2974 "が返ることになる。"
2975
2976 #. type: TP
2977 #: build/C/man2/recv.2:262
2978 #, no-wrap
2979 msgid "B<MSG_TRUNC> (since Linux 2.2)"
2980 msgstr "B<MSG_TRUNC> (Linux 2.2 以降)"
2981
2982 #. type: Plain text
2983 #: build/C/man2/recv.2:273
2984 msgid ""
2985 "For raw (B<AF_PACKET>), Internet datagram (since Linux 2.4.27/2.6.8), and "
2986 "netlink (since Linux 2.6.22) sockets: return the real length of the packet "
2987 "or datagram, even when it was longer than the passed buffer.  Not "
2988 "implemented for UNIX domain (B<unix>(7))  sockets."
2989 msgstr ""
2990 "raw ソケット (B<AF_PACKET>)、 Internet datagram ソケット (Linux 2.4.27/2.6.8 "
2991 "以降)、 netlink (Linux 2.6.22 以降) ソケットの場合、 パケットやデータグラムの"
2992 "長さが渡したバッファよりも長かった場合にも、 パケットやデータグラムの実際の長"
2993 "さを返す。 UNIX ドメインソケット (B<unix>(7))  ソケットについては実装されてい"
2994 "ない。"
2995
2996 #. type: Plain text
2997 #: build/C/man2/recv.2:276
2998 msgid "For use with Internet stream sockets, see B<tcp>(7)."
2999 msgstr "Internet ストリームソケットでの利用については B<tcp>(7)  を参照。"
3000
3001 #. type: TP
3002 #: build/C/man2/recv.2:276
3003 #, no-wrap
3004 msgid "B<MSG_WAITALL> (since Linux 2.2)"
3005 msgstr "B<MSG_WAITALL> (Linux 2.2 以降)"
3006
3007 #. type: Plain text
3008 #: build/C/man2/recv.2:283
3009 msgid ""
3010 "This flag requests that the operation block until the full request is "
3011 "satisfied.  However, the call may still return less data than requested if a "
3012 "signal is caught, an error or disconnect occurs, or the next data to be "
3013 "received is of a different type than that returned."
3014 msgstr ""
3015 "このフラグは、要求した量いっぱいのデータが到着するまで、 操作を停止 (block) "
3016 "するよう要求する。 但し、シグナルを受信したり、エラーや切断 (disconnect) が発"
3017 "生したり、 次に受信されるデータが異なる型だったりした場合には、 要求した量よ"
3018 "りデータが少なくても返ることがある。"
3019
3020 #. type: Plain text
3021 #: build/C/man2/recv.2:291
3022 msgid ""
3023 "The B<recvmsg>()  call uses a I<msghdr> structure to minimize the number of "
3024 "directly supplied arguments.  This structure is defined as follows in "
3025 "I<E<lt>sys/socket.hE<gt>>:"
3026 msgstr ""
3027 "B<recvmsg>()  コールは、直接渡す引き数の数を減らすために I<msghdr> 構造体を使"
3028 "用する。この構造体は I<E<lt>sys/socket.hE<gt>> で以下のように定義されている:"
3029
3030 #. type: Plain text
3031 #: build/C/man2/recv.2:298
3032 #, no-wrap
3033 msgid ""
3034 "struct iovec {                    /* Scatter/gather array items */\n"
3035 "    void  *iov_base;              /* Starting address */\n"
3036 "    size_t iov_len;               /* Number of bytes to transfer */\n"
3037 "};\n"
3038 msgstr ""
3039 "struct iovec {                    /* Scatter/gather array items */\n"
3040 "    void  *iov_base;              /* Starting address */\n"
3041 "    size_t iov_len;               /* Number of bytes to transfer */\n"
3042 "};\n"
3043
3044 #. type: Plain text
3045 #: build/C/man2/recv.2:308 build/C/man2/send.2:256
3046 #, no-wrap
3047 msgid ""
3048 "struct msghdr {\n"
3049 "    void         *msg_name;       /* optional address */\n"
3050 "    socklen_t     msg_namelen;    /* size of address */\n"
3051 "    struct iovec *msg_iov;        /* scatter/gather array */\n"
3052 "    size_t        msg_iovlen;     /* # elements in msg_iov */\n"
3053 "    void         *msg_control;    /* ancillary data, see below */\n"
3054 "    size_t        msg_controllen; /* ancillary data buffer len */\n"
3055 "    int           msg_flags;      /* flags on received message */\n"
3056 "};\n"
3057 msgstr ""
3058 "struct msghdr {\n"
3059 "    void         *msg_name;       /* 追加のアドレス */\n"
3060 "    socklen_t     msg_namelen;    /* アドレスのサイズ */\n"
3061 "    struct iovec *msg_iov;        /* scatter/gather 配列 */\n"
3062 "    size_t        msg_iovlen;     /* msg_iov の要素数 */\n"
3063 "    void         *msg_control;    /* 補助データ (後述) */\n"
3064 "    size_t        msg_controllen; /* 補助データバッファ長 */\n"
3065 "    int           msg_flags;      /* 受信メッセージのフラグ */\n"
3066 "};\n"
3067
3068 #. type: Plain text
3069 #: build/C/man2/recv.2:338
3070 msgid ""
3071 "Here I<msg_name> and I<msg_namelen> specify the source address if the socket "
3072 "is unconnected; I<msg_name> may be given as a NULL pointer if no names are "
3073 "desired or required.  The fields I<msg_iov> and I<msg_iovlen> describe "
3074 "scatter-gather locations, as discussed in B<readv>(2).  The field "
3075 "I<msg_control>, which has length I<msg_controllen>, points to a buffer for "
3076 "other protocol control-related messages or miscellaneous ancillary data.  "
3077 "When B<recvmsg>()  is called, I<msg_controllen> should contain the length of "
3078 "the available buffer in I<msg_control>; upon return from a successful call "
3079 "it will contain the length of the control message sequence."
3080 msgstr ""
3081 "I<msg_name> と I<msg_namelen> は、ソケットが接続されていない場合に送信元のア"
3082 "ドレスを指定する。 名前が必要ない場合には I<msg_name> に NULL ポインタを指定"
3083 "する。 I<msg_iov> と I<msg_iovlen> フィールドは B<readv>(2)  に記述されている"
3084 "ような分解/結合用のベクトル (scatter-gather locations)  を指定する。 "
3085 "I<msg_control> フィールドは I<msg_controllen> の長さを持ち、他のプロトコル制"
3086 "御メッセージや 種々の補助データのためのバッファへのポインタである。 "
3087 "B<recvmsg>()  を呼ぶ際には、 I<msg_controllen> に I<msg_control> のバッファの"
3088 "長さを入れておく必要がある。 コールが成功して返った場合、制御メッセージ列の長"
3089 "さが入っている。"
3090
3091 #. type: Plain text
3092 #: build/C/man2/recv.2:340
3093 msgid "The messages are of the form:"
3094 msgstr "メッセージの形式は以下の通り:"
3095
3096 #. type: Plain text
3097 #: build/C/man2/recv.2:350
3098 #, no-wrap
3099 msgid ""
3100 "struct cmsghdr {\n"
3101 "    socklen_t     cmsg_len;     /* data byte count, including hdr */\n"
3102 "    int           cmsg_level;   /* originating protocol */\n"
3103 "    int           cmsg_type;    /* protocol-specific type */\n"
3104 "/* followed by\n"
3105 "    unsigned char cmsg_data[]; */\n"
3106 "};\n"
3107 msgstr ""
3108 "struct cmsghdr {\n"
3109 "    socklen_t     cmsg_len;     /* data byte count, including hdr */\n"
3110 "    int           cmsg_level;   /* originating protocol */\n"
3111 "    int           cmsg_type;    /* protocol-specific type */\n"
3112 "/* followed by\n"
3113 "    unsigned char cmsg_data[]; */\n"
3114 "};\n"
3115
3116 #. type: Plain text
3117 #: build/C/man2/recv.2:355
3118 msgid ""
3119 "Ancillary data should only be accessed by the macros defined in B<cmsg>(3)."
3120 msgstr ""
3121 "補助データは、 B<cmsg>(3)  に定義されたマクロ経由でのみアクセスすべきである。"
3122
3123 #. type: Plain text
3124 #: build/C/man2/recv.2:358
3125 msgid ""
3126 "As an example, Linux uses this ancillary data mechanism to pass extended "
3127 "errors, IP options, or file descriptors over UNIX domain sockets."
3128 msgstr ""
3129 "例をあげると、 Linux はこの補助データのメカニズムを、 UNIX ドメインソケット上"
3130 "での拡張エラーや IP オプション、 ファイル・ディスクリプタの受け渡しに利用して"
3131 "いる。"
3132
3133 #. type: Plain text
3134 #: build/C/man2/recv.2:366
3135 msgid ""
3136 "The I<msg_flags> field in the I<msghdr> is set on return of B<recvmsg>().  "
3137 "It can contain several flags:"
3138 msgstr ""
3139 "I<msghdr> の I<msg_flags> フィールドは B<recvmsg>()  からのリターン時に設定さ"
3140 "れる。ここにはいくつかのフラグが入る。"
3141
3142 #. type: TP
3143 #: build/C/man2/recv.2:366
3144 #, no-wrap
3145 msgid "B<MSG_EOR>"
3146 msgstr "B<MSG_EOR>"
3147
3148 #. type: Plain text
3149 #: build/C/man2/recv.2:371
3150 msgid ""
3151 "indicates end-of-record; the data returned completed a record (generally "
3152 "used with sockets of type B<SOCK_SEQPACKET>)."
3153 msgstr ""
3154 "これはレコードの終り (end-of-record) を示し、 返されたデータが完全なレコード"
3155 "であることを示す (一般的には B<SOCK_SEQPACKET> 型のソケットで使用される)。"
3156
3157 #. type: TP
3158 #: build/C/man2/recv.2:371
3159 #, no-wrap
3160 msgid "B<MSG_TRUNC>"
3161 msgstr "B<MSG_TRUNC>"
3162
3163 #. type: Plain text
3164 #: build/C/man2/recv.2:375
3165 msgid ""
3166 "indicates that the trailing portion of a datagram was discarded because the "
3167 "datagram was larger than the buffer supplied."
3168 msgstr ""
3169 "データグラムが与えられたバッファより大きかったために、 データグラムのはみ出し"
3170 "た部分が捨てられたことを示す。"
3171
3172 #. type: TP
3173 #: build/C/man2/recv.2:375
3174 #, no-wrap
3175 msgid "B<MSG_CTRUNC>"
3176 msgstr "B<MSG_CTRUNC>"
3177
3178 #. type: Plain text
3179 #: build/C/man2/recv.2:379
3180 msgid ""
3181 "indicates that some control data were discarded due to lack of space in the "
3182 "buffer for ancillary data."
3183 msgstr ""
3184 "補助データのためのバッファが不足したために、 制御データの一部が捨てられたこと"
3185 "を示す。"
3186
3187 #. type: Plain text
3188 #: build/C/man2/recv.2:382
3189 msgid ""
3190 "is returned to indicate that expedited or out-of-band data were received."
3191 msgstr "速達データや帯域外データを受信したことを示す。"
3192
3193 #. type: TP
3194 #: build/C/man2/recv.2:382
3195 #, no-wrap
3196 msgid "B<MSG_ERRQUEUE>"
3197 msgstr "B<MSG_ERRQUEUE>"
3198
3199 #. type: Plain text
3200 #: build/C/man2/recv.2:386
3201 msgid ""
3202 "indicates that no data was received but an extended error from the socket "
3203 "error queue."
3204 msgstr ""
3205 "データは受信しなかったが ソケットのエラー・キューから拡張エラーを受信したこと"
3206 "を示す。"
3207
3208 #. type: Plain text
3209 #: build/C/man2/recv.2:391
3210 msgid ""
3211 "These calls return the number of bytes received, or -1 if an error "
3212 "occurred.  The return value will be 0 when the peer has performed an orderly "
3213 "shutdown."
3214 msgstr ""
3215 "これらのコールは受信したバイト数を返す。 エラーの場合は -1 を返す。 接続先が"
3216 "正しくシャットダウンを実行した場合は、返り値は 0 となる。"
3217
3218 #. type: Plain text
3219 #: build/C/man2/recv.2:396
3220 msgid ""
3221 "These are some standard errors generated by the socket layer.  Additional "
3222 "errors may be generated and returned from the underlying protocol modules; "
3223 "see their manual pages."
3224 msgstr ""
3225 "これらはソケット層で発生する一般的なエラーである。 他のエラーが下層のプロトコ"
3226 "ル・モジュールで生成され、 返されるかもしれない。 それらのマニュアルを参照す"
3227 "ること。"
3228
3229 #.  Actually EAGAIN on Linux
3230 #. type: Plain text
3231 #: build/C/man2/recv.2:405
3232 msgid ""
3233 "The socket is marked nonblocking and the receive operation would block, or a "
3234 "receive timeout had been set and the timeout expired before data was "
3235 "received.  POSIX.1-2001 allows either error to be returned for this case, "
3236 "and does not require these constants to have the same value, so a portable "
3237 "application should check for both possibilities."
3238 msgstr ""
3239 "ソケットが非停止 (nonblocking) に設定されていて 受信操作が停止するような状況"
3240 "になったか、 受信に時間切れ (timeout) が設定されていて データを受信する前に時"
3241 "間切れになった。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めて"
3242 "おり、 これら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性"
3243 "が必要なアプリケーションでは、両方の可能性を 確認すべきである。"
3244
3245 #. type: Plain text
3246 #: build/C/man2/recv.2:410
3247 msgid "The argument I<sockfd> is an invalid descriptor."
3248 msgstr "引き数 I<sockfd> が不正なディスクリプタである。"
3249
3250 #. type: Plain text
3251 #: build/C/man2/recv.2:414
3252 msgid ""
3253 "A remote host refused to allow the network connection (typically because it "
3254 "is not running the requested service)."
3255 msgstr ""
3256 "リモートのホストでネットワーク接続が拒否された (よくある理由としては、要求し"
3257 "たサービスが起動されていないなどがある)。"
3258
3259 #. type: Plain text
3260 #: build/C/man2/recv.2:418
3261 msgid ""
3262 "The receive buffer pointer(s) point outside the process's address space."
3263 msgstr "受信バッファへのポインタがプロセスのアドレス空間外を指している。"
3264
3265 #. type: Plain text
3266 #: build/C/man2/recv.2:423
3267 msgid ""
3268 "The receive was interrupted by delivery of a signal before any data were "
3269 "available; see B<signal>(7)."
3270 msgstr ""
3271 "データを受信する前に、シグナルが配送されて割り込まれた。 B<signal>(7)  参照。"
3272
3273 #. type: Plain text
3274 #: build/C/man2/recv.2:427 build/C/man2/send.2:318
3275 msgid "Invalid argument passed."
3276 msgstr "不正な引き数が渡された。"
3277
3278 #. type: Plain text
3279 #: build/C/man2/recv.2:431
3280 msgid "Could not allocate memory for B<recvmsg>()."
3281 msgstr "B<recvmsg>()  のためのメモリが確保できなかった。"
3282
3283 #. type: TP
3284 #: build/C/man2/recv.2:431 build/C/man2/send.2:341
3285 #, no-wrap
3286 msgid "B<ENOTCONN>"
3287 msgstr "B<ENOTCONN>"
3288
3289 #. type: Plain text
3290 #: build/C/man2/recv.2:438
3291 msgid ""
3292 "The socket is associated with a connection-oriented protocol and has not "
3293 "been connected (see B<connect>(2)  and B<accept>(2))."
3294 msgstr ""
3295 "ソケットに接続指向プロトコルが割り当てられており、 まだ接続されていない "
3296 "(B<connect>(2)  と B<accept>(2)  を参照のこと)。"
3297
3298 #. type: Plain text
3299 #: build/C/man2/recv.2:443
3300 msgid "The argument I<sockfd> does not refer to a socket."
3301 msgstr "引き数 I<sockfd> がソケットを参照していない。"
3302
3303 #. type: Plain text
3304 #: build/C/man2/recv.2:446
3305 msgid "4.4BSD (these function calls first appeared in 4.2BSD), POSIX.1-2001."
3306 msgstr "4.4BSD (これらの関数は 4.2BSD で現われた), POSIX.1-2001。"
3307
3308 #. type: Plain text
3309 #: build/C/man2/recv.2:453
3310 msgid ""
3311 "POSIX.1-2001 only describes the B<MSG_OOB>, B<MSG_PEEK>, and B<MSG_WAITALL> "
3312 "flags."
3313 msgstr ""
3314 "POSIX.1-2001 では、 B<MSG_OOB>, B<MSG_PEEK>, B<MSG_WAITALL> フラグだけが記載"
3315 "されている。"
3316
3317 #. type: Plain text
3318 #: build/C/man2/recv.2:469
3319 msgid ""
3320 "The prototypes given above follow glibc2.  The Single UNIX Specification "
3321 "agrees, except that it has return values of type I<ssize_t> (while 4.x BSD "
3322 "and libc4 and libc5 all have I<int>).  The I<flags> argument is I<int> in 4."
3323 "x BSD, but I<unsigned int> in libc4 and libc5.  The I<len> argument is "
3324 "I<int> in 4.x BSD, but I<size_t> in libc4 and libc5.  The I<addrlen> "
3325 "argument is I<int\\ *> in 4.x BSD, libc4 and libc5.  The present I<socklen_t"
3326 "\\ *> was invented by POSIX.  See also B<accept>(2)."
3327 msgstr ""
3328 "上記のプロトタイプは glibc2 にしたがっている。 Single UNIX Specification でも"
3329 "同様だが、 返り値の型が I<ssize_t> となっている (一方で 4.x BSD や libc4 や "
3330 "libc5 は全て I<int> を使用している)。 I<flags> 引き数は 4.x BSD では I<int> "
3331 "だが、libc4 と libc5 では I<unsigned int> である。 I<len> 引き数は 4.x BSD で"
3332 "は I<int> だが、 libc4 と libc5 では I<size_t> である。 I<addrlen> 引き数は "
3333 "4.x BSD, libc4, libc5 では I<int\\ *> である。 現在の I<socklen_t\\ *> は "
3334 "POSIX で発案された。 B<accept>(2)  も参照すること。"
3335
3336 #.  glibc bug raised 12 Mar 2006
3337 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=2448
3338 #.  The problem is an underlying kernel issue: the size of the
3339 #.  __kernel_size_t type used to type this field varies
3340 #.  across architectures, but socklen_t is always 32 bits.
3341 #. type: Plain text
3342 #: build/C/man2/recv.2:483 build/C/man2/send.2:404
3343 msgid ""
3344 "According to POSIX.1-2001, the I<msg_controllen> field of the I<msghdr> "
3345 "structure should be typed as I<socklen_t>, but glibc currently types it as "
3346 "I<size_t>."
3347 msgstr ""
3348 "POSIX.1-2001 では、構造体 I<msghdr> のフィールド I<msg_controllen> は "
3349 "I<socklen_t> 型であるべきだとされているが、 現在の glibc では I<size_t> 型で"
3350 "ある。"
3351
3352 #. type: Plain text
3353 #: build/C/man2/recv.2:488
3354 msgid ""
3355 "See B<recvmmsg(2)> for information about a Linux-specific system call that "
3356 "can be used to receive multiple datagrams in a single call."
3357 msgstr ""
3358 "B<recvmmsg>(2)  には、一度の呼び出しでの複数のデータグラムに使用できる Linux "
3359 "固有の システムコールに関する情報が書かれている。"
3360
3361 #. type: Plain text
3362 #: build/C/man2/recv.2:493
3363 msgid "An example of the use of B<recvfrom>()  is shown in B<getaddrinfo>(3)."
3364 msgstr "B<recvfrom>()  の利用例が B<getaddrinfo>(3)  に記載されている。"
3365
3366 #. type: Plain text
3367 #: build/C/man2/recv.2:503
3368 msgid ""
3369 "B<fcntl>(2), B<getsockopt>(2), B<read>(2), B<recvmmsg>(2), B<select>(2), "
3370 "B<shutdown>(2), B<socket>(2), B<cmsg>(3), B<sockatmark>(3), B<socket>(7)"
3371 msgstr ""
3372 "B<fcntl>(2), B<getsockopt>(2), B<read>(2), B<recvmmsg>(2), B<select>(2), "
3373 "B<shutdown>(2), B<socket>(2), B<cmsg>(3), B<sockatmark>(3), B<socket>(7)"
3374
3375 #. type: TH
3376 #: build/C/man2/recvmmsg.2:26
3377 #, no-wrap
3378 msgid "RECVMMSG"
3379 msgstr "RECVMMSG"
3380
3381 #. type: TH
3382 #: build/C/man2/recvmmsg.2:26
3383 #, no-wrap
3384 msgid "2011-10-04"
3385 msgstr "2011-10-04"
3386
3387 #. type: Plain text
3388 #: build/C/man2/recvmmsg.2:29
3389 msgid "recvmmsg - receive multiple messages on a socket"
3390 msgstr "recvmmsg - receive multiple messages on a socket"
3391
3392 #. type: Plain text
3393 #: build/C/man2/recvmmsg.2:33 build/C/man2/sendmmsg.2:35
3394 #, no-wrap
3395 msgid ""
3396 "B<#define _GNU_SOURCE>\n"
3397 "B<#include E<lt>sys/socket.hE<gt>>\n"
3398 msgstr ""
3399 "B<#define _GNU_SOURCE>\n"
3400 "B<#include E<lt>sys/socket.hE<gt>>\n"
3401
3402 #. type: Plain text
3403 #: build/C/man2/recvmmsg.2:36
3404 #, no-wrap
3405 msgid "B<int recvmmsg(int >I<sockfd>B<, struct mmsghdr *>I<msgvec>B<, unsigned int >I<vlen>B<,>\n"
3406 msgstr "B<int recvmmsg(int >I<sockfd>B<, struct mmsghdr *>I<msgvec>B<, unsigned int >I<vlen>B<,>\n"
3407
3408 #. type: Plain text
3409 #: build/C/man2/recvmmsg.2:38
3410 #, no-wrap
3411 msgid "B<             unsigned int >I<flags>B<, struct timespec *>I<timeout>B<);>\n"
3412 msgstr "B<             unsigned int >I<flags>B<, struct timespec *>I<timeout>B<);>\n"
3413
3414 #. type: Plain text
3415 #: build/C/man2/recvmmsg.2:50
3416 msgid ""
3417 "The B<recvmmsg>()  system call is an extension of B<recvmsg>(2)  that allows "
3418 "the caller to receive multiple messages from a socket using a single system "
3419 "call.  (This has performance benefits for some applications.)  A further "
3420 "extension over B<recvmsg>(2)  is support for a timeout on the receive "
3421 "operation."
3422 msgstr ""
3423 "The B<recvmmsg>()  system call is an extension of B<recvmsg>(2)  that allows "
3424 "the caller to receive multiple messages from a socket using a single system "
3425 "call.  (This has performance benefits for some applications.)  A further "
3426 "extension over B<recvmsg>(2)  is support for a timeout on the receive "
3427 "operation."
3428
3429 #. type: Plain text
3430 #: build/C/man2/recvmmsg.2:54
3431 msgid ""
3432 "The I<sockfd> argument is the file descriptor of the socket to receive data "
3433 "from."
3434 msgstr ""
3435 "The I<sockfd> argument is the file descriptor of the socket to receive data "
3436 "from."
3437
3438 #. type: Plain text
3439 #: build/C/man2/recvmmsg.2:62 build/C/man2/sendmmsg.2:62
3440 msgid ""
3441 "The I<msgvec> argument is a pointer to an array of I<mmsghdr> structures.  "
3442 "The size of this array is specified in I<vlen>."
3443 msgstr ""
3444 "The I<msgvec> argument is a pointer to an array of I<mmsghdr> structures.  "
3445 "The size of this array is specified in I<vlen>."
3446
3447 #. type: Plain text
3448 #: build/C/man2/recvmmsg.2:68 build/C/man2/sendmmsg.2:68
3449 msgid "The I<mmsghdr> structure is defined in I<E<lt>sys/socket.hE<gt>> as:"
3450 msgstr "The I<mmsghdr> structure is defined in I<E<lt>sys/socket.hE<gt>> as:"
3451
3452 #. type: Plain text
3453 #: build/C/man2/recvmmsg.2:75
3454 #, no-wrap
3455 msgid ""
3456 "struct mmsghdr {\n"
3457 "    struct msghdr msg_hdr;  /* Message header */\n"
3458 "    unsigned int  msg_len;  /* Number of received bytes for header */\n"
3459 "};\n"
3460 msgstr ""
3461 "struct mmsghdr {\n"
3462 "    struct msghdr msg_hdr;  /* Message header */\n"
3463 "    unsigned int  msg_len;  /* Number of received bytes for header */\n"
3464 "};\n"
3465
3466 #. type: Plain text
3467 #: build/C/man2/recvmmsg.2:90
3468 msgid ""
3469 "The I<msg_hdr> field is a I<msghdr> structure, as described in B<recvmsg>"
3470 "(2).  The I<msg_len> field is the number of bytes returned for the message "
3471 "in the entry.  This field has the same value as the return value of a single "
3472 "B<recvmsg>(2)  on the header."
3473 msgstr ""
3474 "The I<msg_hdr> field is a I<msghdr> structure, as described in B<recvmsg>"
3475 "(2).  The I<msg_len> field is the number of bytes returned for the message "
3476 "in the entry.  This field has the same value as the return value of a single "
3477 "B<recvmsg>(2)  on the header."
3478
3479 #. type: Plain text
3480 #: build/C/man2/recvmmsg.2:97
3481 msgid ""
3482 "The I<flags> argument contains flags ORed together.  The flags are the same "
3483 "as documented for B<recvmsg>(2), with the following addition:"
3484 msgstr ""
3485 "The I<flags> argument contains flags ORed together.  The flags are the same "
3486 "as documented for B<recvmsg>(2), with the following addition:"
3487
3488 #. type: TP
3489 #: build/C/man2/recvmmsg.2:97
3490 #, no-wrap
3491 msgid "B<MSG_WAITFORONE>"
3492 msgstr "B<MSG_WAITFORONE>"
3493
3494 #. type: Plain text
3495 #: build/C/man2/recvmmsg.2:102
3496 msgid "Turns on B<MSG_DONTWAIT> after the first message has been received."
3497 msgstr "Turns on B<MSG_DONTWAIT> after the first message has been received."
3498
3499 #. type: Plain text
3500 #: build/C/man2/recvmmsg.2:115
3501 msgid ""
3502 "The I<timeout> argument points to a I<struct timespec> (see B<clock_gettime>"
3503 "(2))  defining a timeout (seconds plus nanoseconds) for the receive "
3504 "operation.  If I<timeout> is I<NULL> then the operation blocks indefinitely."
3505 msgstr ""
3506 "The I<timeout> argument points to a I<struct timespec> (see B<clock_gettime>"
3507 "(2))  defining a timeout (seconds plus nanoseconds) for the receive "
3508 "operation.  If I<timeout> is I<NULL> then the operation blocks indefinitely."
3509
3510 #. type: Plain text
3511 #: build/C/man2/recvmmsg.2:126
3512 msgid ""
3513 "A blocking B<recvmmsg>()  call blocks until I<vlen> messages have been "
3514 "received or until the timeout expires.  A nonblocking call reads as many "
3515 "messages as are available (up to the limit specified by I<vlen>)  and "
3516 "returns immediately."
3517 msgstr ""
3518 "A blocking B<recvmmsg>()  call blocks until I<vlen> messages have been "
3519 "received or until the timeout expires.  A nonblocking call reads as many "
3520 "messages as are available (up to the limit specified by I<vlen>)  and "
3521 "returns immediately."
3522
3523 #. type: Plain text
3524 #: build/C/man2/recvmmsg.2:141
3525 msgid ""
3526 "On return from B<recvmmsg>(), successive elements of I<msgvec> are updated "
3527 "to contain information about each received message: I<msg_len> contains the "
3528 "size of the received message; the subfields of I<msg_hdr> are updated as "
3529 "described in B<recvmsg>(2).  The return value of the call indicates the "
3530 "number of elements of I<msgvec> that have been updated."
3531 msgstr ""
3532 "On return from B<recvmmsg>(), successive elements of I<msgvec> are updated "
3533 "to contain information about each received message: I<msg_len> contains the "
3534 "size of the received message; the subfields of I<msg_hdr> are updated as "
3535 "described in B<recvmsg>(2).  The return value of the call indicates the "
3536 "number of elements of I<msgvec> that have been updated."
3537
3538 #. type: Plain text
3539 #: build/C/man2/recvmmsg.2:149
3540 msgid ""
3541 "On success, B<recvmmsg>()  returns the number of messages received in "
3542 "I<msgvec>; on error, -1 is returned, and I<errno> is set to indicate the "
3543 "error."
3544 msgstr ""
3545 "On success, B<recvmmsg>()  returns the number of messages received in "
3546 "I<msgvec>; on error, -1 is returned, and I<errno> is set to indicate the "
3547 "error."
3548
3549 #. type: Plain text
3550 #: build/C/man2/recvmmsg.2:153
3551 msgid ""
3552 "Errors are as for B<recvmsg>(2).  In addition, the following error can occur:"
3553 msgstr ""
3554 "Errors are as for B<recvmsg>(2).  In addition, the following error can occur:"
3555
3556 #. type: Plain text
3557 #: build/C/man2/recvmmsg.2:157
3558 msgid "I<timeout> is invalid."
3559 msgstr "I<timeout> is invalid."
3560
3561 #. type: Plain text
3562 #: build/C/man2/recvmmsg.2:162
3563 msgid ""
3564 "The B<recvmmsg>()  system call was added in Linux 2.6.32.  Support in glibc "
3565 "was added in version 2.12."
3566 msgstr ""
3567 "The B<recvmmsg>()  system call was added in Linux 2.6.32.  Support in glibc "
3568 "was added in version 2.12."
3569
3570 #. type: Plain text
3571 #: build/C/man2/recvmmsg.2:165
3572 msgid "B<recvmmsg>()  is Linux-specific."
3573 msgstr "B<recvmmsg>()  is Linux-specific."
3574
3575 #. type: Plain text
3576 #: build/C/man2/recvmmsg.2:171
3577 msgid ""
3578 "B<clock_gettime>(2), B<recvmsg>(2), B<sendmmsg>(2), B<sendmsg>(2), B<socket>"
3579 "(2), B<socket>(7)"
3580 msgstr ""
3581 "B<clock_gettime>(2), B<recvmsg>(2), B<sendmmsg>(2), B<sendmsg>(2), B<socket>"
3582 "(2), B<socket>(7)"
3583
3584 #. type: TH
3585 #: build/C/man2/select.2:38
3586 #, no-wrap
3587 msgid "SELECT"
3588 msgstr "SELECT"
3589
3590 #. type: TH
3591 #: build/C/man2/select.2:38
3592 #, no-wrap
3593 msgid "2010-08-31"
3594 msgstr "2010-08-31"
3595
3596 #. type: Plain text
3597 #: build/C/man2/select.2:42 build/C/man2/select_tut.2:34
3598 msgid ""
3599 "select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO - synchronous I/O "
3600 "multiplexing"
3601 msgstr "select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO - 同期 I/O の多重化"
3602
3603 #. type: Plain text
3604 #: build/C/man2/select.2:45 build/C/man2/select_tut.2:37
3605 #, no-wrap
3606 msgid "/* According to POSIX.1-2001 */\n"
3607 msgstr "/* POSIX.1-2001 に従う場合 */\n"
3608
3609 #. type: Plain text
3610 #: build/C/man2/select.2:47 build/C/man2/select.2:68
3611 #: build/C/man2/select_tut.2:39 build/C/man2/select_tut.2:60
3612 #, no-wrap
3613 msgid "B<#include E<lt>sys/select.hE<gt>>\n"
3614 msgstr "B<#include E<lt>sys/select.hE<gt>>\n"
3615
3616 #. type: Plain text
3617 #: build/C/man2/select.2:49 build/C/man2/select_tut.2:41
3618 #, no-wrap
3619 msgid "/* According to earlier standards */\n"
3620 msgstr "/* 以前の規格に従う場合 */\n"
3621
3622 #. type: Plain text
3623 #: build/C/man2/select.2:51 build/C/man2/select_tut.2:43
3624 #, no-wrap
3625 msgid "B<#include E<lt>sys/time.hE<gt>>\n"
3626 msgstr "B<#include E<lt>sys/time.hE<gt>>\n"
3627
3628 #. type: Plain text
3629 #: build/C/man2/select.2:55 build/C/man2/select_tut.2:47
3630 #, no-wrap
3631 msgid "B<#include E<lt>unistd.hE<gt>>\n"
3632 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
3633
3634 #. type: Plain text
3635 #: build/C/man2/select.2:58
3636 #, no-wrap
3637 msgid ""
3638 "B<int select(int >I<nfds>B<, fd_set *>I<readfds>B<, fd_set *>I<writefds>B<,>\n"
3639 "B<           fd_set *>I<exceptfds>B<, struct timeval *>I<timeout>B<);>\n"
3640 msgstr ""
3641 "B<int select(int >I<nfds>B<, fd_set *>I<readfds>B<, fd_set *>I<writefds>B<,>\n"
3642 "B<           fd_set *>I<exceptfds>B<, struct timeval *>I<timeout>B<);>\n"
3643
3644 #. type: Plain text
3645 #: build/C/man2/select.2:60 build/C/man2/select_tut.2:52
3646 #, no-wrap
3647 msgid "B<void FD_CLR(int >I<fd>B<, fd_set *>I<set>B<);>\n"
3648 msgstr "B<void FD_CLR(int >I<fd>B<, fd_set *>I<set>B<);>\n"
3649
3650 #. type: Plain text
3651 #: build/C/man2/select.2:62 build/C/man2/select_tut.2:54
3652 #, no-wrap
3653 msgid "B<int  FD_ISSET(int >I<fd>B<, fd_set *>I<set>B<);>\n"
3654 msgstr "B<int  FD_ISSET(int >I<fd>B<, fd_set *>I<set>B<);>\n"
3655
3656 #. type: Plain text
3657 #: build/C/man2/select.2:64 build/C/man2/select_tut.2:56
3658 #, no-wrap
3659 msgid "B<void FD_SET(int >I<fd>B<, fd_set *>I<set>B<);>\n"
3660 msgstr "B<void FD_SET(int >I<fd>B<, fd_set *>I<set>B<);>\n"
3661
3662 #. type: Plain text
3663 #: build/C/man2/select.2:66 build/C/man2/select_tut.2:58
3664 #, no-wrap
3665 msgid "B<void FD_ZERO(fd_set *>I<set>B<);>\n"
3666 msgstr "B<void FD_ZERO(fd_set *>I<set>B<);>\n"
3667
3668 #. type: Plain text
3669 #: build/C/man2/select.2:72
3670 #, no-wrap
3671 msgid ""
3672 "B<int pselect(int >I<nfds>B<, fd_set *>I<readfds>B<, fd_set *>I<writefds>B<,>\n"
3673 "B<            fd_set *>I<exceptfds>B<, const struct timespec *>I<timeout>B<,>\n"
3674 "B<            const sigset_t *>I<sigmask>B<);>\n"
3675 msgstr ""
3676 "B<int pselect(int >I<nfds>B<, fd_set *>I<readfds>B<, fd_set *>I<writefds>B<,>\n"
3677 "B<            fd_set *>I<exceptfds>B<, const struct timespec *>I<timeout>B<,>\n"
3678 "B<            const sigset_t *>I<sigmask>B<);>\n"
3679
3680 #. type: Plain text
3681 #: build/C/man2/select.2:77 build/C/man2/select_tut.2:69
3682 #: build/C/man3/sockatmark.3:34
3683 msgid ""
3684 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3685 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
3686
3687 #. type: Plain text
3688 #: build/C/man2/select.2:81 build/C/man2/select_tut.2:73
3689 msgid ""
3690 "B<pselect>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ "
3691 "600"
3692 msgstr ""
3693 "B<pselect>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ "
3694 "600"
3695
3696 #. type: Plain text
3697 #: build/C/man2/select.2:92
3698 msgid ""
3699 "B<select>()  and B<pselect>()  allow a program to monitor multiple file "
3700 "descriptors, waiting until one or more of the file descriptors become \"ready"
3701 "\" for some class of I/O operation (e.g., input possible).  A file "
3702 "descriptor is considered ready if it is possible to perform the "
3703 "corresponding I/O operation (e.g., B<read>(2))  without blocking."
3704 msgstr ""
3705 "B<select>()  や B<pselect>()  を使うと、プログラムで複数のファイルディスクリ"
3706 "プタを監視し、 一つ以上のファイルディスクリプタがある種の I/O 操作の 「ready "
3707 "(準備ができた)」状態 (例えば、読み込み可能になった状態)  になるまで待つことが"
3708 "できる。 ファイルディスクリプタが ready (準備ができた) とは、 対応する I/O 操"
3709 "作 (例えば B<read>(2)  など) が停止 (block) なしに実行可能な状態にあることを"
3710 "意味する。"
3711
3712 #. type: Plain text
3713 #: build/C/man2/select.2:98
3714 msgid ""
3715 "The operation of B<select>()  and B<pselect>()  is identical, with three "
3716 "differences:"
3717 msgstr ""
3718 "B<select>()  と B<pselect>()  の動作は同じであるが、以下の 3 点が異なる:"
3719
3720 #. type: TP
3721 #: build/C/man2/select.2:98
3722 #, no-wrap
3723 msgid "(i)"
3724 msgstr "(i)"
3725
3726 #. type: Plain text
3727 #: build/C/man2/select.2:108
3728 msgid ""
3729 "B<select>()  uses a timeout that is a I<struct timeval> (with seconds and "
3730 "microseconds), while B<pselect>()  uses a I<struct timespec> (with seconds "
3731 "and nanoseconds)."
3732 msgstr ""
3733 "B<select>()  では、タイムアウト時間の指定に構造体 I<struct timeval> (秒・マイ"
3734 "クロ秒単位) を用いる。 一方、 B<pselect>()  関数では、構造体 I<struct "
3735 "timespec> (秒・ナノ秒単位) を用いる。"
3736
3737 #. type: TP
3738 #: build/C/man2/select.2:108
3739 #, no-wrap
3740 msgid "(ii)"
3741 msgstr "(ii)"
3742
3743 #. type: Plain text
3744 #: build/C/man2/select.2:116
3745 msgid ""
3746 "B<select>()  may update the I<timeout> argument to indicate how much time "
3747 "was left.  B<pselect>()  does not change this argument."
3748 msgstr ""
3749 "B<select>()  は残り時間を示す I<timeout> 引き数を更新することがある。 "
3750 "B<pselect>()  はこの引き数を変更しない。"
3751
3752 #. type: TP
3753 #: build/C/man2/select.2:116
3754 #, no-wrap
3755 msgid "(iii)"
3756 msgstr "(iii)"
3757
3758 #. type: Plain text
3759 #: build/C/man2/select.2:125
3760 msgid ""
3761 "B<select>()  has no I<sigmask> argument, and behaves as B<pselect>()  called "
3762 "with NULL I<sigmask>."
3763 msgstr ""
3764 "B<select>()  は I<sigmask> 引き数を持たない。その動作は I<sigmask> に NULL を"
3765 "指定した場合の B<pselect>()  と同じである。"
3766
3767 #. type: Plain text
3768 #: build/C/man2/select.2:143
3769 msgid ""
3770 "Three independent sets of file descriptors are watched.  Those listed in "
3771 "I<readfds> will be watched to see if characters become available for reading "
3772 "(more precisely, to see if a read will not block; in particular, a file "
3773 "descriptor is also ready on end-of-file), those in I<writefds> will be "
3774 "watched to see if a write will not block, and those in I<exceptfds> will be "
3775 "watched for exceptions.  On exit, the sets are modified in place to indicate "
3776 "which file descriptors actually changed status.  Each of the three file "
3777 "descriptor sets may be specified as NULL if no file descriptors are to be "
3778 "watched for the corresponding class of events."
3779 msgstr ""
3780 "3 つの独立したファイルディスクリプタ集合の監視を行う。 I<readfds> に入れられ"
3781 "たディスクリプタについては、読み込みが可能かどうかを 監視する (より正確にいう"
3782 "と、停止 (block) なしで読むことができるかを 調べる。ファイルの終端 (end-of-"
3783 "file) の場合も、 ファイルディスクリプタは読み込み可能として扱われる)。 "
3784 "I<writefds> に入れられたディスクリプタについては、停止せずに書き込みが 可能か"
3785 "どうかを監視する。 I<exceptfds> にあるものについては、例外の監視を行なう。シ"
3786 "ステムコール終了時に、 どのファイルディスクリプタの状態が実際に変化したか示す"
3787 "ために、 集合の内容が変更される。 ある種別のイベントを監視したいファイルディ"
3788 "スクリプタが一つもない場合には、 対応するファイルディスクリプタ集合に NULL を"
3789 "指定することができる。"
3790
3791 #. type: Plain text
3792 #: build/C/man2/select.2:156
3793 msgid ""
3794 "Four macros are provided to manipulate the sets.  B<FD_ZERO>()  clears a "
3795 "set.  B<FD_SET>()  and B<FD_CLR>()  respectively add and remove a given file "
3796 "descriptor from a set.  B<FD_ISSET>()  tests to see if a file descriptor is "
3797 "part of the set; this is useful after B<select>()  returns."
3798 msgstr ""
3799 "集合を操作するために 4 つのマクロが提供されている。 B<FD_ZERO>()  は集合を消"
3800 "去する。 B<FD_SET>()  と B<FD_CLR>()  はそれぞれ指定したファイルディスクリプ"
3801 "タの集合への追加、削除を行う。 B<FD_ISSET>()  は集合にファイルディスクリプタ"
3802 "があるかどうか調べる; このマクロは B<select>()  が終了した後に使うと便利であ"
3803 "る。"
3804
3805 #. type: Plain text
3806 #: build/C/man2/select.2:159
3807 msgid ""
3808 "I<nfds> is the highest-numbered file descriptor in any of the three sets, "
3809 "plus 1."
3810 msgstr ""
3811 "I<nfds> は 3 つの集合に含まれるファイルディスクリプタの最大値に 1 を足したも"
3812 "のである。"
3813
3814 #. type: Plain text
3815 #: build/C/man2/select.2:175
3816 msgid ""
3817 "I<timeout> is an upper bound on the amount of time elapsed before B<select>"
3818 "()  returns.  If both fields of the I<timeval> structure are zero, then "
3819 "B<select>()  returns immediately.  (This is useful for polling.)  If "
3820 "I<timeout> is NULL (no timeout), B<select>()  can block indefinitely."
3821 msgstr ""
3822 "I<timeout> は B<select>()  が復帰するまでの経過時間の上限である。 I<timeval> "
3823 "構造体の両方のフィールドが 0 の場合、 B<select>()  はすぐに復帰する (この機能"
3824 "はポーリング (polling) を行うのに便利である)。 I<timeout> に NULL (タイムアウ"
3825 "トなし)  が指定されると、 B<select>()  は無期限に停止 (block) する。"
3826
3827 #. type: Plain text
3828 #: build/C/man2/select.2:185
3829 msgid ""
3830 "I<sigmask> is a pointer to a signal mask (see B<sigprocmask>(2)); if it is "
3831 "not NULL, then B<pselect>()  first replaces the current signal mask by the "
3832 "one pointed to by I<sigmask>, then does the \"select\" function, and then "
3833 "restores the original signal mask."
3834 msgstr ""
3835 "I<sigmask> は、シグナルマスク (B<sigprocmask>(2)  を参照) へのポインタであ"
3836 "る。 I<sigmask> が NULL でない場合、 B<pselect>()  は I<sigmask> が指している"
3837 "シグナルマスクで現在のシグナルマスクを置き換えてから、 \"select\" 関数を実行"
3838 "し、 終了後にシグナルマスクを元のシグナルマスクに戻す。"
3839
3840 #. type: Plain text
3841 #: build/C/man2/select.2:191
3842 msgid ""
3843 "Other than the difference in the precision of the I<timeout> argument, the "
3844 "following B<pselect>()  call:"
3845 msgstr ""
3846 "I<timeout> 引き数の精度の違いを除くと、以下の B<pselect>()  の呼び出しは、"
3847
3848 #. type: Plain text
3849 #: build/C/man2/select.2:195
3850 #, no-wrap
3851 msgid ""
3852 "    ready = pselect(nfds, &readfds, &writefds, &exceptfds,\n"
3853 "                    timeout, &sigmask);\n"
3854 msgstr ""
3855 "    ready = pselect(nfds, &readfds, &writefds, &exceptfds,\n"
3856 "                    timeout, &sigmask);\n"
3857
3858 #. type: Plain text
3859 #: build/C/man2/select.2:200
3860 msgid "is equivalent to I<atomically> executing the following calls:"
3861 msgstr "次のコールを I<atomic> に実行するのと等価である。"
3862
3863 #. type: Plain text
3864 #: build/C/man2/select.2:203
3865 #, no-wrap
3866 msgid "    sigset_t origmask;\n"
3867 msgstr "    sigset_t origmask;\n"
3868
3869 #. type: Plain text
3870 #: build/C/man2/select.2:207
3871 #, no-wrap
3872 msgid ""
3873 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
3874 "    ready = select(nfds, &readfds, &writefds, &exceptfds, timeout);\n"
3875 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
3876 msgstr ""
3877 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
3878 "    ready = select(nfds, &readfds, &writefds, &exceptfds, timeout);\n"
3879 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
3880
3881 #. type: Plain text
3882 #: build/C/man2/select.2:228
3883 msgid ""
3884 "The reason that B<pselect>()  is needed is that if one wants to wait for "
3885 "either a signal or for a file descriptor to become ready, then an atomic "
3886 "test is needed to prevent race conditions.  (Suppose the signal handler sets "
3887 "a global flag and returns.  Then a test of this global flag followed by a "
3888 "call of B<select>()  could hang indefinitely if the signal arrived just "
3889 "after the test but just before the call.  By contrast, B<pselect>()  allows "
3890 "one to first block signals, handle the signals that have come in, then call "
3891 "B<pselect>()  with the desired I<sigmask>, avoiding the race.)"
3892 msgstr ""
3893 "B<pselect>()  が必要になる理由は、シグナルやファイルディスクリプタの状態変化"
3894 "を 待ちたいときには、競合状態を避けるために atomic なテストが必要になる から"
3895 "である。 (シグナルハンドラが大域フラグを設定して戻る場合を考えてみよう。 この"
3896 "大域フラグのテストに続けて B<select>()  を呼び出すと、 シグナルがテストの直後"
3897 "かつ呼び出しの直前に届いた時には B<select>()  は永久にハングしてしまうかもし"
3898 "れない。 一方、 B<pselect>()  を使うと、まずシグナルを禁止 (block) して、入っ"
3899 "てくるシグナルを操作し、 望みの I<sigmask> で B<pselect>()  を呼び出すこと"
3900 "で、前記の競合を避けることができる。)"
3901
3902 #. type: SS
3903 #: build/C/man2/select.2:228
3904 #, no-wrap
3905 msgid "The timeout"
3906 msgstr "タイムアウト"
3907
3908 #. type: Plain text
3909 #: build/C/man2/select.2:232
3910 msgid ""
3911 "The time structures involved are defined in I<E<lt>sys/time.hE<gt>> and look "
3912 "like"
3913 msgstr ""
3914 "これらの関数で使用される時間関連の構造体は、 I<E<lt>sys/time.hE<gt>> で"
3915
3916 #. type: Plain text
3917 #: build/C/man2/select.2:239
3918 #, no-wrap
3919 msgid ""
3920 "struct timeval {\n"
3921 "    long    tv_sec;         /* seconds */\n"
3922 "    long    tv_usec;        /* microseconds */\n"
3923 "};\n"
3924 msgstr ""
3925 "struct timeval {\n"
3926 "    long    tv_sec;         /* 秒 */\n"
3927 "    long    tv_usec;        /* マイクロ秒 */\n"
3928 "};\n"
3929
3930 #. type: Plain text
3931 #: build/C/man2/select.2:243
3932 msgid "and"
3933 msgstr "や"
3934
3935 #. type: Plain text
3936 #: build/C/man2/select.2:250
3937 #, no-wrap
3938 msgid ""
3939 "struct timespec {\n"
3940 "    long    tv_sec;         /* seconds */\n"
3941 "    long    tv_nsec;        /* nanoseconds */\n"
3942 "};\n"
3943 msgstr ""
3944 "struct timespec {\n"
3945 "    long    tv_sec;         /* 秒 */\n"
3946 "    long    tv_nsec;        /* ナノ秒 */\n"
3947 "};\n"
3948
3949 #. type: Plain text
3950 #: build/C/man2/select.2:254
3951 msgid "(However, see below on the POSIX.1-2001 versions.)"
3952 msgstr ""
3953 "のように定義されている。 (POSIX.1-2001 での定義については下記の「注意」を参"
3954 "照)"
3955
3956 #. type: Plain text
3957 #: build/C/man2/select.2:262
3958 msgid ""
3959 "Some code calls B<select>()  with all three sets empty, I<nfds> zero, and a "
3960 "non-NULL I<timeout> as a fairly portable way to sleep with subsecond "
3961 "precision."
3962 msgstr ""
3963 "秒単位以下の精度でスリープを実現する 移植性の高い方法として、 3 つの集合全て"
3964 "を空、 I<nfds> を 0 、 I<timeout> を NULL でない値に設定して B<select>()  を"
3965 "呼び出すという方法を使っているコードもある。"
3966
3967 #.  .PP - it is rumored that:
3968 #.  On BSD, when a timeout occurs, the file descriptor bits are not changed.
3969 #.  - it is certainly true that:
3970 #.  Linux follows SUSv2 and sets the bit masks to zero upon a timeout.
3971 #. type: Plain text
3972 #: build/C/man2/select.2:285
3973 msgid ""
3974 "On Linux, B<select>()  modifies I<timeout> to reflect the amount of time not "
3975 "slept; most other implementations do not do this.  (POSIX.1-2001 permits "
3976 "either behavior.)  This causes problems both when Linux code which reads "
3977 "I<timeout> is ported to other operating systems, and when code is ported to "
3978 "Linux that reuses a I<struct timeval> for multiple B<select>()s in a loop "
3979 "without reinitializing it.  Consider I<timeout> to be undefined after "
3980 "B<select>()  returns."
3981 msgstr ""
3982 "Linux では、 B<select>()  は I<timeout> を変更し、残りの停止時間を反映するよ"
3983 "うになっているが、 他のほとんどの実装ではこのようになっていない "
3984 "(POSIX.1-2001 はどちらの動作も認めている)。 このため、 I<timeout> を参照して"
3985 "いる Linux のコードを他のオペレーティング・システムへ 移植する場合、問題が起"
3986 "こる。 また、ループの中で I<timeval> 構造体を初期化せずにそのまま再利用して "
3987 "B<select>()  を複数回行なっているコードを Linux へ移植する場合にも、問題が起"
3988 "こる。 B<select>()  から復帰した後は I<timeout> は未定義であると考えるべきで"
3989 "ある。"
3990
3991 #. type: Plain text
3992 #: build/C/man2/select.2:302
3993 msgid ""
3994 "On success, B<select>()  and B<pselect>()  return the number of file "
3995 "descriptors contained in the three returned descriptor sets (that is, the "
3996 "total number of bits that are set in I<readfds>, I<writefds>, I<exceptfds>)  "
3997 "which may be zero if the timeout expires before anything interesting "
3998 "happens.  On error, -1 is returned, and I<errno> is set appropriately; the "
3999 "sets and I<timeout> become undefined, so do not rely on their contents after "
4000 "an error."
4001 msgstr ""
4002 "成功した場合、 B<select>()  と B<pselect>()  は更新された 3 つのディスクリプ"
4003 "タ集合に含まれている ファイルディスクリプタの数 (つまり、 I<readfds>, "
4004 "I<writefds>, I<exceptfds> 中の 1 になっているビットの総数) を返す。 何も起こ"
4005 "らずに時間切れになった場合、 ディスクリプタの数は 0 になることもある。 エラー"
4006 "ならば -1 を返し、 I<errno> に適切な値が設定される; 集合と I<timeout> は未定"
4007 "義となるので、エラーが起こった後はそれらの内容を信頼してはならない。"
4008
4009 #. type: Plain text
4010 #: build/C/man2/select.2:308
4011 msgid ""
4012 "An invalid file descriptor was given in one of the sets.  (Perhaps a file "
4013 "descriptor that was already closed, or one on which an error has occurred.)"
4014 msgstr ""
4015 "いずれかの集合に無効なファイルディスクリプタが指定された (おそらくは、すでに"
4016 "クローズされたファイルディスクリプタか、 エラーが発生したファイルディスクリプ"
4017 "タが指定された)。"
4018
4019 #. type: Plain text
4020 #: build/C/man2/select.2:312
4021 msgid "A signal was caught; see B<signal>(7)."
4022 msgstr "シグナルを受信した。"
4023
4024 #. type: Plain text
4025 #: build/C/man2/select.2:318
4026 msgid ""
4027 "I<nfds> is negative or the value contained within I<timeout> is invalid."
4028 msgstr "I<n> が負、または I<timeout> に入っている値が不正である。"
4029
4030 #. type: Plain text
4031 #: build/C/man2/select.2:321
4032 msgid "unable to allocate memory for internal tables."
4033 msgstr "内部テーブルにメモリを割り当てることができなかった。"
4034
4035 #. type: Plain text
4036 #: build/C/man2/select.2:327
4037 msgid ""
4038 "B<pselect>()  was added to Linux in kernel 2.6.16.  Prior to this, B<pselect>"
4039 "()  was emulated in glibc (but see BUGS)."
4040 msgstr ""
4041 "B<pselect>()  はカーネル 2.6.16 で Linux に追加された。 それ以前は、 "
4042 "B<pselect>()  は glibc でエミュレートされていた (「バグ」の章を参照)。"
4043
4044 #. type: Plain text
4045 #: build/C/man2/select.2:338
4046 msgid ""
4047 "B<select>()  conforms to POSIX.1-2001 and 4.4BSD (B<select>()  first "
4048 "appeared in 4.2BSD).  Generally portable to/from non-BSD systems supporting "
4049 "clones of the BSD socket layer (including System V variants).  However, note "
4050 "that the System V variant typically sets the timeout variable before exit, "
4051 "but the BSD variant does not."
4052 msgstr ""
4053 "B<select>()  は POSIX.1-2001 と 4.4BSD (B<select>()  は 4.2BSD で最初に登場し"
4054 "た) に準拠する。 BSD ソケット層のクローンをサポートしている非 BSD システム "
4055 "(System V 系も含む) との間でだいたい移植性がある。しかし System V 系では たい"
4056 "がい timeout 変数を exit の前にセットするが、 BSD 系ではそうでないので注意す"
4057 "ること。"
4058
4059 #. type: Plain text
4060 #: build/C/man2/select.2:342
4061 msgid "B<pselect>()  is defined in POSIX.1g, and in POSIX.1-2001."
4062 msgstr "B<pselect>()  は POSIX.1g と POSIX.1-2001 で定義されている。"
4063
4064 #. type: Plain text
4065 #: build/C/man2/select.2:359
4066 msgid ""
4067 "An I<fd_set> is a fixed size buffer.  Executing B<FD_CLR>()  or B<FD_SET>()  "
4068 "with a value of I<fd> that is negative or is equal to or larger than "
4069 "B<FD_SETSIZE> will result in undefined behavior.  Moreover, POSIX requires "
4070 "I<fd> to be a valid file descriptor."
4071 msgstr ""
4072 "I<fd_set> は固定サイズのバッファである。 負や B<FD_SETSIZE> 以上の値を持つ "
4073 "I<fd> に対して B<FD_CLR>()  や B<FD_SET>()  を実行した場合、 どのような動作を"
4074 "するかは定義されていない。 また、 POSIX では I<fd> は有効なファイルディスクリ"
4075 "プタでなければならないと規定されている。"
4076
4077 #. type: Plain text
4078 #: build/C/man2/select.2:368
4079 msgid ""
4080 "Concerning the types involved, the classical situation is that the two "
4081 "fields of a I<timeval> structure are typed as I<long> (as shown above), and "
4082 "the structure is defined in I<E<lt>sys/time.hE<gt>>.  The POSIX.1-2001 "
4083 "situation is"
4084 msgstr ""
4085 "型宣言に関しては、昔ながらの状況では I<timeval> 構造体の 2 つのフィールドは "
4086 "(上記のように) 両方とも I<long> 型であり、構造体は I<E<lt>sys/time.hE<gt>> で"
4087 "定義されている。 POSIX.1-2001 の下では、以下のようになっている。"
4088
4089 #. type: Plain text
4090 #: build/C/man2/select.2:375
4091 #, no-wrap
4092 msgid ""
4093 "struct timeval {\n"
4094 "    time_t         tv_sec;     /* seconds */\n"
4095 "    suseconds_t    tv_usec;    /* microseconds */\n"
4096 "};\n"
4097 msgstr ""
4098 "struct timeval {\n"
4099 "\t time_t         tv_sec;     /* 秒 */\n"
4100 "\t suseconds_t    tv_usec;    /* マイクロ秒 */\n"
4101 "};\n"
4102
4103 #. type: Plain text
4104 #: build/C/man2/select.2:386
4105 msgid ""
4106 "where the structure is defined in I<E<lt>sys/select.hE<gt>> and the data "
4107 "types I<time_t> and I<suseconds_t> are defined in I<E<lt>sys/types.hE<gt>>."
4108 msgstr ""
4109 "この構造体は I<E<lt>sys/select.hE<gt>> で定義されており、データ型 I<time_t> "
4110 "と I<suseconds_t> は I<E<lt>sys/types.hE<gt>> で定義されている。"
4111
4112 #. type: Plain text
4113 #: build/C/man2/select.2:398
4114 msgid ""
4115 "Concerning prototypes, the classical situation is that one should include "
4116 "I<E<lt>time.hE<gt>> for B<select>().  The POSIX.1-2001 situation is that one "
4117 "should include I<E<lt>sys/select.hE<gt>> for B<select>()  and B<pselect>()."
4118 msgstr ""
4119 "プロトタイプに関しては、昔ながらの状況で B<select>()  を使いたい場合は、 "
4120 "I<E<lt>time.hE<gt>> をインクルードすればよい。 POSIX.1-2001 の環境で "
4121 "B<select>()  と B<pselect>()  を使いたい場合は、 I<E<lt>sys/select.hE<gt>> を"
4122 "インクルードすればよい。"
4123
4124 #. type: Plain text
4125 #: build/C/man2/select.2:410
4126 msgid ""
4127 "Libc4 and libc5 do not have a I<E<lt>sys/select.hE<gt>> header; under glibc "
4128 "2.0 and later this header exists.  Under glibc 2.0 it unconditionally gives "
4129 "the wrong prototype for B<pselect>().  Under glibc 2.1 to 2.2.1 it gives "
4130 "B<pselect>()  when B<_GNU_SOURCE> is defined.  Since glibc 2.2.2 the "
4131 "requirements are as shown in the SYNOPSIS."
4132 msgstr ""
4133 "ヘッダファイル I<E<lt>sys/select.hE<gt>> は libc4 と libc5 にはなく、glibc "
4134 "2.0 以降に存在する。 悪いことに glibc 2.0 以前では B<pselect>()  のプロトタイ"
4135 "プが間違っている。 glibc 2.1 から 2.2.1 では B<_GNU_SOURCE> が定義されている"
4136 "場合に、 B<pselect>()  が提供される。 glibc 2.2.2 以降では、 B<pselect>()  を"
4137 "使用するには、「書式」に記載された要件を満たす必要がある。"
4138
4139 #. type: SS
4140 #: build/C/man2/select.2:410
4141 #, no-wrap
4142 msgid "Linux Notes"
4143 msgstr "Linux での注意"
4144
4145 #. type: Plain text
4146 #: build/C/man2/select.2:425
4147 #, fuzzy
4148 #| msgid ""
4149 #| "The Linux B<pselect>()  system call modifies its I<timeout> argument.  "
4150 #| "However, the glibc wrapper function hides this behavior by using a local "
4151 #| "variable for the timeout argument that is passed to the system call.  "
4152 #| "Thus, the glibc B<pselect>()  function does not modify its timeout "
4153 #| "argument; this is the behavior required by POSIX.1-2001."
4154 msgid ""
4155 "The Linux B<pselect>()  system call modifies its I<timeout> argument.  "
4156 "However, the glibc wrapper function hides this behavior by using a local "
4157 "variable for the timeout argument that is passed to the system call.  Thus, "
4158 "the glibc B<pselect>()  function does not modify its I<timeout> argument; "
4159 "this is the behavior required by POSIX.1-2001."
4160 msgstr ""
4161 "Linux の B<pselect>()  システムコールは I<timeout> 引き数を変更する。 しか"
4162 "し、 glibc のラッパー関数は、システムコールに渡す timeout 引き数 としてローカ"
4163 "ル変数を使うことでこの動作を隠蔽している。 このため、glibc の B<pselect>()  "
4164 "関数は timeout 引き数を変更しない。 これが POSIX.1-2001 が要求している動作で"
4165 "ある。"
4166
4167 #. type: Plain text
4168 #: build/C/man2/select.2:431
4169 msgid ""
4170 "Glibc 2.0 provided a version of B<pselect>()  that did not take a I<sigmask> "
4171 "argument."
4172 msgstr ""
4173 "glibc 2.0 では、 I<sigmask> 引き数を取らないバージョンの B<pselect>()  が提供"
4174 "されていた。"
4175
4176 #. type: Plain text
4177 #: build/C/man2/select.2:444
4178 msgid ""
4179 "Starting with version 2.1, glibc provided an emulation of B<pselect>()  that "
4180 "was implemented using B<sigprocmask>(2)  and B<select>().  This "
4181 "implementation remained vulnerable to the very race condition that B<pselect>"
4182 "()  was designed to prevent.  Modern versions of glibc use the (race-free)  "
4183 "B<pselect>()  system call on kernels where it is provided."
4184 msgstr ""
4185 "バージョン 2.1 以降の glibc では、 B<pselect>()  は B<sigprocmask>(2)  と "
4186 "B<select>()  を使ってエミュレートされていた。 この実装にはきわどい競合条件に"
4187 "おいて脆弱性が残っていた。 この競合条件における問題を防止するために "
4188 "B<pselect>()  は設計されたのである。 最近のバージョンの glibc では、カーネル"
4189 "がサポートしている場合には、 (競合が起こらない)  B<pselect>()  システムコール"
4190 "が使用される。"
4191
4192 #. type: Plain text
4193 #: build/C/man2/select.2:453
4194 msgid ""
4195 "On systems that lack B<pselect>(), reliable (and more portable) signal "
4196 "trapping can be achieved using the self-pipe trick (where a signal handler "
4197 "writes a byte to a pipe whose other end is monitored by B<select>()  in the "
4198 "main program.)"
4199 msgstr ""
4200 "B<pselect>()  がないシステムにおいて、 シグナルの捕捉を信頼性があり (移植性も"
4201 "高い) 方法で行うには、 自己パイプ (self-pipe) という技を使うとよい (シグナル"
4202 "ハンドラはパイプへ 1 バイトのデータを書き込み、同じパイプのもう一端をメインプ"
4203 "ログラムの B<select>()  で監視するという方法である)。"
4204
4205 #.  Stevens discusses a case where accept can block after select
4206 #.  returns successfully because of an intervening RST from the client.
4207 #.  Maybe the kernel should have returned EIO in such a situation?
4208 #. type: Plain text
4209 #: build/C/man2/select.2:469
4210 msgid ""
4211 "Under Linux, B<select>()  may report a socket file descriptor as \"ready for "
4212 "reading\", while nevertheless a subsequent read blocks.  This could for "
4213 "example happen when data has arrived but upon examination has wrong checksum "
4214 "and is discarded.  There may be other circumstances in which a file "
4215 "descriptor is spuriously reported as ready.  Thus it may be safer to use "
4216 "B<O_NONBLOCK> on sockets that should not block."
4217 msgstr ""
4218 "Linux では、 B<select>()  がソケットファイルディスクリプタで \"読み込みの準備"
4219 "ができた\" と報告した場合でも、 この後で read を行うと停止 (block) することが"
4220 "ある。このような状況は、 例えば、データが到着したが、検査でチェックサム異常が"
4221 "見つかり廃棄された時 などに起こりえる。他にもファイルディスクリプタが準備でき"
4222 "たと間違って 報告される状況が起こるかもしれない。 したがって、停止すべきでは"
4223 "ないソケットに対しては B<O_NONBLOCK> を使うとより安全であろう。"
4224
4225 #. type: Plain text
4226 #: build/C/man2/select.2:484
4227 msgid ""
4228 "On Linux, B<select>()  also modifies I<timeout> if the call is interrupted "
4229 "by a signal handler (i.e., the B<EINTR> error return).  This is not "
4230 "permitted by POSIX.1-2001.  The Linux B<pselect>()  system call has the same "
4231 "behavior, but the glibc wrapper hides this behavior by internally copying "
4232 "the I<timeout> to a local variable and passing that variable to the system "
4233 "call."
4234 msgstr ""
4235 "Linux では、 B<select>()  がシグナルハンドラにより割り込まれた場合 (つまり "
4236 "B<EINTR> エラーが返る場合)、 I<timeout> も変更する。 これは POSIX.1-2001 では"
4237 "認められていない挙動である。 Linux の B<pselect>()  システムコールも同じ挙動"
4238 "をするが、 glibc のラッパー関数がこの挙動を隠蔽している。 具体的には、glibc "
4239 "のラッパー関数の内部で、 I<timeout> をローカル変数にコピーし、 このローカル変"
4240 "数をシステムコールに渡している。"
4241
4242 #. type: Plain text
4243 #: build/C/man2/select.2:491
4244 #, no-wrap
4245 msgid ""
4246 "#include E<lt>stdio.hE<gt>\n"
4247 "#include E<lt>stdlib.hE<gt>\n"
4248 "#include E<lt>sys/time.hE<gt>\n"
4249 "#include E<lt>sys/types.hE<gt>\n"
4250 "#include E<lt>unistd.hE<gt>\n"
4251 msgstr ""
4252 "#include E<lt>stdio.hE<gt>\n"
4253 "#include E<lt>stdlib.hE<gt>\n"
4254 "#include E<lt>sys/time.hE<gt>\n"
4255 "#include E<lt>sys/types.hE<gt>\n"
4256 "#include E<lt>unistd.hE<gt>\n"
4257
4258 #. type: Plain text
4259 #: build/C/man2/select.2:498
4260 #, no-wrap
4261 msgid ""
4262 "int\n"
4263 "main(void)\n"
4264 "{\n"
4265 "    fd_set rfds;\n"
4266 "    struct timeval tv;\n"
4267 "    int retval;\n"
4268 msgstr ""
4269 "int\n"
4270 "main(void)\n"
4271 "{\n"
4272 "    fd_set rfds;\n"
4273 "    struct timeval tv;\n"
4274 "    int retval;\n"
4275
4276 #. type: Plain text
4277 #: build/C/man2/select.2:502
4278 #, no-wrap
4279 msgid ""
4280 "    /* Watch stdin (fd 0) to see when it has input. */\n"
4281 "    FD_ZERO(&rfds);\n"
4282 "    FD_SET(0, &rfds);\n"
4283 msgstr ""
4284 "    /* stdin (fd 0) を監視し、入力があった場合に表示する。*/\n"
4285 "    FD_ZERO(&rfds);\n"
4286 "    FD_SET(0, &rfds);\n"
4287
4288 #. type: Plain text
4289 #: build/C/man2/select.2:506
4290 #, no-wrap
4291 msgid ""
4292 "    /* Wait up to five seconds. */\n"
4293 "    tv.tv_sec = 5;\n"
4294 "    tv.tv_usec = 0;\n"
4295 msgstr ""
4296 "    /* 5 秒間監視する。*/\n"
4297 "    tv.tv_sec = 5;\n"
4298 "    tv.tv_usec = 0;\n"
4299
4300 #. type: Plain text
4301 #: build/C/man2/select.2:509
4302 #, no-wrap
4303 msgid ""
4304 "    retval = select(1, &rfds, NULL, NULL, &tv);\n"
4305 "    /* Don't rely on the value of tv now! */\n"
4306 msgstr ""
4307 "    retval = select(1, &rfds, NULL, NULL, &tv);\n"
4308 "    /* この時点での tv の値を信頼してはならない。*/\n"
4309
4310 #. type: Plain text
4311 #: build/C/man2/select.2:517
4312 #, no-wrap
4313 msgid ""
4314 "    if (retval == -1)\n"
4315 "        perror(\"select()\");\n"
4316 "    else if (retval)\n"
4317 "        printf(\"Data is available now.\\en\");\n"
4318 "        /* FD_ISSET(0, &rfds) will be true. */\n"
4319 "    else\n"
4320 "        printf(\"No data within five seconds.\\en\");\n"
4321 msgstr ""
4322 "    if (retval == -1)\n"
4323 "\tperror(\"select()\");\n"
4324 "    else if (retval)\n"
4325 "        printf(\"今、データが取得できました。\\en\");\n"
4326 "        /* FD_ISSET(0, &rfds) が true になる。*/\n"
4327 "    else\n"
4328 "        printf(\"5 秒以内にデータが入力されませんでした。\\en\");\n"
4329
4330 #. type: Plain text
4331 #: build/C/man2/select.2:520
4332 #, no-wrap
4333 msgid ""
4334 "    exit(EXIT_SUCCESS);\n"
4335 "}\n"
4336 msgstr ""
4337 "    exit(EXIT_SUCCESS);\n"
4338 "}\n"
4339
4340 #. type: Plain text
4341 #: build/C/man2/select.2:524
4342 msgid "For a tutorial with discussion and examples, see B<select_tut>(2)."
4343 msgstr ""
4344 "考察と使用例の書かれたチュートリアルとして、 B<select_tut>(2)  がある。"
4345
4346 #. type: Plain text
4347 #: build/C/man2/select.2:535
4348 msgid ""
4349 "For vaguely related stuff, see B<accept>(2), B<connect>(2), B<poll>(2), "
4350 "B<read>(2), B<recv>(2), B<send>(2), B<sigprocmask>(2), B<write>(2), B<epoll>"
4351 "(7), B<time>(7)"
4352 msgstr ""
4353 "関係がありそうなものを挙げておく: B<accept>(2), B<connect>(2), B<poll>(2), "
4354 "B<read>(2), B<recv>(2), B<send>(2), B<sigprocmask>(2), B<write>(2), B<epoll>"
4355 "(7), B<time>(7)"
4356
4357 #. type: TH
4358 #: build/C/man2/select_tut.2:30
4359 #, no-wrap
4360 msgid "SELECT_TUT"
4361 msgstr "SELECT_TUT"
4362
4363 #. type: TH
4364 #: build/C/man2/select_tut.2:30
4365 #, no-wrap
4366 msgid "2010-06-10"
4367 msgstr "2010-06-10"
4368
4369 #. type: Plain text
4370 #: build/C/man2/select_tut.2:50
4371 #, no-wrap
4372 msgid ""
4373 "B<int select(int >I<nfds>B<, fd_set *>I<readfds>B<, fd_set *>I<writefds>B<,>\n"
4374 "B<           fd_set *>I<exceptfds>B<, struct timeval *>I<utimeout>B<);>\n"
4375 msgstr ""
4376 "B<int select(int >I<nfds>B<, fd_set *>I<readfds>B<, fd_set *>I<writefds>B<,>\n"
4377 "B<           fd_set *>I<exceptfds>B<, struct timeval *>I<utimeout>B<);>\n"
4378
4379 #. type: Plain text
4380 #: build/C/man2/select_tut.2:64
4381 #, no-wrap
4382 msgid ""
4383 "B<int pselect(int >I<nfds>B<, fd_set *>I<readfds>B<, fd_set *>I<writefds>B<,>\n"
4384 "B<            fd_set *>I<exceptfds>B<, const struct timespec *>I<ntimeout>B<,>\n"
4385 "B<            const sigset_t *>I<sigmask>B<);>\n"
4386 msgstr ""
4387 "B<int pselect(int >I<nfds>B<, fd_set *>I<readfds>B<, fd_set *>I<writefds>B<,>\n"
4388 "B<            fd_set *>I<exceptfds>B<, const struct timespec *>I<ntimeout>B<,>\n"
4389 "B<            const sigset_t *>I<sigmask>B<);>\n"
4390
4391 #. type: Plain text
4392 #: build/C/man2/select_tut.2:81
4393 msgid ""
4394 "B<select>()  (or B<pselect>())  is used to efficiently monitor multiple file "
4395 "descriptors, to see if any of them is, or becomes, \"ready\"; that is, to "
4396 "see whether I/O becomes possible, or an \"exceptional condition\" has "
4397 "occurred on any of the descriptors."
4398 msgstr ""
4399 "B<select>()  (や B<pselect>())  を使うと、効率的に複数のファイルディスクリプ"
4400 "タを監視し、 そのファイルディスクリプタのいずれかが 「ready (準備ができた)」"
4401 "状態、つまり I/O (入出力) が可能になっているかや、 ファイルディスクリプタのい"
4402 "ずれかが 「例外状態 (exceptional condition)」が発生したか、を調べることができ"
4403 "る。"
4404
4405 #. type: Plain text
4406 #: build/C/man2/select_tut.2:106
4407 msgid ""
4408 "Its principal arguments are three \"sets\" of file descriptors: I<readfds>, "
4409 "I<writefds>, and I<exceptfds>.  Each set is declared as type I<fd_set>, and "
4410 "its contents can be manipulated with the macros B<FD_CLR>(), B<FD_ISSET>(), "
4411 "B<FD_SET>(), and B<FD_ZERO>().  A newly declared set should first be cleared "
4412 "using B<FD_ZERO>().  B<select>()  modifies the contents of the sets "
4413 "according to the rules described below; after calling B<select>()  you can "
4414 "test if a file descriptor is still present in a set with the B<FD_ISSET>()  "
4415 "macro.  B<FD_ISSET>()  returns nonzero if a specified file descriptor is "
4416 "present in a set and zero if it is not.  B<FD_CLR>()  removes a file "
4417 "descriptor from a set."
4418 msgstr ""
4419 "この関数の主要な引き数は、3種類のファイルディスクリプタの「集合」 "
4420 "I<readfds>, I<writefds>, I<exceptfds> である。 各々の集合は B<fd_set> として"
4421 "宣言され、その内容は B<FD_CLR>(), B<FD_ISSET>(), B<FD_SET>(), B<FD_ZERO>()  "
4422 "といったマクロによって操作できる。 新しく宣言された集合は、まず最初に "
4423 "B<FD_ZERO>()  を使ってクリアすべきである。 B<select>()  はこれらの集合の内容"
4424 "を、以降に述べる規則に従って修正する。 B<select>()  を呼んだ後、ファイルディ"
4425 "スクリプタがまだ集合に存在しているかどうかは、 B<FD_ISSET>()  マクロによって"
4426 "調べることができる。 B<FD_ISSET>()  は指定されたディスクリプタが集合に存在し"
4427 "ていれば 0 以外の値を返し、 存在しなければ 0 を返す。 B<FD_CLR>()  は集合から"
4428 "のファイルディスクリプタの削除を行う。"
4429
4430 #. type: SS
4431 #: build/C/man2/select_tut.2:106
4432 #, no-wrap
4433 msgid "Arguments"
4434 msgstr "引き数"
4435
4436 #. type: TP
4437 #: build/C/man2/select_tut.2:107
4438 #, no-wrap
4439 msgid "I<readfds>"
4440 msgstr "I<readfds>"
4441
4442 #. type: Plain text
4443 #: build/C/man2/select_tut.2:116
4444 msgid ""
4445 "This set is watched to see if data is available for reading from any of its "
4446 "file descriptors.  After B<select>()  has returned, I<readfds> will be "
4447 "cleared of all file descriptors except for those that are immediately "
4448 "available for reading."
4449 msgstr ""
4450 "この集合に含まれるいずれかのファイルディスクリプタで、 データの読み込みが可能"
4451 "になったかどうかを監視する。 B<select>()  から戻る時に、I<readfds> のうち、 "
4452 "直ちに読み込み可能なファイルディスクリプタ以外は 集合から削除される。"
4453
4454 #. type: TP
4455 #: build/C/man2/select_tut.2:116
4456 #, no-wrap
4457 msgid "I<writefds>"
4458 msgstr "I<writefds>"
4459
4460 #. type: Plain text
4461 #: build/C/man2/select_tut.2:125
4462 msgid ""
4463 "This set is watched to see if there is space to write data to any of its "
4464 "file descriptors.  After B<select>()  has returned, I<writefds> will be "
4465 "cleared of all file descriptors except for those that are immediately "
4466 "available for writing."
4467 msgstr ""
4468 "この集合に含まれるいずれかのファイルディスクリプタで、 データを書き込むスペー"
4469 "スがあるかどうかを監視する。 B<select>()  から戻る時に、I<writefds> のうち、 "
4470 "直ちに書き込み可能なファイルディスクリプタ以外は 集合から削除される。"
4471
4472 #. type: TP
4473 #: build/C/man2/select_tut.2:125
4474 #, no-wrap
4475 msgid "I<exceptfds>"
4476 msgstr "I<exceptfds>"
4477
4478 #. type: Plain text
4479 #: build/C/man2/select_tut.2:147
4480 msgid ""
4481 "This set is watched for \"exceptional conditions\".  In practice, only one "
4482 "such exceptional condition is common: the availability of I<out-of-band> "
4483 "(OOB) data for reading from a TCP socket.  See B<recv>(2), B<send>(2), and "
4484 "B<tcp>(7)  for more details about OOB data.  (One other less common case "
4485 "where B<select>(2)  indicates an exceptional condition occurs with "
4486 "pseudoterminals in packet mode; see B<tty_ioctl>(4).)  After B<select>()  "
4487 "has returned, I<exceptfds> will be cleared of all file descriptors except "
4488 "for those for which an exceptional condition has occurred."
4489 msgstr ""
4490 "この集合に含まれるいずれかのファイルディスクリプタで、 「例外状態 "
4491 "(exceptional condition)」が発生したかどうかを監視する。 実際の動作では、普通"
4492 "に起こり得る例外状態は一つだけであり、 それは TCP ソケットで I<帯域外 (out-"
4493 "of-band; OOB)> データが 読み込み可能な場合である。 OOB データの詳細について"
4494 "は、 B<recv>(2), B<send>(2), B<tcp>(7)  を参照のこと。 (これ以外では、まれな"
4495 "ことだが、 パケットモードの擬似端末 (pseudoterminals) で B<select>()  が例外"
4496 "状態を示すことがある。)  B<select>()  が返る時に、I<exceptfds> のうち、 例外"
4497 "状態が発生したディスクリプタ以外は集合から削除される。"
4498
4499 #. type: TP
4500 #: build/C/man2/select_tut.2:147
4501 #, no-wrap
4502 msgid "I<nfds>"
4503 msgstr "I<nfds>"
4504
4505 #. type: Plain text
4506 #: build/C/man2/select_tut.2:154
4507 msgid ""
4508 "This is an integer one more than the maximum of any file descriptor in any "
4509 "of the sets.  In other words, while adding file descriptors to each of the "
4510 "sets, you must calculate the maximum integer value of all of them, then "
4511 "increment this value by one, and then pass this as I<nfds>."
4512 msgstr ""
4513 "全ての集合に含まれるファイルディスクリプタのうち、 値が最大のものに 1 を足し"
4514 "た整数である。 すなわち、ファイルディスクリプタを各集合に加える作業の途中"
4515 "で、 全てのファイルディスクリプタを見て最大値を求め、 それに 1 を加えて "
4516 "I<nfds> として渡さないといけない、ということだ。"
4517
4518 #. type: TP
4519 #: build/C/man2/select_tut.2:154
4520 #, no-wrap
4521 msgid "I<utimeout>"
4522 msgstr "I<utimeout>"
4523
4524 #. type: Plain text
4525 #: build/C/man2/select_tut.2:167
4526 msgid ""
4527 "This is the longest time B<select>()  may wait before returning, even if "
4528 "nothing interesting happened.  If this value is passed as NULL, then "
4529 "B<select>()  blocks indefinitely waiting for a file descriptor to become "
4530 "ready.  I<utimeout> can be set to zero seconds, which causes B<select>()  to "
4531 "return immediately, with information about the readiness of file descriptors "
4532 "at the time of the call.  The structure I<struct timeval> is defined as:"
4533 msgstr ""
4534 "(何も起こらなかった場合に)  B<select>()  が戻る前に待つ最大時間である。 この"
4535 "値に NULL を渡すと、 B<select>()  はファイルディスクリプタのいずれかが ready "
4536 "(準備ができた) 状態に なるまで待ち続けてずっと停止する。 I<utimeout> は 0 秒"
4537 "にすることもでき、 この場合 B<select>()  は直ちに返り、呼び出し時点のファイル"
4538 "ディスクリプタの状態に 関する情報が返される。 構造体 I<struct timeval> は次の"
4539 "ように定義されている:"
4540
4541 #. type: Plain text
4542 #: build/C/man2/select_tut.2:174
4543 #, no-wrap
4544 msgid ""
4545 "struct timeval {\n"
4546 "    time_t tv_sec;    /* seconds */\n"
4547 "    long tv_usec;     /* microseconds */\n"
4548 "};\n"
4549 msgstr ""
4550 "struct timeval {\n"
4551 "    time_t tv_sec;    /* seconds */\n"
4552 "    long tv_usec;     /* microseconds */\n"
4553 "};\n"
4554
4555 #. type: TP
4556 #: build/C/man2/select_tut.2:176
4557 #, no-wrap
4558 msgid "I<ntimeout>"
4559 msgstr "I<ntimeout>"
4560
4561 #. type: Plain text
4562 #: build/C/man2/select_tut.2:185
4563 msgid ""
4564 "This argument for B<pselect>()  has the same meaning as I<utimeout>, but "
4565 "I<struct timespec> has nanosecond precision as follows:"
4566 msgstr ""
4567 "B<pselect>()  のこの引き数は I<utimeout> と同じ意味を持つが、 I<struct "
4568 "timespec> は次に示すようにナノ秒の精度を持つ。"
4569
4570 #. type: Plain text
4571 #: build/C/man2/select_tut.2:192
4572 #, no-wrap
4573 msgid ""
4574 "struct timespec {\n"
4575 "    long tv_sec;    /* seconds */\n"
4576 "    long tv_nsec;   /* nanoseconds */\n"
4577 "};\n"
4578 msgstr ""
4579 "struct timespec {\n"
4580 "    long tv_sec;    /* seconds */\n"
4581 "    long tv_nsec;   /* nanoseconds */\n"
4582 "};\n"
4583
4584 #. type: TP
4585 #: build/C/man2/select_tut.2:194
4586 #, no-wrap
4587 msgid "I<sigmask>"
4588 msgstr "I<sigmask>"
4589
4590 #. type: Plain text
4591 #: build/C/man2/select_tut.2:211
4592 msgid ""
4593 "This argument holds a set of signals that the kernel should unblock (i.e., "
4594 "remove from the signal mask of the calling thread), while the caller is "
4595 "blocked inside the B<pselect>()  call (see B<sigaddset>(3)  and "
4596 "B<sigprocmask>(2)).  It may be NULL, in which case the call does not modify "
4597 "the signal mask on entry and exit to the function.  In this case, B<pselect>"
4598 "()  will then behave just like B<select>()."
4599 msgstr ""
4600 "この引き数は、呼び出し側が B<pselect>()  内部で停止している間に、カーネルが通"
4601 "知を許可すべきシグナル集合 (すなわち、呼び出したスレッドのシグナルマスクから"
4602 "削除すべきシグナル集合)  を保持する (B<sigaddset>(3)  と B<sigprocmask>(2)  "
4603 "を参照)。 この引き数は NULL にすることもでき、その場合はこの関数へ 入るとき・"
4604 "出るときにシグナルマスクを変更しない。 この場合、 B<pselect>()  は B<select>"
4605 "()  と全く同じ動作となる。"
4606
4607 #. type: SS
4608 #: build/C/man2/select_tut.2:211
4609 #, no-wrap
4610 msgid "Combining Signal and Data Events"
4611 msgstr "シグナルとデータイベントを組み合わせる"
4612
4613 #. type: Plain text
4614 #: build/C/man2/select_tut.2:255
4615 msgid ""
4616 "B<pselect>()  is useful if you are waiting for a signal as well as for file "
4617 "descriptor(s) to become ready for I/O.  Programs that receive signals "
4618 "normally use the signal handler only to raise a global flag.  The global "
4619 "flag will indicate that the event must be processed in the main loop of the "
4620 "program.  A signal will cause the B<select>()  (or B<pselect>())  call to "
4621 "return with I<errno> set to B<EINTR>.  This behavior is essential so that "
4622 "signals can be processed in the main loop of the program, otherwise B<select>"
4623 "()  would block indefinitely.  Now, somewhere in the main loop will be a "
4624 "conditional to check the global flag.  So we must ask: what if a signal "
4625 "arrives after the conditional, but before the B<select>()  call? The answer "
4626 "is that B<select>()  would block indefinitely, even though an event is "
4627 "actually pending.  This race condition is solved by the B<pselect>()  call.  "
4628 "This call can be used to set the signal mask to a set of signals that are "
4629 "only to be received within the B<pselect>()  call.  For instance, let us say "
4630 "that the event in question was the exit of a child process.  Before the "
4631 "start of the main loop, we would block B<SIGCHLD> using B<sigprocmask>(2).  "
4632 "Our B<pselect>()  call would enable B<SIGCHLD> by using an empty signal "
4633 "mask.  Our program would look like:"
4634 msgstr ""
4635 "ファイルディスクリプタが I/O 可能な状態になるのと同時に シグナルも待ちたい場"
4636 "合には、 B<pselect>()  が便利である。 シグナルを受信するプログラムは、通常"
4637 "は、 シグナルハンドラをグローバルなフラグを立てるためだけに使う。 このグロー"
4638 "バルなフラグは、 そのイベントをプログラムのメインループで 処理しなければなら"
4639 "ないことを示す。 シグナルを受けると B<select>()  (や B<pselect>())  は "
4640 "I<errno> に B<EINTR> をセットして戻ることになる。 シグナルがプログラムのメイ"
4641 "ンループで処理されるためにはこの動作が不可欠で、 これがないと B<select>()  は"
4642 "永遠に停止し続けることになる。 さて、メインループのどこかにこのグローバルフラ"
4643 "グをチェックする 条件文があるとしよう。ここで少し考えてみないといけない。 "
4644 "「シグナルが条件文の後、しかし B<select>()  コールの前に到着したら どうなるの"
4645 "か?」 答えは「その B<select>()  は、たとえ解決待ちのイベントがあったとして"
4646 "も、 永遠に停止する」である。 この競合状態は B<pselect>()  コールによって解決"
4647 "できる。 このコールを使うと、 B<pselect>()  で受信したいシグナルの集合だけを"
4648 "シグナルマスクに設定することができる。 例えば、問題となっているイベントが子プ"
4649 "ロセスの終了の場合を考えよう。 メインループが始まる前に、 B<SIGCHLD> を "
4650 "B<sigprocmask>(2)  でブロックする。 B<pselect>()  コールでは B<SIGCHLD> を、"
4651 "もともとのシグナルマスクを使って有効にするのだ。 このプログラムは次のようにな"
4652 "る。"
4653
4654 #. type: Plain text
4655 #: build/C/man2/select_tut.2:258
4656 #, no-wrap
4657 msgid "static volatile sig_atomic_t got_SIGCHLD = 0;\n"
4658 msgstr "static volatile sig_atomic_t got_SIGCHLD = 0;\n"
4659
4660 #. type: Plain text
4661 #: build/C/man2/select_tut.2:264
4662 #, no-wrap
4663 msgid ""
4664 "static void\n"
4665 "child_sig_handler(int sig)\n"
4666 "{\n"
4667 "    got_SIGCHLD = 1;\n"
4668 "}\n"
4669 msgstr ""
4670 "static void\n"
4671 "child_sig_handler(int sig)\n"
4672 "{\n"
4673 "    got_SIGCHLD = 1;\n"
4674 "}\n"
4675
4676 #. type: Plain text
4677 #: build/C/man2/select_tut.2:272
4678 #, no-wrap
4679 msgid ""
4680 "int\n"
4681 "main(int argc, char *argv[])\n"
4682 "{\n"
4683 "    sigset_t sigmask, empty_mask;\n"
4684 "    struct sigaction sa;\n"
4685 "    fd_set readfds, writefds, exceptfds;\n"
4686 "    int r;\n"
4687 msgstr ""
4688 "int\n"
4689 "main(int argc, char *argv[])\n"
4690 "{\n"
4691 "    sigset_t sigmask, empty_mask;\n"
4692 "    struct sigaction sa;\n"
4693 "    fd_set readfds, writefds, exceptfds;\n"
4694 "    int r;\n"
4695
4696 #. type: Plain text
4697 #: build/C/man2/select_tut.2:279
4698 #, no-wrap
4699 msgid ""
4700 "    sigemptyset(&sigmask);\n"
4701 "    sigaddset(&sigmask, SIGCHLD);\n"
4702 "    if (sigprocmask(SIG_BLOCK, &sigmask, NULL) == -1) {\n"
4703 "        perror(\"sigprocmask\");\n"
4704 "        exit(EXIT_FAILURE);\n"
4705 "    }\n"
4706 msgstr ""
4707 "    sigemptyset(&sigmask);\n"
4708 "    sigaddset(&sigmask, SIGCHLD);\n"
4709 "    if (sigprocmask(SIG_BLOCK, &sigmask, NULL) == -1) {\n"
4710 "        perror(\"sigprocmask\");\n"
4711 "        exit(EXIT_FAILURE);\n"
4712 "    }\n"
4713
4714 #. type: Plain text
4715 #: build/C/man2/select_tut.2:287
4716 #, no-wrap
4717 msgid ""
4718 "    sa.sa_flags = 0;\n"
4719 "    sa.sa_handler = child_sig_handler;\n"
4720 "    sigemptyset(&sa.sa_mask);\n"
4721 "    if (sigaction(SIGCHLD, &sa, NULL) == -1) {\n"
4722 "        perror(\"sigaction\");\n"
4723 "        exit(EXIT_FAILURE);\n"
4724 "    }\n"
4725 msgstr ""
4726 "    sa.sa_flags = 0;\n"
4727 "    sa.sa_handler = child_sig_handler;\n"
4728 "    sigemptyset(&sa.sa_mask);\n"
4729 "    if (sigaction(SIGCHLD, &sa, NULL) == -1) {\n"
4730 "        perror(\"sigaction\");\n"
4731 "        exit(EXIT_FAILURE);\n"
4732 "    }\n"
4733
4734 #. type: Plain text
4735 #: build/C/man2/select_tut.2:289
4736 #, no-wrap
4737 msgid "    sigemptyset(&empty_mask);\n"
4738 msgstr "    sigemptyset(&empty_mask);\n"
4739
4740 #. type: Plain text
4741 #: build/C/man2/select_tut.2:293
4742 #, no-wrap
4743 msgid ""
4744 "    for (;;) {          /* main loop */\n"
4745 "        /* Initialize readfds, writefds, and exceptfds\n"
4746 "           before the pselect() call. (Code omitted.) */\n"
4747 msgstr ""
4748 "    for (;;) {          /* main loop */\n"
4749 "        /* Initialize readfds, writefds, and exceptfds\n"
4750 "           before the pselect() call. (Code omitted.) */\n"
4751
4752 #. type: Plain text
4753 #: build/C/man2/select_tut.2:299
4754 #, no-wrap
4755 msgid ""
4756 "        r = pselect(nfds, &readfds, &writefds, &exceptfds,\n"
4757 "                    NULL, &empty_mask);\n"
4758 "        if (r == -1 && errno != EINTR) {\n"
4759 "            /* Handle error */\n"
4760 "        }\n"
4761 msgstr ""
4762 "        r = pselect(nfds, &readfds, &writefds, &exceptfds,\n"
4763 "                    NULL, &empty_mask);\n"
4764 "        if (r == -1 && errno != EINTR) {\n"
4765 "            /* Handle error */\n"
4766 "        }\n"
4767
4768 #. type: Plain text
4769 #: build/C/man2/select_tut.2:302
4770 #, no-wrap
4771 msgid ""
4772 "        if (got_SIGCHLD) {\n"
4773 "            got_SIGCHLD = 0;\n"
4774 msgstr ""
4775 "        if (got_SIGCHLD) {\n"
4776 "            got_SIGCHLD = 0;\n"
4777
4778 #. type: Plain text
4779 #: build/C/man2/select_tut.2:306
4780 #, no-wrap
4781 msgid ""
4782 "            /* Handle signalled event here; e.g., wait() for all\n"
4783 "               terminated children. (Code omitted.) */\n"
4784 "        }\n"
4785 msgstr ""
4786 "            /* Handle signalled event here; e.g., wait() for all\n"
4787 "               terminated children. (Code omitted.) */\n"
4788 "        }\n"
4789
4790 #. type: Plain text
4791 #: build/C/man2/select_tut.2:310
4792 #, no-wrap
4793 msgid ""
4794 "        /* main body of program */\n"
4795 "    }\n"
4796 "}\n"
4797 msgstr ""
4798 "        /* main body of program */\n"
4799 "    }\n"
4800 "}\n"
4801
4802 #. type: SS
4803 #: build/C/man2/select_tut.2:311
4804 #, no-wrap
4805 msgid "Practical"
4806 msgstr "実例"
4807
4808 #. type: Plain text
4809 #: build/C/man2/select_tut.2:332
4810 msgid ""
4811 "So what is the point of B<select>()? Can't I just read and write to my "
4812 "descriptors whenever I want? The point of B<select>()  is that it watches "
4813 "multiple descriptors at the same time and properly puts the process to sleep "
4814 "if there is no activity.  UNIX programmers often find themselves in a "
4815 "position where they have to handle I/O from more than one file descriptor "
4816 "where the data flow may be intermittent.  If you were to merely create a "
4817 "sequence of B<read>(2)  and B<write>(2)  calls, you would find that one of "
4818 "your calls may block waiting for data from/to a file descriptor, while "
4819 "another file descriptor is unused though ready for I/O.  B<select>()  "
4820 "efficiently copes with this situation."
4821 msgstr ""
4822 "実際のところ B<select>()  の大事な点は何なのか? ディスクリプタは好きなときに"
4823 "読み書きできるんじゃないの? B<select>()  の重要なところは、複数のディスクリ"
4824 "プタを同時に監視でき、 なんの動きもなければプロセスを適切にスリープ状態に移行"
4825 "するところにあるのだ。 UNIX プログラマは、 複数のファイルディスクリプタの入出"
4826 "力を同時に扱わねばならず、 しかもデータの流れは間欠的である、という状況によく"
4827 "出会う。 単に B<read>(2)  や B<write>(2)  コールのシーケンスを作るだけでは、"
4828 "それらのコールのどれかが ファイルディスクリプタからのデータを待ってブロックし"
4829 "ており、 別のファイルディスクリプタには I/O が可能なのに使えない、 ということ"
4830 "になってしまうだろう。 B<select>()  を使うとこの状況に効果的に対処できる。"
4831
4832 #. type: SS
4833 #: build/C/man2/select_tut.2:332
4834 #, no-wrap
4835 msgid "Select Law"
4836 msgstr "SELECT の掟"
4837
4838 #. type: Plain text
4839 #: build/C/man2/select_tut.2:345
4840 msgid ""
4841 "Many people who try to use B<select>()  come across behavior that is "
4842 "difficult to understand and produces nonportable or borderline results.  For "
4843 "instance, the above program is carefully written not to block at any point, "
4844 "even though it does not set its file descriptors to nonblocking mode.  It is "
4845 "easy to introduce subtle errors that will remove the advantage of using "
4846 "B<select>(), so here is a list of essentials to watch for when using "
4847 "B<select>()."
4848 msgstr ""
4849 "B<select>()  を使おうとした多くの人は、理解しにくい挙動に出くわし、結果的に "
4850 "できたものは移植性がないか、よくてもギリギリのものになってしまう。 例えば、上"
4851 "記のプログラムは、 集合に含まれるファイルディスクリプタを非停止 "
4852 "(nonblocking) モード にしなくても、どこにもブロックが生じないよう注意して書か"
4853 "れている。 微妙な間違いによって、 B<select>()  を使う利点は簡単に失われてしま"
4854 "う。 そこで、 B<select>()  コールを使うときに注意すべき重要事項を列挙しておく"
4855 "ことにする。"
4856
4857 #. type: Plain text
4858 #: build/C/man2/select_tut.2:354
4859 msgid ""
4860 "You should always try to use B<select>()  without a timeout.  Your program "
4861 "should have nothing to do if there is no data available.  Code that depends "
4862 "on timeouts is not usually portable and is difficult to debug."
4863 msgstr ""
4864 "B<select>()  を使うときは、タイムアウトは設定すべきでない。 処理するデータが"
4865 "無いときには、 あなたのプログラムには何もすることは無いはずである。 タイムア"
4866 "ウトに依存したコードは通常移植性がなく、 デバッグも難しくなる。"
4867
4868 #. type: Plain text
4869 #: build/C/man2/select_tut.2:358
4870 msgid ""
4871 "The value I<nfds> must be properly calculated for efficiency as explained "
4872 "above."
4873 msgstr ""
4874 "上述したように、 効率的なプログラムを書くには I<nfds> の値を適切に計算して与"
4875 "えなければならない。"
4876
4877 #. type: Plain text
4878 #: build/C/man2/select_tut.2:365
4879 msgid ""
4880 "No file descriptor must be added to any set if you do not intend to check "
4881 "its result after the B<select>()  call, and respond appropriately.  See next "
4882 "rule."
4883 msgstr ""
4884 "B<select>()  コールの終了後に結果をチェックして、 適切に対応するつもりのない"
4885 "ファイルディスクリプタは、 どの集合にも加えてはならない。 次のルールも参照。"
4886
4887 #. type: Plain text
4888 #: build/C/man2/select_tut.2:371
4889 msgid ""
4890 "After B<select>()  returns, all file descriptors in all sets should be "
4891 "checked to see if they are ready."
4892 msgstr ""
4893 "B<select>()  から返った後には、全ての集合の全てのファイルディスクリプタについ"
4894 "て 読み書き可能な状態になっているかをチェックすべきである。"
4895
4896 #. type: TP
4897 #: build/C/man2/select_tut.2:371
4898 #, no-wrap
4899 msgid "5."
4900 msgstr "5."
4901
4902 #. type: Plain text
4903 #: build/C/man2/select_tut.2:386
4904 msgid ""
4905 "The functions B<read>(2), B<recv>(2), B<write>(2), and B<send>(2)  do I<not> "
4906 "necessarily read/write the full amount of data that you have requested.  If "
4907 "they do read/write the full amount, it's because you have a low traffic load "
4908 "and a fast stream.  This is not always going to be the case.  You should "
4909 "cope with the case of your functions only managing to send or receive a "
4910 "single byte."
4911 msgstr ""
4912 "B<read>(2), B<recv>(2), B<write>(2), B<send>(2)  といった関数は、こちらが要求"
4913 "した全データを読み書きする必要はI<ない>。 もし全データを読み書きするなら、そ"
4914 "れはトラフィックの負荷が小さく、 ストリームが速い場合だろう。この条件は常に満"
4915 "たされるとは限らない。 これらの関数が頑張っても 1 バイトしか送受信できないよ"
4916 "うな場合も 考慮に入れてやらなければならない。"
4917
4918 #. type: TP
4919 #: build/C/man2/select_tut.2:386
4920 #, no-wrap
4921 msgid "6."
4922 msgstr "6."
4923
4924 #. type: Plain text
4925 #: build/C/man2/select_tut.2:394
4926 msgid ""
4927 "Never read/write only in single bytes at a time unless you are really sure "
4928 "that you have a small amount of data to process.  It is extremely "
4929 "inefficient not to read/write as much data as you can buffer each time.  The "
4930 "buffers in the example below are 1024 bytes although they could easily be "
4931 "made larger."
4932 msgstr ""
4933 "処理するデータ量が小さいことがはっきりとわかっている場合を除いて、 一度に 1 "
4934 "バイトずつ読み書きするようなことはしてはならない。 バッファの許すかぎりのデー"
4935 "タをまとめて読み書きしないと、 非常に効率が悪い。下記の例ではバッファは 1024 "
4936 "バイトにしているが、 このサイズを大きくするのは簡単だろう。"
4937
4938 #. type: TP
4939 #: build/C/man2/select_tut.2:394
4940 #, no-wrap
4941 msgid "7."
4942 msgstr "7."
4943
4944 #.  Nonetheless, you should still cope with these errors for completeness.
4945 #. type: Plain text
4946 #: build/C/man2/select_tut.2:416
4947 msgid ""
4948 "The functions B<read>(2), B<recv>(2), B<write>(2), and B<send>(2)  as well "
4949 "as the B<select>()  call can return -1 with I<errno> set to B<EINTR>, or "
4950 "with I<errno> set to B<EAGAIN> (B<EWOULDBLOCK>).  These results must be "
4951 "properly managed (not done properly above).  If your program is not going to "
4952 "receive any signals, then it is unlikely you will get B<EINTR>.  If your "
4953 "program does not set nonblocking I/O, you will not get B<EAGAIN>."
4954 msgstr ""
4955 "B<read>(2), B<recv>(2), B<write>(2), B<send>(2)  などの関数や B<select>()  "
4956 "コールは、 I<errno> を B<EINTR や EAGAIN> (B<EWOULDBLOCK>)  にして -1 を返す"
4957 "ことがある。 このような結果に対して適切に対応してやらなければならない (上記の"
4958 "例ではしていない)。 書いているプログラムがシグナルを受ける予定がなければ、 "
4959 "B<EINTR> が返されることはあまり考えられない。 書いているプログラムで非ブロッ"
4960 "ク I/O をセットしていない場合は、 B<EAGAIN> が返されることはないだろう。"
4961
4962 #. type: TP
4963 #: build/C/man2/select_tut.2:416
4964 #, no-wrap
4965 msgid "8."
4966 msgstr "8."
4967
4968 #. type: Plain text
4969 #: build/C/man2/select_tut.2:425
4970 msgid ""
4971 "Never call B<read>(2), B<recv>(2), B<write>(2), or B<send>(2)  with a buffer "
4972 "length of zero."
4973 msgstr ""
4974 "決して、引き数に長さ 0 のバッファを指定して B<read>(2), B<recv>(2), B<write>"
4975 "(2), B<send>(2)  を呼び出してはならない。"
4976
4977 #. type: TP
4978 #: build/C/man2/select_tut.2:425
4979 #, no-wrap
4980 msgid "9."
4981 msgstr "9."
4982
4983 #. type: Plain text
4984 #: build/C/man2/select_tut.2:441
4985 msgid ""
4986 "If the functions B<read>(2), B<recv>(2), B<write>(2), and B<send>(2)  fail "
4987 "with errors other than those listed in B<7.>, or one of the input functions "
4988 "returns 0, indicating end of file, then you should I<not> pass that "
4989 "descriptor to B<select>()  again.  In the example below, I close the "
4990 "descriptor immediately, and then set it to -1 to prevent it being included "
4991 "in a set."
4992 msgstr ""
4993 "B<read>(2), B<recv>(2), B<write>(2), B<send>(2)  が B<7.> に示した以外のエ"
4994 "ラーで失敗した場合や、 入力系の関数の一つがファイル末尾を表す 0 を返した場合"
4995 "は、 そのディスクリプタをもう一度 select に渡してはI<ならない>。 下記の例で"
4996 "は、そのディスクリプタをただちにクローズし、 そこには -1 をセットして、 それ"
4997 "が集合に含まれ続けるのを許さないようにしている。"
4998
4999 #. type: TP
5000 #: build/C/man2/select_tut.2:441
5001 #, no-wrap
5002 msgid "10."
5003 msgstr "10."
5004
5005 #. type: Plain text
5006 #: build/C/man2/select_tut.2:448
5007 msgid ""
5008 "The timeout value must be initialized with each new call to B<select>(), "
5009 "since some operating systems modify the structure.  B<pselect>()  however "
5010 "does not modify its timeout structure."
5011 msgstr ""
5012 "タイムアウトの値は B<select>()  を呼ぶたびに初期化すべきである。 OS によって"
5013 "は timeout 構造体が変更される場合があるからである。 但し、 B<pselect>()  は自"
5014 "分の timeout 構造体を変更することはない。"
5015
5016 #. type: TP
5017 #: build/C/man2/select_tut.2:448
5018 #, no-wrap
5019 msgid "11."
5020 msgstr "11."
5021
5022 #.  "I have heard" does not fill me with confidence, and doesn't
5023 #.  belong in a man page, so I've commented this point out.
5024 #.  .TP
5025 #.  11.
5026 #.  I have heard that the Windows socket layer does not cope with OOB data
5027 #.  properly.
5028 #.  It also does not cope with
5029 #.  .BR select ()
5030 #.  calls when no file descriptors are set at all.
5031 #.  Having no file descriptors set is a useful
5032 #.  way to sleep the process with subsecond precision by using the timeout.
5033 #.  (See further on.)
5034 #. type: Plain text
5035 #: build/C/man2/select_tut.2:467
5036 msgid ""
5037 "Since B<select>()  modifies its file descriptor sets, if the call is being "
5038 "used in a loop, then the sets must be reinitialized before each call."
5039 msgstr ""
5040 "B<select>()  はファイルディスクリプタ集合を変更するので、 B<select>()  がルー"
5041 "プの中で使用されている場合には、呼び出しを行う前に毎回 ディスクリプタ集合を初"
5042 "期化し直さなければならない。"
5043
5044 #. type: SS
5045 #: build/C/man2/select_tut.2:467
5046 #, no-wrap
5047 msgid "Usleep Emulation"
5048 msgstr "usleep エミュレーション"
5049
5050 #. type: Plain text
5051 #: build/C/man2/select_tut.2:474
5052 msgid ""
5053 "On systems that do not have a B<usleep>(3)  function, you can call B<select>"
5054 "()  with a finite timeout and no file descriptors as follows:"
5055 msgstr ""
5056 "B<usleep>(3)  関数を持たないシステムでは、 有限のタイムアウトを指定し、ファイ"
5057 "ルディスクリプタを全くセットせずに B<select>()  を呼び出すことで、これを代用"
5058 "できる。 以下のようにする。"
5059
5060 #. type: Plain text
5061 #: build/C/man2/select_tut.2:480
5062 #, no-wrap
5063 msgid ""
5064 "    struct timeval tv;\n"
5065 "    tv.tv_sec = 0;\n"
5066 "    tv.tv_usec = 200000;  /* 0.2 seconds */\n"
5067 "    select(0, NULL, NULL, NULL, &tv);\n"
5068 msgstr ""
5069 "    struct timeval tv;\n"
5070 "    tv.tv_sec = 0;\n"
5071 "    tv.tv_usec = 200000;  /* 0.2 seconds */\n"
5072 "    select(0, NULL, NULL, NULL, &tv);\n"
5073
5074 #. type: Plain text
5075 #: build/C/man2/select_tut.2:483
5076 msgid "This is only guaranteed to work on UNIX systems, however."
5077 msgstr "但し、これが動くと保証されているのは UNIX システムに限られる。"
5078
5079 #. type: Plain text
5080 #: build/C/man2/select_tut.2:488
5081 msgid ""
5082 "On success, B<select>()  returns the total number of file descriptors still "
5083 "present in the file descriptor sets."
5084 msgstr ""
5085 "成功すると、 B<select>()  はファイルディスクリプタ集合に残っている ファイル"
5086 "ディスクリプタの総数を返す。"
5087
5088 #. type: Plain text
5089 #: build/C/man2/select_tut.2:494
5090 msgid ""
5091 "If B<select>()  timed out, then the return value will be zero.  The file "
5092 "descriptors set should be all empty (but may not be on some systems)."
5093 msgstr ""
5094 "B<select>()  がタイムアウトすると、返り値は 0 になる。 その時、ファイルディス"
5095 "クリプタ集合はすべて空である (しかしそうならないシステムもある)。"
5096
5097 #. type: Plain text
5098 #: build/C/man2/select_tut.2:501
5099 msgid ""
5100 "A return value of -1 indicates an error, with I<errno> being set "
5101 "appropriately.  In the case of an error, the contents of the returned sets "
5102 "and the I<struct timeout> contents are undefined and should not be used.  "
5103 "B<pselect>()  however never modifies I<ntimeout>."
5104 msgstr ""
5105 "返り値が -1 の場合はエラーを意味し、 I<errno> が適切にセットされる。エラーが"
5106 "起こった場合、 返された集合の内容や構造体 I<struct timeout> の内容は 未定義と"
5107 "なっており、使用すべきではない。 しかし B<pselect>()  は決して I<ntimeout> を"
5108 "変更しない。"
5109
5110 #. type: Plain text
5111 #: build/C/man2/select_tut.2:510
5112 msgid ""
5113 "Generally speaking, all operating systems that support sockets also support "
5114 "B<select>().  B<select>()  can be used to solve many problems in a portable "
5115 "and efficient way that naive programmers try to solve in a more complicated "
5116 "manner using threads, forking, IPCs, signals, memory sharing, and so on."
5117 msgstr ""
5118 "一般的に言って、ソケットをサポートする全てのオペレーティングシステムは "
5119 "B<select>()  もサポートしている。 B<select>()  を使うと、プログラマがスレッ"
5120 "ド、フォーク、IPC、シグナル、メモリ共有、 等々を使ってもっと複雑な方法で解決"
5121 "しようとする多くの問題が、 移植性がありかつ効率的な方法で解決できる。"
5122
5123 #. type: Plain text
5124 #: build/C/man2/select_tut.2:519
5125 msgid ""
5126 "The B<poll>(2)  system call has the same functionality as B<select>(), and "
5127 "is somewhat more efficient when monitoring sparse file descriptor sets.  It "
5128 "is nowadays widely available, but historically was less portable than "
5129 "B<select>()."
5130 msgstr ""
5131 "B<poll>(2)  システムコールは B<select>()  と同じ機能を持っており、 まばらな"
5132 "ファイルディスクリプタ集合を監視する場合に いくらか効率がよい。 現在では広く"
5133 "利用可能であるが、以前は B<select>()  より移植性の面で劣っていた。"
5134
5135 #. type: Plain text
5136 #: build/C/man2/select_tut.2:527
5137 msgid ""
5138 "The Linux-specific B<epoll>(7)  API provides an interface that is more "
5139 "efficient than B<select>(2)  and B<poll>(2)  when monitoring large numbers "
5140 "of file descriptors."
5141 msgstr ""
5142 "Linux 独自の B<epoll>(7)  API は、多数のファイルディスクリプタを監視する場合"
5143 "に B<select>(2)  や B<poll>(2)  よりも効率的なインタフェースを提供している。"
5144
5145 #. type: Plain text
5146 #: build/C/man2/select_tut.2:532
5147 msgid ""
5148 "Here is an example that better demonstrates the true utility of B<select>"
5149 "().  The listing below is a TCP forwarding program that forwards from one "
5150 "TCP port to another."
5151 msgstr ""
5152 "B<select>()  の本当に便利な点を示す、よい例を紹介する。 以下のリストは、ある "
5153 "TCP ポートから別のポートへ転送を行う TCP フォワードプログラムである。"
5154
5155 #. type: Plain text
5156 #: build/C/man2/select_tut.2:545
5157 #, no-wrap
5158 msgid ""
5159 "#include E<lt>stdlib.hE<gt>\n"
5160 "#include E<lt>stdio.hE<gt>\n"
5161 "#include E<lt>unistd.hE<gt>\n"
5162 "#include E<lt>sys/time.hE<gt>\n"
5163 "#include E<lt>sys/types.hE<gt>\n"
5164 "#include E<lt>string.hE<gt>\n"
5165 "#include E<lt>signal.hE<gt>\n"
5166 "#include E<lt>sys/socket.hE<gt>\n"
5167 "#include E<lt>netinet/in.hE<gt>\n"
5168 "#include E<lt>arpa/inet.hE<gt>\n"
5169 "#include E<lt>errno.hE<gt>\n"
5170 msgstr ""
5171 "#include E<lt>stdlib.hE<gt>\n"
5172 "#include E<lt>stdio.hE<gt>\n"
5173 "#include E<lt>unistd.hE<gt>\n"
5174 "#include E<lt>sys/time.hE<gt>\n"
5175 "#include E<lt>sys/types.hE<gt>\n"
5176 "#include E<lt>string.hE<gt>\n"
5177 "#include E<lt>signal.hE<gt>\n"
5178 "#include E<lt>sys/socket.hE<gt>\n"
5179 "#include E<lt>netinet/in.hE<gt>\n"
5180 "#include E<lt>arpa/inet.hE<gt>\n"
5181 "#include E<lt>errno.hE<gt>\n"
5182
5183 #. type: Plain text
5184 #: build/C/man2/select_tut.2:547
5185 #, no-wrap
5186 msgid "static int forward_port;\n"
5187 msgstr "static int forward_port;\n"
5188
5189 #. type: Plain text
5190 #: build/C/man2/select_tut.2:550
5191 #, no-wrap
5192 msgid ""
5193 "#undef max\n"
5194 "#define max(x,y) ((x) E<gt> (y) ? (x) : (y))\n"
5195 msgstr ""
5196 "#undef max\n"
5197 "#define max(x,y) ((x) E<gt> (y) ? (x) : (y))\n"
5198
5199 #. type: Plain text
5200 #: build/C/man2/select_tut.2:557
5201 #, no-wrap
5202 msgid ""
5203 "static int\n"
5204 "listen_socket(int listen_port)\n"
5205 "{\n"
5206 "    struct sockaddr_in a;\n"
5207 "    int s;\n"
5208 "    int yes;\n"
5209 msgstr ""
5210 "static int\n"
5211 "listen_socket(int listen_port)\n"
5212 "{\n"
5213 "    struct sockaddr_in a;\n"
5214 "    int s;\n"
5215 "    int yes;\n"
5216
5217 #. type: Plain text
5218 #: build/C/man2/select_tut.2:581
5219 #, no-wrap
5220 msgid ""
5221 "    if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) {\n"
5222 "        perror(\"socket\");\n"
5223 "        return -1;\n"
5224 "    }\n"
5225 "    yes = 1;\n"
5226 "    if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,\n"
5227 "            (char *) &yes, sizeof(yes)) == -1) {\n"
5228 "        perror(\"setsockopt\");\n"
5229 "        close(s);\n"
5230 "        return -1;\n"
5231 "    }\n"
5232 "    memset(&a, 0, sizeof(a));\n"
5233 "    a.sin_port = htons(listen_port);\n"
5234 "    a.sin_family = AF_INET;\n"
5235 "    if (bind(s, (struct sockaddr *) &a, sizeof(a)) == -1) {\n"
5236 "        perror(\"bind\");\n"
5237 "        close(s);\n"
5238 "        return -1;\n"
5239 "    }\n"
5240 "    printf(\"accepting connections on port %d\\en\", listen_port);\n"
5241 "    listen(s, 10);\n"
5242 "    return s;\n"
5243 "}\n"
5244 msgstr ""
5245 "    if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) {\n"
5246 "        perror(\"socket\");\n"
5247 "        return -1;\n"
5248 "    }\n"
5249 "    yes = 1;\n"
5250 "    if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,\n"
5251 "            (char *) &yes, sizeof(yes)) == -1) {\n"
5252 "        perror(\"setsockopt\");\n"
5253 "        close(s);\n"
5254 "        return -1;\n"
5255 "    }\n"
5256 "    memset(&a, 0, sizeof(a));\n"
5257 "    a.sin_port = htons(listen_port);\n"
5258 "    a.sin_family = AF_INET;\n"
5259 "    if (bind(s, (struct sockaddr *) &a, sizeof(a)) == -1) {\n"
5260 "        perror(\"bind\");\n"
5261 "        close(s);\n"
5262 "        return -1;\n"
5263 "    }\n"
5264 "    printf(\"accepting connections on port %d\\en\", listen_port);\n"
5265 "    listen(s, 10);\n"
5266 "    return s;\n"
5267 "}\n"
5268
5269 #. type: Plain text
5270 #: build/C/man2/select_tut.2:587
5271 #, no-wrap
5272 msgid ""
5273 "static int\n"
5274 "connect_socket(int connect_port, char *address)\n"
5275 "{\n"
5276 "    struct sockaddr_in a;\n"
5277 "    int s;\n"
5278 msgstr ""
5279 "static int\n"
5280 "connect_socket(int connect_port, char *address)\n"
5281 "{\n"
5282 "    struct sockaddr_in a;\n"
5283 "    int s;\n"
5284
5285 #. type: Plain text
5286 #: build/C/man2/select_tut.2:593
5287 #, no-wrap
5288 msgid ""
5289 "    if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) {\n"
5290 "        perror(\"socket\");\n"
5291 "        close(s);\n"
5292 "        return -1;\n"
5293 "    }\n"
5294 msgstr ""
5295 "    if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) {\n"
5296 "        perror(\"socket\");\n"
5297 "        close(s);\n"
5298 "        return -1;\n"
5299 "    }\n"
5300
5301 #. type: Plain text
5302 #: build/C/man2/select_tut.2:597
5303 #, no-wrap
5304 msgid ""
5305 "    memset(&a, 0, sizeof(a));\n"
5306 "    a.sin_port = htons(connect_port);\n"
5307 "    a.sin_family = AF_INET;\n"
5308 msgstr ""
5309 "    memset(&a, 0, sizeof(a));\n"
5310 "    a.sin_port = htons(connect_port);\n"
5311 "    a.sin_family = AF_INET;\n"
5312
5313 #. type: Plain text
5314 #: build/C/man2/select_tut.2:603
5315 #, no-wrap
5316 msgid ""
5317 "    if (!inet_aton(address, (struct in_addr *) &a.sin_addr.s_addr)) {\n"
5318 "        perror(\"bad IP address format\");\n"
5319 "        close(s);\n"
5320 "        return -1;\n"
5321 "    }\n"
5322 msgstr ""
5323 "    if (!inet_aton(address, (struct in_addr *) &a.sin_addr.s_addr)) {\n"
5324 "        perror(\"bad IP address format\");\n"
5325 "        close(s);\n"
5326 "        return -1;\n"
5327 "    }\n"
5328
5329 #. type: Plain text
5330 #: build/C/man2/select_tut.2:612
5331 #, no-wrap
5332 msgid ""
5333 "    if (connect(s, (struct sockaddr *) &a, sizeof(a)) == -1) {\n"
5334 "        perror(\"connect()\");\n"
5335 "        shutdown(s, SHUT_RDWR);\n"
5336 "        close(s);\n"
5337 "        return -1;\n"
5338 "    }\n"
5339 "    return s;\n"
5340 "}\n"
5341 msgstr ""
5342 "    if (connect(s, (struct sockaddr *) &a, sizeof(a)) == -1) {\n"
5343 "        perror(\"connect()\");\n"
5344 "        shutdown(s, SHUT_RDWR);\n"
5345 "        close(s);\n"
5346 "        return -1;\n"
5347 "    }\n"
5348 "    return s;\n"
5349 "}\n"
5350
5351 #. type: Plain text
5352 #: build/C/man2/select_tut.2:620
5353 #, no-wrap
5354 msgid ""
5355 "#define SHUT_FD1 do {                                \\e\n"
5356 "                     if (fd1 E<gt>= 0) {                 \\e\n"
5357 "                         shutdown(fd1, SHUT_RDWR);   \\e\n"
5358 "                         close(fd1);                 \\e\n"
5359 "                         fd1 = -1;                   \\e\n"
5360 "                     }                               \\e\n"
5361 "                 } while (0)\n"
5362 msgstr ""
5363 "#define SHUT_FD1 do {                                \\e\n"
5364 "                     if (fd1 E<gt>= 0) {                 \\e\n"
5365 "                         shutdown(fd1, SHUT_RDWR);   \\e\n"
5366 "                         close(fd1);                 \\e\n"
5367 "                         fd1 = -1;                   \\e\n"
5368 "                     }                               \\e\n"
5369 "                 } while (0)\n"
5370
5371 #. type: Plain text
5372 #: build/C/man2/select_tut.2:628
5373 #, no-wrap
5374 msgid ""
5375 "#define SHUT_FD2 do {                                \\e\n"
5376 "                     if (fd2 E<gt>= 0) {                 \\e\n"
5377 "                         shutdown(fd2, SHUT_RDWR);   \\e\n"
5378 "                         close(fd2);                 \\e\n"
5379 "                         fd2 = -1;                   \\e\n"
5380 "                     }                               \\e\n"
5381 "                 } while (0)\n"
5382 msgstr ""
5383 "#define SHUT_FD2 do {                                \\e\n"
5384 "                     if (fd2 E<gt>= 0) {                 \\e\n"
5385 "                         shutdown(fd2, SHUT_RDWR);   \\e\n"
5386 "                         close(fd2);                 \\e\n"
5387 "                         fd2 = -1;                   \\e\n"
5388 "                     }                               \\e\n"
5389 "                 } while (0)\n"
5390
5391 #. type: Plain text
5392 #: build/C/man2/select_tut.2:630
5393 #, no-wrap
5394 msgid "#define BUF_SIZE 1024\n"
5395 msgstr "#define BUF_SIZE 1024\n"
5396
5397 #. type: Plain text
5398 #: build/C/man2/select_tut.2:639
5399 #, no-wrap
5400 msgid ""
5401 "int\n"
5402 "main(int argc, char *argv[])\n"
5403 "{\n"
5404 "    int h;\n"
5405 "    int fd1 = -1, fd2 = -1;\n"
5406 "    char buf1[BUF_SIZE], buf2[BUF_SIZE];\n"
5407 "    int buf1_avail, buf1_written;\n"
5408 "    int buf2_avail, buf2_written;\n"
5409 msgstr ""
5410 "int\n"
5411 "main(int argc, char *argv[])\n"
5412 "{\n"
5413 "    int h;\n"
5414 "    int fd1 = -1, fd2 = -1;\n"
5415 "    char buf1[BUF_SIZE], buf2[BUF_SIZE];\n"
5416 "    int buf1_avail, buf1_written;\n"
5417 "    int buf2_avail, buf2_written;\n"
5418
5419 #. type: Plain text
5420 #: build/C/man2/select_tut.2:645
5421 #, no-wrap
5422 msgid ""
5423 "    if (argc != 4) {\n"
5424 "        fprintf(stderr, \"Usage\\en\\etfwd E<lt>listen-portE<gt> \"\n"
5425 "                 \"E<lt>forward-to-portE<gt> E<lt>forward-to-ip-addressE<gt>\\en\");\n"
5426 "        exit(EXIT_FAILURE);\n"
5427 "    }\n"
5428 msgstr ""
5429 "    if (argc != 4) {\n"
5430 "        fprintf(stderr, \"Usage\\en\\etfwd E<lt>listen-portE<gt> \"\n"
5431 "                 \"E<lt>forward-to-portE<gt> E<lt>forward-to-ip-addressE<gt>\\en\");\n"
5432 "        exit(EXIT_FAILURE);\n"
5433 "    }\n"
5434
5435 #. type: Plain text
5436 #: build/C/man2/select_tut.2:647
5437 #, no-wrap
5438 msgid "    signal(SIGPIPE, SIG_IGN);\n"
5439 msgstr "    signal(SIGPIPE, SIG_IGN);\n"
5440
5441 #. type: Plain text
5442 #: build/C/man2/select_tut.2:649
5443 #, no-wrap
5444 msgid "    forward_port = atoi(argv[2]);\n"
5445 msgstr "    forward_port = atoi(argv[2]);\n"
5446
5447 #. type: Plain text
5448 #: build/C/man2/select_tut.2:653
5449 #, no-wrap
5450 msgid ""
5451 "    h = listen_socket(atoi(argv[1]));\n"
5452 "    if (h == -1)\n"
5453 "        exit(EXIT_FAILURE);\n"
5454 msgstr ""
5455 "    h = listen_socket(atoi(argv[1]));\n"
5456 "    if (h == -1)\n"
5457 "        exit(EXIT_FAILURE);\n"
5458
5459 #. type: Plain text
5460 #: build/C/man2/select_tut.2:657
5461 #, no-wrap
5462 msgid ""
5463 "    for (;;) {\n"
5464 "        int r, nfds = 0;\n"
5465 "        fd_set rd, wr, er;\n"
5466 msgstr ""
5467 "    for (;;) {\n"
5468 "        int r, nfds = 0;\n"
5469 "        fd_set rd, wr, er;\n"
5470
5471 #. type: Plain text
5472 #: build/C/man2/select_tut.2:687
5473 #, no-wrap
5474 msgid ""
5475 "        FD_ZERO(&rd);\n"
5476 "        FD_ZERO(&wr);\n"
5477 "        FD_ZERO(&er);\n"
5478 "        FD_SET(h, &rd);\n"
5479 "        nfds = max(nfds, h);\n"
5480 "        if (fd1 E<gt> 0 && buf1_avail E<lt> BUF_SIZE) {\n"
5481 "            FD_SET(fd1, &rd);\n"
5482 "            nfds = max(nfds, fd1);\n"
5483 "        }\n"
5484 "        if (fd2 E<gt> 0 && buf2_avail E<lt> BUF_SIZE) {\n"
5485 "            FD_SET(fd2, &rd);\n"
5486 "            nfds = max(nfds, fd2);\n"
5487 "        }\n"
5488 "        if (fd1 E<gt> 0 && buf2_avail - buf2_written E<gt> 0) {\n"
5489 "            FD_SET(fd1, &wr);\n"
5490 "            nfds = max(nfds, fd1);\n"
5491 "        }\n"
5492 "        if (fd2 E<gt> 0 && buf1_avail - buf1_written E<gt> 0) {\n"
5493 "            FD_SET(fd2, &wr);\n"
5494 "            nfds = max(nfds, fd2);\n"
5495 "        }\n"
5496 "        if (fd1 E<gt> 0) {\n"
5497 "            FD_SET(fd1, &er);\n"
5498 "            nfds = max(nfds, fd1);\n"
5499 "        }\n"
5500 "        if (fd2 E<gt> 0) {\n"
5501 "            FD_SET(fd2, &er);\n"
5502 "            nfds = max(nfds, fd2);\n"
5503 "        }\n"
5504 msgstr ""
5505 "        FD_ZERO(&rd);\n"
5506 "        FD_ZERO(&wr);\n"
5507 "        FD_ZERO(&er);\n"
5508 "        FD_SET(h, &rd);\n"
5509 "        nfds = max(nfds, h);\n"
5510 "        if (fd1 E<gt> 0 && buf1_avail E<lt> BUF_SIZE) {\n"
5511 "            FD_SET(fd1, &rd);\n"
5512 "            nfds = max(nfds, fd1);\n"
5513 "        }\n"
5514 "        if (fd2 E<gt> 0 && buf2_avail E<lt> BUF_SIZE) {\n"
5515 "            FD_SET(fd2, &rd);\n"
5516 "            nfds = max(nfds, fd2);\n"
5517 "        }\n"
5518 "        if (fd1 E<gt> 0 && buf2_avail - buf2_written E<gt> 0) {\n"
5519 "            FD_SET(fd1, &wr);\n"
5520 "            nfds = max(nfds, fd1);\n"
5521 "        }\n"
5522 "        if (fd2 E<gt> 0 && buf1_avail - buf1_written E<gt> 0) {\n"
5523 "            FD_SET(fd2, &wr);\n"
5524 "            nfds = max(nfds, fd2);\n"
5525 "        }\n"
5526 "        if (fd1 E<gt> 0) {\n"
5527 "            FD_SET(fd1, &er);\n"
5528 "            nfds = max(nfds, fd1);\n"
5529 "        }\n"
5530 "        if (fd2 E<gt> 0) {\n"
5531 "            FD_SET(fd2, &er);\n"
5532 "            nfds = max(nfds, fd2);\n"
5533 "        }\n"
5534
5535 #. type: Plain text
5536 #: build/C/man2/select_tut.2:689
5537 #, no-wrap
5538 msgid "        r = select(nfds + 1, &rd, &wr, &er, NULL);\n"
5539 msgstr "        r = select(nfds + 1, &rd, &wr, &er, NULL);\n"
5540
5541 #. type: Plain text
5542 #: build/C/man2/select_tut.2:692
5543 #, no-wrap
5544 msgid ""
5545 "        if (r == -1 && errno == EINTR)\n"
5546 "            continue;\n"
5547 msgstr ""
5548 "        if (r == -1 && errno == EINTR)\n"
5549 "            continue;\n"
5550
5551 #. type: Plain text
5552 #: build/C/man2/select_tut.2:697
5553 #, no-wrap
5554 msgid ""
5555 "        if (r == -1) {\n"
5556 "            perror(\"select()\");\n"
5557 "            exit(EXIT_FAILURE);\n"
5558 "        }\n"
5559 msgstr ""
5560 "        if (r == -1) {\n"
5561 "            perror(\"select()\");\n"
5562 "            exit(EXIT_FAILURE);\n"
5563 "        }\n"
5564
5565 #. type: Plain text
5566 #: build/C/man2/select_tut.2:701
5567 #, no-wrap
5568 msgid ""
5569 "        if (FD_ISSET(h, &rd)) {\n"
5570 "            unsigned int l;\n"
5571 "            struct sockaddr_in client_address;\n"
5572 msgstr ""
5573 "        if (FD_ISSET(h, &rd)) {\n"
5574 "            unsigned int l;\n"
5575 "            struct sockaddr_in client_address;\n"
5576
5577 #. type: Plain text
5578 #: build/C/man2/select_tut.2:720
5579 #, no-wrap
5580 msgid ""
5581 "            memset(&client_address, 0, l = sizeof(client_address));\n"
5582 "            r = accept(h, (struct sockaddr *) &client_address, &l);\n"
5583 "            if (r == -1) {\n"
5584 "                perror(\"accept()\");\n"
5585 "            } else {\n"
5586 "                SHUT_FD1;\n"
5587 "                SHUT_FD2;\n"
5588 "                buf1_avail = buf1_written = 0;\n"
5589 "                buf2_avail = buf2_written = 0;\n"
5590 "                fd1 = r;\n"
5591 "                fd2 = connect_socket(forward_port, argv[3]);\n"
5592 "                if (fd2 == -1)\n"
5593 "                    SHUT_FD1;\n"
5594 "                else\n"
5595 "                    printf(\"connect from %s\\en\",\n"
5596 "                            inet_ntoa(client_address.sin_addr));\n"
5597 "            }\n"
5598 "        }\n"
5599 msgstr ""
5600 "            memset(&client_address, 0, l = sizeof(client_address));\n"
5601 "            r = accept(h, (struct sockaddr *) &client_address, &l);\n"
5602 "            if (r == -1) {\n"
5603 "                perror(\"accept()\");\n"
5604 "            } else {\n"
5605 "                SHUT_FD1;\n"
5606 "                SHUT_FD2;\n"
5607 "                buf1_avail = buf1_written = 0;\n"
5608 "                buf2_avail = buf2_written = 0;\n"
5609 "                fd1 = r;\n"
5610 "                fd2 = connect_socket(forward_port, argv[3]);\n"
5611 "                if (fd2 == -1)\n"
5612 "                    SHUT_FD1;\n"
5613 "                else\n"
5614 "                    printf(\"connect from %s\\en\",\n"
5615 "                            inet_ntoa(client_address.sin_addr));\n"
5616 "            }\n"
5617 "        }\n"
5618
5619 #. type: Plain text
5620 #: build/C/man2/select_tut.2:722
5621 #, no-wrap
5622 msgid "        /* NB: read oob data before normal reads */\n"
5623 msgstr "        /* NB: read oob data before normal reads */\n"
5624
5625 #. type: Plain text
5626 #: build/C/man2/select_tut.2:726
5627 #, no-wrap
5628 msgid ""
5629 "        if (fd1 E<gt> 0)\n"
5630 "            if (FD_ISSET(fd1, &er)) {\n"
5631 "                char c;\n"
5632 msgstr ""
5633 "        if (fd1 E<gt> 0)\n"
5634 "            if (FD_ISSET(fd1, &er)) {\n"
5635 "                char c;\n"
5636
5637 #. type: Plain text
5638 #: build/C/man2/select_tut.2:736
5639 #, no-wrap
5640 msgid ""
5641 "                r = recv(fd1, &c, 1, MSG_OOB);\n"
5642 "                if (r E<lt> 1)\n"
5643 "                    SHUT_FD1;\n"
5644 "                else\n"
5645 "                    send(fd2, &c, 1, MSG_OOB);\n"
5646 "            }\n"
5647 "        if (fd2 E<gt> 0)\n"
5648 "            if (FD_ISSET(fd2, &er)) {\n"
5649 "                char c;\n"
5650 msgstr ""
5651 "                r = recv(fd1, &c, 1, MSG_OOB);\n"
5652 "                if (r E<lt> 1)\n"
5653 "                    SHUT_FD1;\n"
5654 "                else\n"
5655 "                    send(fd2, &c, 1, MSG_OOB);\n"
5656 "            }\n"
5657 "        if (fd2 E<gt> 0)\n"
5658 "            if (FD_ISSET(fd2, &er)) {\n"
5659 "                char c;\n"
5660
5661 #. type: Plain text
5662 #: build/C/man2/select_tut.2:779
5663 #, no-wrap
5664 msgid ""
5665 "                r = recv(fd2, &c, 1, MSG_OOB);\n"
5666 "                if (r E<lt> 1)\n"
5667 "                    SHUT_FD2;\n"
5668 "                else\n"
5669 "                    send(fd1, &c, 1, MSG_OOB);\n"
5670 "            }\n"
5671 "        if (fd1 E<gt> 0)\n"
5672 "            if (FD_ISSET(fd1, &rd)) {\n"
5673 "                r = read(fd1, buf1 + buf1_avail,\n"
5674 "                          BUF_SIZE - buf1_avail);\n"
5675 "                if (r E<lt> 1)\n"
5676 "                    SHUT_FD1;\n"
5677 "                else\n"
5678 "                    buf1_avail += r;\n"
5679 "            }\n"
5680 "        if (fd2 E<gt> 0)\n"
5681 "            if (FD_ISSET(fd2, &rd)) {\n"
5682 "                r = read(fd2, buf2 + buf2_avail,\n"
5683 "                          BUF_SIZE - buf2_avail);\n"
5684 "                if (r E<lt> 1)\n"
5685 "                    SHUT_FD2;\n"
5686 "                else\n"
5687 "                    buf2_avail += r;\n"
5688 "            }\n"
5689 "        if (fd1 E<gt> 0)\n"
5690 "            if (FD_ISSET(fd1, &wr)) {\n"
5691 "                r = write(fd1, buf2 + buf2_written,\n"
5692 "                           buf2_avail - buf2_written);\n"
5693 "                if (r E<lt> 1)\n"
5694 "                    SHUT_FD1;\n"
5695 "                else\n"
5696 "                    buf2_written += r;\n"
5697 "            }\n"
5698 "        if (fd2 E<gt> 0)\n"
5699 "            if (FD_ISSET(fd2, &wr)) {\n"
5700 "                r = write(fd2, buf1 + buf1_written,\n"
5701 "                           buf1_avail - buf1_written);\n"
5702 "                if (r E<lt> 1)\n"
5703 "                    SHUT_FD2;\n"
5704 "                else\n"
5705 "                    buf1_written += r;\n"
5706 "            }\n"
5707 msgstr ""
5708 "                r = recv(fd2, &c, 1, MSG_OOB);\n"
5709 "                if (r E<lt> 1)\n"
5710 "                    SHUT_FD2;\n"
5711 "                else\n"
5712 "                    send(fd1, &c, 1, MSG_OOB);\n"
5713 "            }\n"
5714 "        if (fd1 E<gt> 0)\n"
5715 "            if (FD_ISSET(fd1, &rd)) {\n"
5716 "                r = read(fd1, buf1 + buf1_avail,\n"
5717 "                          BUF_SIZE - buf1_avail);\n"
5718 "                if (r E<lt> 1)\n"
5719 "                    SHUT_FD1;\n"
5720 "                else\n"
5721 "                    buf1_avail += r;\n"
5722 "            }\n"
5723 "        if (fd2 E<gt> 0)\n"
5724 "            if (FD_ISSET(fd2, &rd)) {\n"
5725 "                r = read(fd2, buf2 + buf2_avail,\n"
5726 "                          BUF_SIZE - buf2_avail);\n"
5727 "                if (r E<lt> 1)\n"
5728 "                    SHUT_FD2;\n"
5729 "                else\n"
5730 "                    buf2_avail += r;\n"
5731 "            }\n"
5732 "        if (fd1 E<gt> 0)\n"
5733 "            if (FD_ISSET(fd1, &wr)) {\n"
5734 "                r = write(fd1, buf2 + buf2_written,\n"
5735 "                           buf2_avail - buf2_written);\n"
5736 "                if (r E<lt> 1)\n"
5737 "                    SHUT_FD1;\n"
5738 "                else\n"
5739 "                    buf2_written += r;\n"
5740 "            }\n"
5741 "        if (fd2 E<gt> 0)\n"
5742 "            if (FD_ISSET(fd2, &wr)) {\n"
5743 "                r = write(fd2, buf1 + buf1_written,\n"
5744 "                           buf1_avail - buf1_written);\n"
5745 "                if (r E<lt> 1)\n"
5746 "                    SHUT_FD2;\n"
5747 "                else\n"
5748 "                    buf1_written += r;\n"
5749 "            }\n"
5750
5751 #. type: Plain text
5752 #: build/C/man2/select_tut.2:781
5753 #, no-wrap
5754 msgid "        /* check if write data has caught read data */\n"
5755 msgstr "        /* check if write data has caught read data */\n"
5756
5757 #. type: Plain text
5758 #: build/C/man2/select_tut.2:786
5759 #, no-wrap
5760 msgid ""
5761 "        if (buf1_written == buf1_avail)\n"
5762 "            buf1_written = buf1_avail = 0;\n"
5763 "        if (buf2_written == buf2_avail)\n"
5764 "            buf2_written = buf2_avail = 0;\n"
5765 msgstr ""
5766 "        if (buf1_written == buf1_avail)\n"
5767 "            buf1_written = buf1_avail = 0;\n"
5768 "        if (buf2_written == buf2_avail)\n"
5769 "            buf2_written = buf2_avail = 0;\n"
5770
5771 #. type: Plain text
5772 #: build/C/man2/select_tut.2:789
5773 #, no-wrap
5774 msgid ""
5775 "        /* one side has closed the connection, keep\n"
5776 "           writing to the other side until empty */\n"
5777 msgstr ""
5778 "        /* one side has closed the connection, keep\n"
5779 "           writing to the other side until empty */\n"
5780
5781 #. type: Plain text
5782 #: build/C/man2/select_tut.2:797
5783 #, no-wrap
5784 msgid ""
5785 "        if (fd1 E<lt> 0 && buf1_avail - buf1_written == 0)\n"
5786 "            SHUT_FD2;\n"
5787 "        if (fd2 E<lt> 0 && buf2_avail - buf2_written == 0)\n"
5788 "            SHUT_FD1;\n"
5789 "    }\n"
5790 "    exit(EXIT_SUCCESS);\n"
5791 "}\n"
5792 msgstr ""
5793 "        if (fd1 E<lt> 0 && buf1_avail - buf1_written == 0)\n"
5794 "            SHUT_FD2;\n"
5795 "        if (fd2 E<lt> 0 && buf2_avail - buf2_written == 0)\n"
5796 "            SHUT_FD1;\n"
5797 "    }\n"
5798 "    exit(EXIT_SUCCESS);\n"
5799 "}\n"
5800
5801 #. type: Plain text
5802 #: build/C/man2/select_tut.2:811
5803 msgid ""
5804 "The above program properly forwards most kinds of TCP connections including "
5805 "OOB signal data transmitted by B<telnet> servers.  It handles the tricky "
5806 "problem of having data flow in both directions simultaneously.  You might "
5807 "think it more efficient to use a B<fork>(2)  call and devote a thread to "
5808 "each stream.  This becomes more tricky than you might suspect.  Another idea "
5809 "is to set nonblocking I/O using B<fcntl>(2).  This also has its problems "
5810 "because you end up using inefficient timeouts."
5811 msgstr ""
5812 "上記のプログラムは、ほとんどの種類の TCP 接続をフォワードする。 B<telnet> "
5813 "サーバによって中継される OOB シグナルデータも扱える。 このプログラムは、デー"
5814 "タフローを双方向に同時に送るという、 ややこしい問題も処理できる。 B<fork>"
5815 "(2)  コールを使って、各ストリームごとに専用のスレッドを用いるほうが効率的"
5816 "だ、 という人もいるかもしれない。しかし、これは考えているよりずっとややこし"
5817 "い。 あるいは、 B<fcntl>(2)  を使って非ブロック I/O をセットすれば良い、とい"
5818 "うアイデアもあるだろう。 これにも実際には問題があり、タイムアウトが非効率的に"
5819 "起こってしまう。"
5820
5821 #. type: Plain text
5822 #: build/C/man2/select_tut.2:817
5823 msgid ""
5824 "The program does not handle more than one simultaneous connection at a time, "
5825 "although it could easily be extended to do this with a linked list of buffers"
5826 "\\(emone for each connection.  At the moment, new connections cause the "
5827 "current connection to be dropped."
5828 msgstr ""
5829 "このプログラムは一度にひとつ以上の同時接続を扱うことはできないが、 その様に拡"
5830 "張するのは簡単で、バッファのリンクリストを (接続ごとにひとつずつ) 使えばよ"
5831 "い。 現時点のものでは、新しい接続がくると古い接続は落ちてしまう。"
5832
5833 #. type: Plain text
5834 #: build/C/man2/select_tut.2:833
5835 msgid ""
5836 "B<accept>(2), B<connect>(2), B<ioctl>(2), B<poll>(2), B<read>(2), B<recv>"
5837 "(2), B<select>(2), B<send>(2), B<sigprocmask>(2), B<write>(2), B<sigaddset>"
5838 "(3), B<sigdelset>(3), B<sigemptyset>(3), B<sigfillset>(3), B<sigismember>"
5839 "(3), B<epoll>(7)"
5840 msgstr ""
5841 "B<accept>(2), B<connect>(2), B<ioctl>(2), B<poll>(2), B<read>(2), B<recv>"
5842 "(2), B<select>(2), B<send>(2), B<sigprocmask>(2), B<write>(2), B<sigaddset>"
5843 "(3), B<sigdelset>(3), B<sigemptyset>(3), B<sigfillset>(3), B<sigismember>"
5844 "(3), B<epoll>(7)"
5845
5846 #. type: TH
5847 #: build/C/man2/send.2:38
5848 #, no-wrap
5849 msgid "SEND"
5850 msgstr "SEND"
5851
5852 #. type: TH
5853 #: build/C/man2/send.2:38 build/C/man2/sendmmsg.2:28
5854 #, no-wrap
5855 msgid "2012-02-27"
5856 msgstr "2012-02-27"
5857
5858 #. type: Plain text
5859 #: build/C/man2/send.2:41
5860 msgid "send, sendto, sendmsg - send a message on a socket"
5861 msgstr "send, sendto, sendmsg - ソケットへメッセージを送る"
5862
5863 #. type: Plain text
5864 #: build/C/man2/send.2:45
5865 #, no-wrap
5866 msgid ""
5867 "B<#include E<lt>sys/types.hE<gt>>\n"
5868 "B<#include E<lt>sys/socket.hE<gt>>\n"
5869 msgstr ""
5870 "B<#include E<lt>sys/types.hE<gt>>\n"
5871 "B<#include E<lt>sys/socket.hE<gt>>\n"
5872
5873 #. type: Plain text
5874 #: build/C/man2/send.2:48
5875 #, no-wrap
5876 msgid "B<ssize_t send(int >I<sockfd>B<, const void *>I<buf>B<, size_t >I<len>B<, int >I<flags>B<);>\n"
5877 msgstr "B<ssize_t send(int >I<sockfd>B<, const void *>I<buf>B<, size_t >I<len>B<, int >I<flags>B<);>\n"
5878
5879 #. type: Plain text
5880 #: build/C/man2/send.2:52
5881 #, no-wrap
5882 msgid ""
5883 "B<ssize_t sendto(int >I<sockfd>B<, const void *>I<buf>B<, size_t >I<len>B<, int >I<flags>B<,>\n"
5884 "B<               const struct sockaddr *>I<dest_addr>B<, socklen_t >I<addrlen>B<);>\n"
5885 msgstr ""
5886 "B<ssize_t sendto(int >I<sockfd>B<, const void *>I<buf>B<, size_t >I<len>B<, int >I<flags>B<,>\n"
5887 "B<               const struct sockaddr *>I<dest_addr>B<, socklen_t >I<addrlen>B<);>\n"
5888
5889 #. type: Plain text
5890 #: build/C/man2/send.2:55
5891 #, no-wrap
5892 msgid "B<ssize_t sendmsg(int >I<sockfd>B<, const struct msghdr *>I<msg>B<, int >I<flags>B<);>\n"
5893 msgstr "B<ssize_t sendmsg(int >I<sockfd>B<, const struct msghdr *>I<msg>B<, int >I<flags>B<);>\n"
5894
5895 #. type: Plain text
5896 #: build/C/man2/send.2:63
5897 msgid ""
5898 "The system calls B<send>(), B<sendto>(), and B<sendmsg>()  are used to "
5899 "transmit a message to another socket."
5900 msgstr ""
5901 "システムコール B<send>(), B<sendto>(), B<sendmsg>()  は、もう一方のソケットへ"
5902 "メッセージを転送するのに使用される。"
5903
5904 #. type: Plain text
5905 #: build/C/man2/send.2:82
5906 msgid ""
5907 "The B<send>()  call may be used only when the socket is in a I<connected> "
5908 "state (so that the intended recipient is known).  The only difference "
5909 "between B<send>()  and B<write>(2)  is the presence of I<flags>.  With a "
5910 "zero I<flags> argument, B<send>()  is equivalent to B<write>(2).  Also, the "
5911 "following call"
5912 msgstr ""
5913 "B<send>()  は、ソケットが I<接続された (connected)> 状態にある場合にのみ使用"
5914 "できる (つまり、どの相手に送信するかは既知である)。 B<send>()  と B<write>"
5915 "(2)  の違いは、引き数に I<flags> があるかどうかだけである。 引き数 I<flags> "
5916 "にフラグが指定されない場合、 B<send>()  は B<write>(2)  と等価である。 また、"
5917
5918 #. type: Plain text
5919 #: build/C/man2/send.2:84
5920 #, no-wrap
5921 msgid "    send(sockfd, buf, len, flags);\n"
5922 msgstr "    send(sockfd, buf, len, flags);\n"
5923
5924 #. type: Plain text
5925 #: build/C/man2/send.2:86
5926 msgid "is equivalent to"
5927 msgstr "は以下と等価である。"
5928
5929 #. type: Plain text
5930 #: build/C/man2/send.2:88
5931 #, no-wrap
5932 msgid "    sendto(sockfd, buf, len, flags, NULL, 0);\n"
5933 msgstr "    sendto(sockfd, buf, len, flags, NULL, 0);\n"
5934
5935 #. type: Plain text
5936 #: build/C/man2/send.2:92
5937 msgid "The argument I<sockfd> is the file descriptor of the sending socket."
5938 msgstr ""
5939 "引き数 I<sockfd> は、データを送信するパケットのファイル・ディスクリプタであ"
5940 "る。"
5941
5942 #. type: Plain text
5943 #: build/C/man2/send.2:120
5944 msgid ""
5945 "If B<sendto>()  is used on a connection-mode (B<SOCK_STREAM>, "
5946 "B<SOCK_SEQPACKET>)  socket, the arguments I<dest_addr> and I<addrlen> are "
5947 "ignored (and the error B<EISCONN> may be returned when they are not NULL and "
5948 "0), and the error B<ENOTCONN> is returned when the socket was not actually "
5949 "connected.  Otherwise, the address of the target is given by I<dest_addr> "
5950 "with I<addrlen> specifying its size.  For B<sendmsg>(), the address of the "
5951 "target is given by I<msg.msg_name>, with I<msg.msg_namelen> specifying its "
5952 "size."
5953 msgstr ""
5954 "B<sendto>()  は、接続型 (connection-mode) のソケット (B<SOCK_STREAM>, "
5955 "B<SOCK_SEQPACKET>)  で 使用された場合、引き数 I<dest_addr> と I<addrlen> は無"
5956 "視される (各々の引き数が NULL と 0 でない場合は B<EISCONN> エラーも返され"
5957 "る)。 また、ソケットが実際には接続されていなかった時には B<ENOTCONN> エラーが"
5958 "返される。 接続型のソケット以外で使用された場合は、接続先のアドレスは "
5959 "I<dest_addr> で与えられ、そのサイズは I<addrlen> で指定される。 B<sendmsg>"
5960 "()  では、接続先のアドレスは I<msg.msg_name> で与えられ、そのサイズは I<msg."
5961 "msg_namelen> で指定される。"
5962
5963 #. type: Plain text
5964 #: build/C/man2/send.2:136
5965 msgid ""
5966 "For B<send>()  and B<sendto>(), the message is found in I<buf> and has "
5967 "length I<len>.  For B<sendmsg>(), the message is pointed to by the elements "
5968 "of the array I<msg.msg_iov>.  The B<sendmsg>()  call also allows sending "
5969 "ancillary data (also known as control information)."
5970 msgstr ""
5971 "B<send>()  と B<sendto>()  では、メッセージは I<buf> に格納されており、その長"
5972 "さは I<len> であると解釈される。 B<sendmsg>()  では、メッセージは 配列 I<msg."
5973 "msg_iov> の各要素が指す位置に格納されている。 B<sendmsg>()  では、補助データ "
5974 "(制御情報とも呼ばれる) を送信することもできる。"
5975
5976 #. type: Plain text
5977 #: build/C/man2/send.2:141
5978 msgid ""
5979 "If the message is too long to pass atomically through the underlying "
5980 "protocol, the error B<EMSGSIZE> is returned, and the message is not "
5981 "transmitted."
5982 msgstr ""
5983 "メッセージ長が長過ぎるために、そのソケットが使用するプロトコルでは、 メッセー"
5984 "ジをソケットに渡されたままの形で送信することができない場合、 B<EMSGSIZE> エ"
5985 "ラーが返され、そのメッセージは転送されない。"
5986
5987 #. type: Plain text
5988 #: build/C/man2/send.2:145
5989 msgid ""
5990 "No indication of failure to deliver is implicit in a B<send>().  Locally "
5991 "detected errors are indicated by a return value of -1."
5992 msgstr ""
5993 "B<send>()  では、配送の失敗の通知は明示的に行われる。 ローカル側でエラーが検"
5994 "出された場合は、返り値 -1 として通知される。"
5995
5996 #. type: Plain text
5997 #: build/C/man2/send.2:158
5998 msgid ""
5999 "When the message does not fit into the send buffer of the socket, B<send>()  "
6000 "normally blocks, unless the socket has been placed in nonblocking I/O mode.  "
6001 "In nonblocking mode it would fail with the error B<EAGAIN> or B<EWOULDBLOCK> "
6002 "in this case.  The B<select>(2)  call may be used to determine when it is "
6003 "possible to send more data."
6004 msgstr ""
6005 "メッセージがソケットの送信バッファに入れることができない場合、 B<send>()  は"
6006 "通常は停止 (block) する (ソケットが非停止 (nonblocking) I/O モード でない場"
6007 "合)。非停止モードの場合にはエラー B<EAGAIN> か B<EWOULDBLOCK> で失敗する。 い"
6008 "つデータをさらに送信できるようになるかを知るために、 B<select>(2)  コールを使"
6009 "用することができる。"
6010
6011 #.  FIXME ? document MSG_PROXY (which went away in 2.3.15)
6012 #. type: Plain text
6013 #: build/C/man2/send.2:164
6014 msgid ""
6015 "The I<flags> argument is the bitwise OR of zero or more of the following "
6016 "flags."
6017 msgstr ""
6018 "I<flags> 引き数は、以下のフラグの (0 個以上の) ビット単位の論理和を とったも"
6019 "のを指定する。"
6020
6021 #. type: TP
6022 #: build/C/man2/send.2:164
6023 #, no-wrap
6024 msgid "B<MSG_CONFIRM> (Since Linux 2.3.15)"
6025 msgstr "B<MSG_CONFIRM> (Linux 2.3.15 以降)"
6026
6027 #. type: Plain text
6028 #: build/C/man2/send.2:178
6029 msgid ""
6030 "Tell the link layer that forward progress happened: you got a successful "
6031 "reply from the other side.  If the link layer doesn't get this it will "
6032 "regularly reprobe the neighbor (e.g., via a unicast ARP).  Only valid on "
6033 "B<SOCK_DGRAM> and B<SOCK_RAW> sockets and currently only implemented for "
6034 "IPv4 and IPv6.  See B<arp>(7)  for details."
6035 msgstr ""
6036 "転送処理に進展があった、つまり相手側から成功の応答を受けたことをリンク層に 知"
6037 "らせる。リンク層がこの通知を受け取らなかった場合には、通常どおり (ユニキャス"
6038 "ト ARP を使うなどの方法で) 近傍 (neighbor) の再検索を行う。 B<SOCK_DGRAM> と "
6039 "B<SOCK_RAW> のソケットに対してのみ有効で、現在のところ IPv4 と IPv6 のみ実装"
6040 "されている。 詳しくは B<arp>(7)  参照のこと。"
6041
6042 #. type: TP
6043 #: build/C/man2/send.2:178
6044 #, no-wrap
6045 msgid "B<MSG_DONTROUTE>"
6046 msgstr "B<MSG_DONTROUTE>"
6047
6048 #. type: Plain text
6049 #: build/C/man2/send.2:186
6050 msgid ""
6051 "Don't use a gateway to send out the packet, only send to hosts on directly "
6052 "connected networks.  This is usually used only by diagnostic or routing "
6053 "programs.  This is only defined for protocol families that route; packet "
6054 "sockets don't."
6055 msgstr ""
6056 "パケットを送り出すのにゲートウェイを使用せず、 直接接続されているネットワーク"
6057 "上のホストだけに送る。 通常、このフラグは診断 (diagnostic) やルーティング・プ"
6058 "ログラムに よってのみ使用される。このフラグは、経路制御が行われるプロトコル"
6059 "ファミリー に対してのみ定義されている。パケットソケットには定義されていない。"
6060
6061 #. type: Plain text
6062 #: build/C/man2/send.2:197
6063 msgid ""
6064 "Enables nonblocking operation; if the operation would block, B<EAGAIN> or "
6065 "B<EWOULDBLOCK> is returned (this can also be enabled using the B<O_NONBLOCK> "
6066 "flag with the B<F_SETFL> B<fcntl>(2))."
6067 msgstr ""
6068 "非停止 (nonblocking) 操作を有効にする。操作が停止されるような場合には "
6069 "B<EAGAIN> か B<EWOULDBLOCK> を返すようにする (B<fcntl>(2)  の B<F_SETFL> で "
6070 "B<O_NONBLOCK> フラグを指定することによっても有効にできる)。"
6071
6072 #. type: TP
6073 #: build/C/man2/send.2:197
6074 #, no-wrap
6075 msgid "B<MSG_EOR> (since Linux 2.2)"
6076 msgstr "B<MSG_EOR> (Linux 2.2 以降)"
6077
6078 #. type: Plain text
6079 #: build/C/man2/send.2:201
6080 msgid ""
6081 "Terminates a record (when this notion is supported, as for sockets of type "
6082 "B<SOCK_SEQPACKET>)."
6083 msgstr ""
6084 "レコードの終了を指示する (B<SOCK_SEQPACKET> のようにこの概念に対応しているソ"
6085 "ケット種別のときに有効)。"
6086
6087 #. type: TP
6088 #: build/C/man2/send.2:201
6089 #, no-wrap
6090 msgid "B<MSG_MORE> (Since Linux 2.4.4)"
6091 msgstr "B<MSG_MORE> (Linux 2.4.4 以降)"
6092
6093 #. type: Plain text
6094 #: build/C/man2/send.2:210
6095 msgid ""
6096 "The caller has more data to send.  This flag is used with TCP sockets to "
6097 "obtain the same effect as the B<TCP_CORK> socket option (see B<tcp>(7)), "
6098 "with the difference that this flag can be set on a per-call basis."
6099 msgstr ""
6100 "呼び出し元にさらに送るデータがあることを示す。 このフラグは TCP ソケットとと"
6101 "もに使用され、 B<TCP_CORK> ソケットオプションと同じ効果が得られる (B<tcp>"
6102 "(7)  を参照)。 B<TCP_CORK> との違いは、このフラグを使うと呼び出し単位で この"
6103 "機能を有効にできる点である。"
6104
6105 #. type: Plain text
6106 #: build/C/man2/send.2:219
6107 msgid ""
6108 "Since Linux 2.6, this flag is also supported for UDP sockets, and informs "
6109 "the kernel to package all of the data sent in calls with this flag set into "
6110 "a single datagram which is only transmitted when a call is performed that "
6111 "does not specify this flag.  (See also the B<UDP_CORK> socket option "
6112 "described in B<udp>(7).)"
6113 msgstr ""
6114 "Linux 2.6 以降では、このフラグは UDP ソケットでもサポートされており、 このフ"
6115 "ラグ付きで送信された全てのデータを一つのデータグラムにまとめて 送信すること"
6116 "を、カーネルに知らせる。まとめられたデータグラムは、 このフラグを指定せずにこ"
6117 "のシステムコールが実行された際に初めて送信される (B<udp>(7)  に記載されている"
6118 "ソケットオプション B<UDP_CORK> も参照)。"
6119
6120 #. type: TP
6121 #: build/C/man2/send.2:219
6122 #, no-wrap
6123 msgid "B<MSG_NOSIGNAL> (since Linux 2.2)"
6124 msgstr "B<MSG_NOSIGNAL> (Linux 2.2 以降)"
6125
6126 #. type: Plain text
6127 #: build/C/man2/send.2:228
6128 msgid ""
6129 "Requests not to send B<SIGPIPE> on errors on stream oriented sockets when "
6130 "the other end breaks the connection.  The B<EPIPE> error is still returned."
6131 msgstr ""
6132 "ストリーム指向のソケットで相手側が接続を切断した時に、エラーとして "
6133 "B<SIGPIPE> を送信しないように要求する。この場合でも B<EPIPE> は返される。"
6134
6135 #. type: Plain text
6136 #: build/C/man2/send.2:237
6137 msgid ""
6138 "Sends I<out-of-band> data on sockets that support this notion (e.g., of type "
6139 "B<SOCK_STREAM>); the underlying protocol must also support I<out-of-band> "
6140 "data."
6141 msgstr ""
6142 "I<帯域外 (out-of-band)> データをサポートするソケット (例えば "
6143 "B<SOCK_STREAM>)  で I<帯域外> データを送る。下位プロトコルも I<帯域外> データ"
6144 "をサポートしている必要がある。"
6145
6146 #. type: Plain text
6147 #: build/C/man2/send.2:244
6148 msgid ""
6149 "The definition of the I<msghdr> structure follows.  See B<recv>(2)  and "
6150 "below for an exact description of its fields."
6151 msgstr ""
6152 "I<msghdr> 構造体の内容は以下の通り。 各フィールドの正確な記述については "
6153 "B<recv>(2)  と以下の説明を参照すること。"
6154
6155 #.  Still to be documented:
6156 #.   Send file descriptors and user credentials using the
6157 #.   msg_control* fields.
6158 #.   The flags returned in msg_flags.
6159 #. type: Plain text
6160 #: build/C/man2/send.2:273
6161 msgid ""
6162 "You may send control information using the I<msg_control> and "
6163 "I<msg_controllen> members.  The maximum control buffer length the kernel can "
6164 "process is limited per socket by the value in I</proc/sys/net/core/"
6165 "optmem_max>; see B<socket>(7)."
6166 msgstr ""
6167 "I<msg_control> と I<msg_controllen> メンバーを使用して制御情報を送信すること"
6168 "ができる。 カーネルが処理できる制御バッファのソケットあたりの最大長は、 I</"
6169 "proc/sys/net/core/optmem_max> の値に制限されている。 B<socket>(7)  を参照。"
6170
6171 #. type: Plain text
6172 #: build/C/man2/send.2:278
6173 msgid ""
6174 "On success, these calls return the number of characters sent.  On error, -1 "
6175 "is returned, and I<errno> is set appropriately."
6176 msgstr ""
6177 "成功した場合、これらのシステムコールは送信されたバイト数を返す。 エラーの場"
6178 "合、 -1 を返し、 I<errno> を適切に設定にする。"
6179
6180 #. type: Plain text
6181 #: build/C/man2/send.2:283
6182 msgid ""
6183 "These are some standard errors generated by the socket layer.  Additional "
6184 "errors may be generated and returned from the underlying protocol modules; "
6185 "see their respective manual pages."
6186 msgstr ""
6187 "これらはソケット層で発生する一般的なエラーである。これ以外に、下層の プロトコ"
6188 "ル・モジュールで生成されたエラーが返されるかもしれない。 これらについては、そ"
6189 "れぞれのマニュアルを参照すること。"
6190
6191 #. type: Plain text
6192 #: build/C/man2/send.2:291
6193 msgid ""
6194 "(For UNIX domain sockets, which are identified by pathname)  Write "
6195 "permission is denied on the destination socket file, or search permission is "
6196 "denied for one of the directories the path prefix.  (See B<path_resolution>"
6197 "(7).)"
6198 msgstr ""
6199 "(UNIX ドメインソケットはパス名で識別される。)  ソケット・ファイルへの書き込み"
6200 "許可がなかったか、パス名へ 到達するまでのディレクトリのいずれかに対する検索許"
6201 "可がなかった。 (B<path_resolution>(7)  も参照のこと)"
6202
6203 #.  Actually EAGAIN on Linux
6204 #. type: Plain text
6205 #: build/C/man2/send.2:299
6206 msgid ""
6207 "The socket is marked nonblocking and the requested operation would block.  "
6208 "POSIX.1-2001 allows either error to be returned for this case, and does not "
6209 "require these constants to have the same value, so a portable application "
6210 "should check for both possibilities."
6211 msgstr ""
6212 "ソケットが非停止に設定されており、 要求された操作が停止した。 POSIX.1-2001 "
6213 "は、この場合にどちらのエラーを返すことも認めており、 これら 2 つの定数が同じ"
6214 "値を持つことも求めていない。 したがって、移植性が必要なアプリケーションでは、"
6215 "両方の可能性を 確認すべきである。"
6216
6217 #. type: Plain text
6218 #: build/C/man2/send.2:302
6219 msgid "An invalid descriptor was specified."
6220 msgstr "無効なディスクリプターが指定された。"
6221
6222 #. type: TP
6223 #: build/C/man2/send.2:302
6224 #, no-wrap
6225 msgid "B<ECONNRESET>"
6226 msgstr "B<ECONNRESET>"
6227
6228 #. type: Plain text
6229 #: build/C/man2/send.2:305
6230 msgid "Connection reset by peer."
6231 msgstr "接続が接続相手によりリセットされた。"
6232
6233 #. type: TP
6234 #: build/C/man2/send.2:305
6235 #, no-wrap
6236 msgid "B<EDESTADDRREQ>"
6237 msgstr "B<EDESTADDRREQ>"
6238
6239 #. type: Plain text
6240 #: build/C/man2/send.2:308
6241 msgid "The socket is not connection-mode, and no peer address is set."
6242 msgstr ""
6243 "ソケットが接続型 (connection-mode) ではなく、 かつ送信先のアドレスが設定され"
6244 "ていない。"
6245
6246 #. type: Plain text
6247 #: build/C/man2/send.2:311
6248 msgid "An invalid user space address was specified for an argument."
6249 msgstr "ユーザー空間として不正なアドレスがパラメーターとして指定された。"
6250
6251 #. type: Plain text
6252 #: build/C/man2/send.2:315
6253 msgid "A signal occurred before any data was transmitted; see B<signal>(7)."
6254 msgstr "データが送信される前に、シグナルが発生した。 B<signal>(7)  参照。"
6255
6256 #. type: Plain text
6257 #: build/C/man2/send.2:324
6258 msgid ""
6259 "The connection-mode socket was connected already but a recipient was "
6260 "specified.  (Now either this error is returned, or the recipient "
6261 "specification is ignored.)"
6262 msgstr ""
6263 "接続型ソケットの接続がすでに確立していたが、受信者が指定されていた。 (現在の"
6264 "ところ、この状況では、このエラーが返されるか、 受信者の指定が無視されるか、の"
6265 "いずれかとなる)"
6266
6267 #. type: TP
6268 #: build/C/man2/send.2:324
6269 #, no-wrap
6270 msgid "B<EMSGSIZE>"
6271 msgstr "B<EMSGSIZE>"
6272
6273 #.  (e.g., SOCK_DGRAM )
6274 #. type: Plain text
6275 #: build/C/man2/send.2:330
6276 msgid ""
6277 "The socket type requires that message be sent atomically, and the size of "
6278 "the message to be sent made this impossible."
6279 msgstr ""
6280 "そのソケット種別 ではソケットに渡されたままの形でメッセージを送信する必要があ"
6281 "るが、 メッセージが大き過ぎるため送信することができない。"
6282
6283 #. type: Plain text
6284 #: build/C/man2/send.2:338
6285 msgid ""
6286 "The output queue for a network interface was full.  This generally indicates "
6287 "that the interface has stopped sending, but may be caused by transient "
6288 "congestion.  (Normally, this does not occur in Linux.  Packets are just "
6289 "silently dropped when a device queue overflows.)"
6290 msgstr ""
6291 "ネットワーク・インターフェースの出力キューが一杯である。 一般的には、一時的な"
6292 "輻輳 (congestion) のためにインターフェースが 送信を止めていることを意味す"
6293 "る。 (通常、Linux ではこのようなことは起こらない。デバイスのキューが オーバー"
6294 "フローした場合にはパケットは黙って捨てられる)"
6295
6296 #. type: Plain text
6297 #: build/C/man2/send.2:341
6298 msgid "No memory available."
6299 msgstr "メモリが足りない。"
6300
6301 #. type: Plain text
6302 #: build/C/man2/send.2:344
6303 msgid "The socket is not connected, and no target has been given."
6304 msgstr "ソケットが接続されておらず、接続先も指定されていない。"
6305
6306 #. type: Plain text
6307 #: build/C/man2/send.2:354
6308 msgid "Some bit in the I<flags> argument is inappropriate for the socket type."
6309 msgstr ""
6310 "引き数 I<flags> のいくつかのビットが、そのソケット種別では不適切なものであ"
6311 "る。"
6312
6313 #. type: TP
6314 #: build/C/man2/send.2:354
6315 #, no-wrap
6316 msgid "B<EPIPE>"
6317 msgstr "B<EPIPE>"
6318
6319 #. type: Plain text
6320 #: build/C/man2/send.2:363
6321 msgid ""
6322 "The local end has been shut down on a connection oriented socket.  In this "
6323 "case the process will also receive a B<SIGPIPE> unless B<MSG_NOSIGNAL> is "
6324 "set."
6325 msgstr ""
6326 "接続指向のソケットでローカル側が閉じられている。 この場合、 B<MSG_NOSIGNAL> "
6327 "が設定されていなければ、プロセスには B<SIGPIPE> も同時に送られる。"
6328
6329 #. type: Plain text
6330 #: build/C/man2/send.2:366
6331 msgid "4.4BSD, SVr4, POSIX.1-2001.  These function calls appeared in 4.2BSD."
6332 msgstr ""
6333 "4.4BSD, SVr4, POSIX.1-2001.  (これらの関数コールは 4.2BSD で最初に登場した)。"
6334
6335 #. type: Plain text
6336 #: build/C/man2/send.2:377
6337 msgid ""
6338 "POSIX.1-2001 only describes the B<MSG_OOB> and B<MSG_EOR> flags.  "
6339 "POSIX.1-2008 adds a specification of B<MSG_NOSIGNAL>.  The B<MSG_CONFIRM> "
6340 "flag is a Linux extension."
6341 msgstr ""
6342 "POSIX.1-2001 には、 B<MSG_OOB> と B<MSG_EOR> フラグだけが記載されている。 "
6343 "POSIX.1-2008 では B<MSG_NOSIGNAL> が規格に追加されている。 B<MSG_CONFIRM> フ"
6344 "ラグは Linux での拡張である。"
6345
6346 #. type: Plain text
6347 #: build/C/man2/send.2:390
6348 msgid ""
6349 "The prototypes given above follow the Single UNIX Specification, as glibc2 "
6350 "also does; the I<flags> argument was I<int> in 4.x BSD, but I<unsigned int> "
6351 "in libc4 and libc5; the I<len> argument was I<int> in 4.x BSD and libc4, but "
6352 "I<size_t> in libc5; the I<addrlen> argument was I<int> in 4.x BSD and libc4 "
6353 "and libc5.  See also B<accept>(2)."
6354 msgstr ""
6355 "上記のプロトタイプは Single UNIX Specification に従っている。 glibc2 も同様で"
6356 "ある。 I<flags> 引き数は 4.x BSD では I<int> であり、 libc4 と libc5 では "
6357 "I<unsigned int> である。 I<len> 引き数は 4.x BSD と libc4 では I<int> であ"
6358 "り、 libc5 では I<size_t> である。 I<addrlen> 引き数は 4.x BSD と libc4 と "
6359 "libc5 では I<int> である。 B<accept>(2)  も参照すること。"
6360
6361 #. type: Plain text
6362 #: build/C/man2/send.2:409
6363 msgid ""
6364 "See B<sendmmsg(2)> for information about a Linux-specific system call that "
6365 "can be used to transmit multiple datagrams in a single call."
6366 msgstr ""
6367 "B<sendmmsg>(2)  には、一度の呼び出しでの複数のデータグラムの送信に使用でき"
6368 "る\n"
6369 "Linux 固有の システムコールに関する情報が書かれている。"
6370
6371 #. type: Plain text
6372 #: build/C/man2/send.2:414
6373 msgid "Linux may return B<EPIPE> instead of B<ENOTCONN>."
6374 msgstr "Linux は B<ENOTCONN> を返す状況で B<EPIPE> を返すことがある。"
6375
6376 #. type: Plain text
6377 #: build/C/man2/send.2:419
6378 msgid "An example of the use of B<sendto>()  is shown in B<getaddrinfo>(3)."
6379 msgstr "B<sendto>()  の利用例が B<getaddrinfo>(3)  に記載されている。"
6380
6381 #. type: Plain text
6382 #: build/C/man2/send.2:433
6383 msgid ""
6384 "B<fcntl>(2), B<getsockopt>(2), B<recv>(2), B<select>(2), B<sendfile>(2), "
6385 "B<sendmmsg>(2), B<shutdown>(2), B<socket>(2), B<write>(2), B<cmsg>(3), B<ip>"
6386 "(7), B<socket>(7), B<tcp>(7), B<udp>(7)"
6387 msgstr ""
6388 "B<fcntl>(2), B<getsockopt>(2), B<recv>(2), B<select>(2), B<sendfile>(2), "
6389 "B<sendmmsg>(2), B<shutdown>(2), B<socket>(2), B<write>(2), B<cmsg>(3), B<ip>"
6390 "(7), B<socket>(7), B<tcp>(7), B<udp>(7)"
6391
6392 #. type: TH
6393 #: build/C/man2/sendmmsg.2:28
6394 #, no-wrap
6395 msgid "SENDMMSG"
6396 msgstr "SENDMMSG"
6397
6398 #. type: Plain text
6399 #: build/C/man2/sendmmsg.2:31
6400 msgid "sendmmsg - send multiple messages on a socket"
6401 msgstr ""
6402
6403 #. type: Plain text
6404 #: build/C/man2/sendmmsg.2:39
6405 #, no-wrap
6406 msgid ""
6407 "B<int sendmmsg(int >I<sockfd>B<, struct mmsghdr *>I<msgvec>B<, unsigned int >I<vlen>B<,>\n"
6408 "B<             unsigned int >I<flags>B<);>\n"
6409 msgstr ""
6410 "B<int sendmmsg(int >I<sockfd>B<, struct mmsghdr *>I<msgvec>B<, unsigned int >I<vlen>B<,>\n"
6411 "B<             unsigned int >I<flags>B<);>\n"
6412
6413 #.  See commit 228e548e602061b08ee8e8966f567c12aa079682
6414 #. type: Plain text
6415 #: build/C/man2/sendmmsg.2:49
6416 msgid ""
6417 "The B<sendmmsg>()  system call is an extension of B<sendmsg>(2)  that allows "
6418 "the caller to transmit multiple messages on a socket using a single system "
6419 "call.  (This has performance benefits for some applications.)"
6420 msgstr ""
6421
6422 #. type: Plain text
6423 #: build/C/man2/sendmmsg.2:54
6424 msgid ""
6425 "The I<sockfd> argument is the file descriptor of the socket on which data is "
6426 "to be transmitted."
6427 msgstr ""
6428
6429 #. type: Plain text
6430 #: build/C/man2/sendmmsg.2:75
6431 #, no-wrap
6432 msgid ""
6433 "struct mmsghdr {\n"
6434 "    struct msghdr msg_hdr;  /* Message header */\n"
6435 "    unsigned int  msg_len;  /* Number of bytes transmitted */\n"
6436 "};\n"
6437 msgstr ""
6438
6439 #. type: Plain text
6440 #: build/C/man2/sendmmsg.2:91
6441 msgid ""
6442 "The I<msg_hdr> field is a I<msghdr> structure, as described in B<sendmsg>"
6443 "(2).  The I<msg_len> field is used to return the number of bytes sent from "
6444 "the message in I<msg_hdr> (i.e., the same as the return value from a single "
6445 "B<sendmsg>(2)  call)."
6446 msgstr ""
6447
6448 #. type: Plain text
6449 #: build/C/man2/sendmmsg.2:97
6450 msgid ""
6451 "The I<flags> argument contains flags ORed together.  The flags are the same "
6452 "as for B<sendmsg>(2)."
6453 msgstr ""
6454
6455 #. type: Plain text
6456 #: build/C/man2/sendmmsg.2:107
6457 msgid ""
6458 "A blocking B<sendmmsg>()  call blocks until I<vlen> messages have been "
6459 "sent.  A nonblocking call sends as many messages as possible (up to the "
6460 "limit specified by I<vlen>)  and returns immediately."
6461 msgstr ""
6462
6463 #. type: Plain text
6464 #: build/C/man2/sendmmsg.2:119
6465 msgid ""
6466 "On return from B<sendmmsg>(), the I<msg_len> fields of successive elements "
6467 "of I<msgvec> are updated to contain the number of bytes transmitted from the "
6468 "corresponding I<msg_hdr>.  The return value of the call indicates the number "
6469 "of elements of I<msgvec> that have been updated."
6470 msgstr ""
6471
6472 #. type: Plain text
6473 #: build/C/man2/sendmmsg.2:129
6474 msgid ""
6475 "On success, B<sendmmsg>()  returns the number of messages sent from "
6476 "I<msgvec>; if this is less than I<vlen>, the caller can retry with a further "
6477 "B<sendmmsg>()  call to send the remaining messages."
6478 msgstr ""
6479
6480 #. type: Plain text
6481 #: build/C/man2/sendmmsg.2:133
6482 msgid "On error, -1 is returned, and I<errno> is set to indicate the error."
6483 msgstr ""
6484
6485 #
6486 #.  commit 728ffb86f10873aaf4abd26dde691ee40ae731fe
6487 #.      ... only return an error if no datagrams could be sent.
6488 #.      If less than the requested number of messages were sent, the application
6489 #.      must retry starting at the first failed one and if the problem is
6490 #.      persistent the error will be returned.
6491 #.      This matches the behaviour of other syscalls like read/write - it
6492 #.      is not an error if less than the requested number of elements are sent.
6493 #. type: Plain text
6494 #: build/C/man2/sendmmsg.2:145
6495 msgid ""
6496 "Errors are as for B<sendmsg>(2).  An error is returned only if no datagrams "
6497 "could be sent."
6498 msgstr ""
6499
6500 #. type: Plain text
6501 #: build/C/man2/sendmmsg.2:150
6502 msgid ""
6503 "The B<sendmmsg>()  system call was added in Linux 3.0.  Support in glibc was "
6504 "added in version 2.14."
6505 msgstr ""
6506
6507 #. type: Plain text
6508 #: build/C/man2/sendmmsg.2:153
6509 msgid "B<sendmmsg>()  is Linux-specific."
6510 msgstr ""
6511
6512 #
6513 #
6514 #.  commit 98382f419f32d2c12d021943b87dea555677144b
6515 #.      net: Cap number of elements for sendmmsg
6516 #.      To limit the amount of time we can spend in sendmmsg, cap the
6517 #.      number of elements to UIO_MAXIOV (currently 1024).
6518 #.      For error handling an application using sendmmsg needs to retry at
6519 #.      the first unsent message, so capping is simpler and requires less
6520 #.      application logic than returning EINVAL.
6521 #. type: Plain text
6522 #: build/C/man2/sendmmsg.2:168
6523 msgid "The value specified in I<vlen> is capped to B<UIO_MAXIOV> (1024)."
6524 msgstr ""
6525
6526 #. type: Plain text
6527 #: build/C/man2/sendmmsg.2:172
6528 msgid "B<recvmmsg>(2), B<sendmsg>(2), B<socket>(2), B<socket>(7)"
6529 msgstr "B<recvmmsg>(2), B<sendmsg>(2), B<socket>(2), B<socket>(7)"
6530
6531 #. type: TH
6532 #: build/C/man3/sockatmark.3:23
6533 #, no-wrap
6534 msgid "SOCKATMARK"
6535 msgstr "SOCKATMARK"
6536
6537 #. type: Plain text
6538 #: build/C/man3/sockatmark.3:26
6539 msgid "sockatmark - determine whether socket is at out-of-band mark"
6540 msgstr ""
6541 "sockatmark - どのソケットに帯域外 (out-of-band) マークが付けられているかを調"
6542 "べる"
6543
6544 #. type: Plain text
6545 #: build/C/man3/sockatmark.3:28 build/C/man2/socket.2:48
6546 #: build/C/man7/socket.7:31 build/C/man2/socketpair.2:47
6547 msgid "B<#include E<lt>sys/socket.hE<gt>>"
6548 msgstr "B<#include E<lt>sys/socket.hE<gt>>"
6549
6550 #. type: Plain text
6551 #: build/C/man3/sockatmark.3:30
6552 msgid "B<int sockatmark(int >I<sockfd>B<);>"
6553 msgstr "B<int sockatmark(int >I<sockfd>B<);>"
6554
6555 #. type: Plain text
6556 #: build/C/man3/sockatmark.3:39
6557 msgid ""
6558 "B<sockatmark>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>="
6559 "\\ 600"
6560 msgstr ""
6561 "B<sockatmark>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>="
6562 "\\ 600"
6563
6564 #. type: Plain text
6565 #: build/C/man3/sockatmark.3:49
6566 msgid ""
6567 "B<sockatmark>()  returns a value indicating whether or not the socket "
6568 "referred to by the file descriptor I<sockfd> is at the out-of-band mark.  If "
6569 "the socket is at the mark, then 1 is returned; if the socket is not at the "
6570 "mark, 0 is returned.  This function does not remove the out-of-band mark."
6571 msgstr ""
6572 "B<sockatmark>()  はファイルディスクリプタ I<sockfd> で参照されるソケットに帯"
6573 "域外マークが付けられているか否かを返す。 ソケットにマークが付けられている場合"
6574 "は、1 が返される。 ソケットにマークが付けられていない場合は、0 が返される。 "
6575 "この関数は帯域外マークを削除しない。"
6576
6577 #. type: Plain text
6578 #: build/C/man3/sockatmark.3:54
6579 msgid ""
6580 "A successful call to B<sockatmark>()  returns 1 if the socket is at the out-"
6581 "of-band mark, or 0 if it is not.  On error, -1 is returned and I<errno> is "
6582 "set to indicate the error."
6583 msgstr ""
6584 "B<sockatmark>()  の呼び出しが成功した場合、ソケットに帯域外マークが 付けられ"
6585 "ていれば 1 を返し、付けられていなければ 0 を返す。 エラーの場合は -1 が返さ"
6586 "れ、エラーを表す I<errno> が設定される。"
6587
6588 #. type: Plain text
6589 #: build/C/man3/sockatmark.3:59
6590 msgid "I<sockfd> is not a valid file descriptor."
6591 msgstr "I<sockfd> が有効なファイルディスクリプタでない。"
6592
6593 #.  POSIX.1 says ENOTTY for this case
6594 #. type: Plain text
6595 #: build/C/man3/sockatmark.3:66
6596 msgid ""
6597 "I<sockfd> is not a file descriptor to which B<sockatmark>()  can be applied."
6598 msgstr ""
6599 "I<sockfd> は B<sockatmark>()  が適用できないファイルディスクリプタである。"
6600
6601 #. type: Plain text
6602 #: build/C/man3/sockatmark.3:69
6603 msgid "B<sockatmark>()  was added to glibc in version 2.2.4."
6604 msgstr "B<sockatmark>()  は glibc バージョン 2.2.4 で追加された。"
6605
6606 #. type: Plain text
6607 #: build/C/man3/sockatmark.3:71
6608 msgid "POSIX.1-2001."
6609 msgstr "POSIX.1-2001."
6610
6611 #. type: Plain text
6612 #: build/C/man3/sockatmark.3:78
6613 msgid ""
6614 "If B<sockatmark>()  returns 1, then the out-of-band data can be read using "
6615 "the B<MSG_OOB> flag of B<recv>(2)."
6616 msgstr ""
6617 "B<sockatmark>()  が 1 を返す場合、帯域外データは B<MSG_OOB> を指定した "
6618 "B<recv>(2)  で読み込むことができる。"
6619
6620 #. type: Plain text
6621 #: build/C/man3/sockatmark.3:80
6622 msgid "Out-of-band data is only supported on some stream socket protocols."
6623 msgstr ""
6624 "帯域外データは、いくつかのストリームソケットプロトコルでしか サポートされてい"
6625 "ない。"
6626
6627 #. type: Plain text
6628 #: build/C/man3/sockatmark.3:85
6629 msgid ""
6630 "B<sockatmark>()  can safely be called from a handler for the B<SIGURG> "
6631 "signal."
6632 msgstr ""
6633 "B<sockatmark>()  は B<SIGURG> シグナルのハンドラから安全に呼び出すことができ"
6634 "る。"
6635
6636 #. type: Plain text
6637 #: build/C/man3/sockatmark.3:91
6638 msgid ""
6639 "B<sockatmark>()  is implemented using the B<SIOCATMARK> B<ioctl>(2)  "
6640 "operation."
6641 msgstr ""
6642 "B<sockatmark>()  は B<SIOCATMARK> B<ioctl>(2)  操作を使って実装されている。"
6643
6644 #. type: Plain text
6645 #: build/C/man3/sockatmark.3:95
6646 msgid "Prior to glibc 2.4, B<sockatmark>()  did not work."
6647 msgstr "glibc 2.4 より前のバージョンでは、 B<sockatmark>()  は動作しない。"
6648
6649 #. type: Plain text
6650 #: build/C/man3/sockatmark.3:100
6651 msgid ""
6652 "The following code can be used after receipt of a B<SIGURG> signal to read "
6653 "(and discard) all data up to the mark, and then read the byte of data at the "
6654 "mark:"
6655 msgstr ""
6656 "以下のコードは、 B<SIGURG> シグナルを受け取った後にマークまでの全てのデータを"
6657 "読み込んで (破棄し)、 マークされたデータのバイトを読み込むのに使用できる。"
6658
6659 #. type: Plain text
6660 #: build/C/man3/sockatmark.3:105
6661 #, no-wrap
6662 msgid ""
6663 "    char buf[BUF_LEN];\n"
6664 "    char oobdata;\n"
6665 "    int atmark, s;\n"
6666 msgstr ""
6667 "    char buf[BUF_LEN];\n"
6668 "    char oobdata;\n"
6669 "    int atmark, s;\n"
6670
6671 #. type: Plain text
6672 #: build/C/man3/sockatmark.3:112
6673 #, no-wrap
6674 msgid ""
6675 "    for (;;) {\n"
6676 "        atmark = sockatmark(sockfd);\n"
6677 "        if (atmark == -1) {\n"
6678 "            perror(\"sockatmark\");\n"
6679 "            break;\n"
6680 "        }\n"
6681 msgstr ""
6682 "    for (;;) {\n"
6683 "        atmark = sockatmark(sockfd);\n"
6684 "        if (atmark == -1) {\n"
6685 "            perror(\"sockatmark\");\n"
6686 "            break;\n"
6687 "        }\n"
6688
6689 #. type: Plain text
6690 #: build/C/man3/sockatmark.3:115
6691 #, no-wrap
6692 msgid ""
6693 "        if (atmark)\n"
6694 "            break;\n"
6695 msgstr ""
6696 "        if (atmark)\n"
6697 "            break;\n"
6698
6699 #. type: Plain text
6700 #: build/C/man3/sockatmark.3:122
6701 #, no-wrap
6702 msgid ""
6703 "        s = read(sockfd, buf, BUF_LEN) E<lt>= 0);\n"
6704 "        if (s == -1)\n"
6705 "            perror(\"read\");\n"
6706 "        if (s E<lt>= 0)\n"
6707 "            break;\n"
6708 "    }\n"
6709 msgstr ""
6710 "        s = read(sockfd, buf, BUF_LEN) E<lt>= 0);\n"
6711 "        if (s == -1)\n"
6712 "            perror(\"read\");\n"
6713 "        if (s E<lt>= 0)\n"
6714 "            break;\n"
6715 "    }\n"
6716
6717 #. type: Plain text
6718 #: build/C/man3/sockatmark.3:129
6719 #, no-wrap
6720 msgid ""
6721 "    if (atmark == 1) {\n"
6722 "        if (recv(sockfd, &oobdata, 1, MSG_OOB) == -1) {\n"
6723 "            perror(\"recv\");\n"
6724 "            ...\n"
6725 "        }\n"
6726 "    }\n"
6727 msgstr ""
6728 "    if (atmark == 1) {\n"
6729 "        if (recv(sockfd, &oobdata, 1, MSG_OOB) == -1) {\n"
6730 "            perror(\"recv\");\n"
6731 "            ...\n"
6732 "        }\n"
6733 "    }\n"
6734
6735 #. type: Plain text
6736 #: build/C/man3/sockatmark.3:134
6737 msgid "B<fcntl>(2), B<recv>(2), B<send>(2), B<tcp>(7)"
6738 msgstr "B<fcntl>(2), B<recv>(2), B<send>(2), B<tcp>(7)"
6739
6740 #. type: TH
6741 #: build/C/man2/socket.2:41 build/C/man7/socket.7:26
6742 #, no-wrap
6743 msgid "SOCKET"
6744 msgstr "SOCKET"
6745
6746 #. type: TH
6747 #: build/C/man2/socket.2:41
6748 #, no-wrap
6749 msgid "2009-01-19"
6750 msgstr "2009-01-19"
6751
6752 #. type: Plain text
6753 #: build/C/man2/socket.2:44
6754 msgid "socket - create an endpoint for communication"
6755 msgstr "socket - 通信のための端点(endpoint)を作成する"
6756
6757 #. type: Plain text
6758 #: build/C/man2/socket.2:46 build/C/man2/socketpair.2:45
6759 msgid "B<#include E<lt>sys/types.hE<gt>> /* See NOTES */"
6760 msgstr "B<#include E<lt>sys/types.hE<gt>> /* 「注意」参照 */"
6761
6762 #. type: Plain text
6763 #: build/C/man2/socket.2:50
6764 msgid "B<int socket(int >I<domain>B<, int >I<type>B<, int >I<protocol>B<);>"
6765 msgstr "B<int socket(int >I<domain>B<, int >I<type>B<, int >I<protocol>B<);>"
6766
6767 #. type: Plain text
6768 #: build/C/man2/socket.2:53
6769 msgid ""
6770 "B<socket>()  creates an endpoint for communication and returns a descriptor."
6771 msgstr ""
6772 "B<socket>()  は通信のための端点(endpoint)を作成し、ディスクリプター"
6773 "(descriptor)を返す。"
6774
6775 #. type: Plain text
6776 #: build/C/man2/socket.2:61
6777 msgid ""
6778 "The I<domain> argument specifies a communication domain; this selects the "
6779 "protocol family which will be used for communication.  These families are "
6780 "defined in I<E<lt>sys/socket.hE<gt>>.  The currently understood formats "
6781 "include:"
6782 msgstr ""
6783 "I<domain> 引数は通信を行なうドメインを指定する; これはどの プロトコル・ファミ"
6784 "リ(protocol family)を通信に使用するかを指定する。 これらのファミリは "
6785 "I<E<lt>sys/socket.hE<gt>> に定義されている。 現在、理解できるフォーマットは以"
6786 "下の通り。"
6787
6788 #. type: tbl table
6789 #: build/C/man2/socket.2:64
6790 #, no-wrap
6791 msgid "Name:Purpose:Man page\n"
6792 msgstr "名前:目的:マニュアル\n"
6793
6794 #. type: tbl table
6795 #: build/C/man2/socket.2:65 build/C/man2/socket.2:72 build/C/man2/socket.2:77
6796 #: build/C/man2/socket.2:82 build/C/man2/socket.2:85 build/C/man2/socket.2:92
6797 #: build/C/man2/socket.2:97 build/C/man2/socket.2:102
6798 #: build/C/man2/socket.2:105 build/C/man2/socket.2:110
6799 #, no-wrap
6800 msgid "T{\n"
6801 msgstr "T{\n"
6802
6803 #. type: tbl table
6804 #: build/C/man2/socket.2:66
6805 #, no-wrap
6806 msgid "B<AF_UNIX>, B<AF_LOCAL>\n"
6807 msgstr "B<AF_UNIX>, B<AF_LOCAL>\n"
6808
6809 #. type: tbl table
6810 #: build/C/man2/socket.2:67 build/C/man2/socket.2:69 build/C/man2/socket.2:87
6811 #: build/C/man2/socket.2:89 build/C/man2/socket.2:99 build/C/man2/socket.2:112
6812 #: build/C/man2/socket.2:114 build/C/man7/socket.7:162
6813 #, no-wrap
6814 msgid "T}:T{\n"
6815 msgstr "T}:T{\n"
6816
6817 #. type: tbl table
6818 #: build/C/man2/socket.2:68
6819 #, no-wrap
6820 msgid "Local communication\n"
6821 msgstr "ローカル通信\n"
6822
6823 #. type: tbl table
6824 #: build/C/man2/socket.2:70
6825 #, no-wrap
6826 msgid "B<unix>(7)\n"
6827 msgstr "B<unix>(7)\n"
6828
6829 #. type: tbl table
6830 #: build/C/man2/socket.2:71 build/C/man2/socket.2:76 build/C/man2/socket.2:81
6831 #: build/C/man2/socket.2:91 build/C/man2/socket.2:96 build/C/man2/socket.2:109
6832 #: build/C/man2/socket.2:116 build/C/man7/socket.7:141
6833 #: build/C/man7/socket.7:145 build/C/man7/socket.7:148
6834 #: build/C/man7/socket.7:154 build/C/man7/socket.7:157
6835 #: build/C/man7/socket.7:166 build/C/man7/socket.7:173
6836 #, no-wrap
6837 msgid "T}\n"
6838 msgstr "T}\n"
6839
6840 #. type: tbl table
6841 #: build/C/man2/socket.2:73
6842 #, no-wrap
6843 msgid "B<AF_INET>\n"
6844 msgstr "B<AF_INET>\n"
6845
6846 #. type: tbl table
6847 #: build/C/man2/socket.2:74
6848 #, no-wrap
6849 msgid "T}:IPv4 Internet protocols:T{\n"
6850 msgstr "T}:IPv4 インターネット・プロトコル:T{\n"
6851
6852 #. type: tbl table
6853 #: build/C/man2/socket.2:75
6854 #, no-wrap
6855 msgid "B<ip>(7)\n"
6856 msgstr "B<ip>(7)\n"
6857
6858 #. type: tbl table
6859 #: build/C/man2/socket.2:78
6860 #, no-wrap
6861 msgid "B<AF_INET6>\n"
6862 msgstr "B<AF_INET6>\n"
6863
6864 #. type: tbl table
6865 #: build/C/man2/socket.2:79
6866 #, no-wrap
6867 msgid "T}:IPv6 Internet protocols:T{\n"
6868 msgstr "T}:IPv6 インターネット・プロトコル:T{\n"
6869
6870 #. type: tbl table
6871 #: build/C/man2/socket.2:80
6872 #, no-wrap
6873 msgid "B<ipv6>(7)\n"
6874 msgstr "B<ipv6>(7)\n"
6875
6876 #. type: tbl table
6877 #: build/C/man2/socket.2:83
6878 #, no-wrap
6879 msgid "B<AF_IPX>\n"
6880 msgstr "B<AF_IPX>\n"
6881
6882 #. type: tbl table
6883 #: build/C/man2/socket.2:84
6884 #, no-wrap
6885 msgid "T}:IPX - Novell protocols:\n"
6886 msgstr "T}:IPX - Novell プロトコル:\n"
6887
6888 #. type: tbl table
6889 #: build/C/man2/socket.2:86
6890 #, no-wrap
6891 msgid "B<AF_NETLINK>\n"
6892 msgstr "B<AF_NETLINK>\n"
6893
6894 #. type: tbl table
6895 #: build/C/man2/socket.2:88
6896 #, no-wrap
6897 msgid "Kernel user interface device\n"
6898 msgstr "カーネル・ユーザ・デバイス\n"
6899
6900 #. type: tbl table
6901 #: build/C/man2/socket.2:90
6902 #, no-wrap
6903 msgid "B<netlink>(7)\n"
6904 msgstr "B<netlink>(7)\n"
6905
6906 #. type: tbl table
6907 #: build/C/man2/socket.2:93
6908 #, no-wrap
6909 msgid "B<AF_X25>\n"
6910 msgstr "B<AF_X25>\n"
6911
6912 #. type: tbl table
6913 #: build/C/man2/socket.2:94
6914 #, no-wrap
6915 msgid "T}:ITU-T X.25 / ISO-8208 protocol:T{\n"
6916 msgstr "T}:ITU-T X.25 / ISO-8208 プロトコル:T{\n"
6917
6918 #. type: tbl table
6919 #: build/C/man2/socket.2:95
6920 #, no-wrap
6921 msgid "B<x25>(7)\n"
6922 msgstr "B<x25>(7)\n"
6923
6924 #. type: tbl table
6925 #: build/C/man2/socket.2:98
6926 #, no-wrap
6927 msgid "B<AF_AX25>\n"
6928 msgstr "B<AF_AX25>\n"
6929
6930 #. type: tbl table
6931 #: build/C/man2/socket.2:100
6932 #, no-wrap
6933 msgid "Amateur radio AX.25 protocol\n"
6934 msgstr "アマチュア無線 AX.25 プロトコル\n"
6935
6936 #. type: tbl table
6937 #: build/C/man2/socket.2:101
6938 #, no-wrap
6939 msgid "T}:\n"
6940 msgstr "T}:\n"
6941
6942 #. type: tbl table
6943 #: build/C/man2/socket.2:103
6944 #, no-wrap
6945 msgid "B<AF_ATMPVC>\n"
6946 msgstr "B<AF_ATMPVC>\n"
6947
6948 #. type: tbl table
6949 #: build/C/man2/socket.2:104
6950 #, no-wrap
6951 msgid "T}:Access to raw ATM PVCs:\n"
6952 msgstr "T}:生の ATM PVC にアクセスする:\n"
6953
6954 #. type: tbl table
6955 #: build/C/man2/socket.2:106
6956 #, no-wrap
6957 msgid "B<AF_APPLETALK>\n"
6958 msgstr "B<AF_APPLETALK>\n"
6959
6960 #. type: tbl table
6961 #: build/C/man2/socket.2:107
6962 #, no-wrap
6963 msgid "T}:Appletalk:T{\n"
6964 msgstr "T}:アップルトーク:T{\n"
6965
6966 #. type: tbl table
6967 #: build/C/man2/socket.2:108
6968 #, no-wrap
6969 msgid "B<ddp>(7)\n"
6970 msgstr "B<ddp>(7)\n"
6971
6972 #. type: tbl table
6973 #: build/C/man2/socket.2:111
6974 #, no-wrap
6975 msgid "B<AF_PACKET>\n"
6976 msgstr "B<AF_PACKET>\n"
6977
6978 #. type: tbl table
6979 #: build/C/man2/socket.2:113
6980 #, no-wrap
6981 msgid "Low level packet interface\n"
6982 msgstr "低レベルのパケットインターフェース\n"
6983
6984 #. type: tbl table
6985 #: build/C/man2/socket.2:115
6986 #, no-wrap
6987 msgid "B<packet>(7)\n"
6988 msgstr "B<packet>(7)\n"
6989
6990 #. type: Plain text
6991 #: build/C/man2/socket.2:124
6992 msgid ""
6993 "The socket has the indicated I<type>, which specifies the communication "
6994 "semantics.  Currently defined types are:"
6995 msgstr ""
6996 "ソケットは I<type> で指定される型を持ち、それは通信方式(semantics)を指定す"
6997 "る。 定義されている型は現在以下の通り。"
6998
6999 #. type: TP
7000 #: build/C/man2/socket.2:124
7001 #, no-wrap
7002 msgid "B<SOCK_STREAM>"
7003 msgstr "B<SOCK_STREAM>"
7004
7005 #. type: Plain text
7006 #: build/C/man2/socket.2:128
7007 msgid ""
7008 "Provides sequenced, reliable, two-way, connection-based byte streams.  An "
7009 "out-of-band data transmission mechanism may be supported."
7010 msgstr ""
7011 "順序性と信頼性があり、双方向の、接続された バイト・ストリーム(byte stream)を"
7012 "提供する。 帯域外(out-of-band)データ転送メカニズムもサポートされる。"
7013
7014 #. type: TP
7015 #: build/C/man2/socket.2:128
7016 #, no-wrap
7017 msgid "B<SOCK_DGRAM>"
7018 msgstr "B<SOCK_DGRAM>"
7019
7020 #. type: Plain text
7021 #: build/C/man2/socket.2:132
7022 msgid ""
7023 "Supports datagrams (connectionless, unreliable messages of a fixed maximum "
7024 "length)."
7025 msgstr "データグラム(接続、信頼性無し、固定最大長メッセージ)  をサポートする。"
7026
7027 #. type: TP
7028 #: build/C/man2/socket.2:132
7029 #, no-wrap
7030 msgid "B<SOCK_SEQPACKET>"
7031 msgstr "B<SOCK_SEQPACKET>"
7032
7033 #. type: Plain text
7034 #: build/C/man2/socket.2:137
7035 msgid ""
7036 "Provides a sequenced, reliable, two-way connection-based data transmission "
7037 "path for datagrams of fixed maximum length; a consumer is required to read "
7038 "an entire packet with each input system call."
7039 msgstr ""
7040 "固定最大長のデータグラム転送パスに基づいた順序性、信頼性のある 双方向の接続に"
7041 "基づいた通信を提供する。受け取り側ではそれぞれの入力 システム・コールでパケッ"
7042 "ト全体を読み取ることが要求される。"
7043
7044 #. type: TP
7045 #: build/C/man2/socket.2:137
7046 #, no-wrap
7047 msgid "B<SOCK_RAW>"
7048 msgstr "B<SOCK_RAW>"
7049
7050 #. type: Plain text
7051 #: build/C/man2/socket.2:140
7052 msgid "Provides raw network protocol access."
7053 msgstr "生のネットワーク・プロトコルへのアクセスを提供する。"
7054
7055 #. type: TP
7056 #: build/C/man2/socket.2:140
7057 #, no-wrap
7058 msgid "B<SOCK_RDM>"
7059 msgstr "B<SOCK_RDM>"
7060
7061 #. type: Plain text
7062 #: build/C/man2/socket.2:143
7063 msgid "Provides a reliable datagram layer that does not guarantee ordering."
7064 msgstr "信頼性はあるが、順序は保証しないデータグラム層を提供する。"
7065
7066 #. type: TP
7067 #: build/C/man2/socket.2:143
7068 #, no-wrap
7069 msgid "B<SOCK_PACKET>"
7070 msgstr "B<SOCK_PACKET>"
7071
7072 #. type: Plain text
7073 #: build/C/man2/socket.2:148
7074 msgid "Obsolete and should not be used in new programs; see B<packet>(7)."
7075 msgstr ""
7076 "廃止されており新しいプログラムで使用してはいけない。 B<packet>(7)  を参照する"
7077 "こと"
7078
7079 #. type: Plain text
7080 #: build/C/man2/socket.2:154
7081 msgid ""
7082 "Some socket types may not be implemented by all protocol families; for "
7083 "example, B<SOCK_SEQPACKET> is not implemented for B<AF_INET>."
7084 msgstr ""
7085 "ある種のソケット型が全てのプロトコル・ファミリで実装されているわけではない。 "
7086 "例えば B<SOCK_SEQPACKET> は B<AF_INET> には実装されていない。"
7087
7088 #. type: Plain text
7089 #: build/C/man2/socket.2:162
7090 msgid ""
7091 "Since Linux 2.6.27, the I<type> argument serves a second purpose: in "
7092 "addition to specifying a socket type, it may include the bitwise OR of any "
7093 "of the following values, to modify the behavior of B<socket>():"
7094 msgstr ""
7095 "Linux 2.6.27 以降では、 I<type> 引数は二つ目の目的にも使用される。 ソケットの"
7096 "型を指定するのに加えて、 以下の値のいくつかをビット単位の論理和 (OR) で指定す"
7097 "ることで、 B<socket>()  の振舞いを変更することができる。"
7098
7099 #. type: Plain text
7100 #: build/C/man2/socket.2:196
7101 msgid ""
7102 "The I<protocol> specifies a particular protocol to be used with the socket.  "
7103 "Normally only a single protocol exists to support a particular socket type "
7104 "within a given protocol family, in which case I<protocol> can be specified "
7105 "as 0.  However, it is possible that many protocols may exist, in which case "
7106 "a particular protocol must be specified in this manner.  The protocol number "
7107 "to use is specific to the ``communication domain'' in which communication is "
7108 "to take place; see B<protocols>(5).  See B<getprotoent>(3)  on how to map "
7109 "protocol name strings to protocol numbers."
7110 msgstr ""
7111 "I<protocol> はソケットによって使用される固有のプロトコルを指定する。通常それ"
7112 "ぞれの ソケットは、与えられたプロトコル・ファミリの種類ごとに一つのプロトコル"
7113 "のみを サポートする。 その場合は I<protocol> に 0 を指定できる。 しかし、多く"
7114 "のプロトコルが存在してもかまわない。 この場合にはこの方法により固有のプロトコ"
7115 "ルを指定する必要がある。 使用されるプロトコル番号は通信の行なわれる``通信ドメ"
7116 "イン''に 固有である; B<protocols>(5)  を参照すること。 プロトコル名をどうやっ"
7117 "てプロトコル番号に対応させるかについては B<getprotoent>(3)  を参照すること。"
7118
7119 #. type: Plain text
7120 #: build/C/man2/socket.2:226
7121 msgid ""
7122 "Sockets of type B<SOCK_STREAM> are full-duplex byte streams, similar to "
7123 "pipes.  They do not preserve record boundaries.  A stream socket must be in "
7124 "a I<connected> state before any data may be sent or received on it.  A "
7125 "connection to another socket is created with a B<connect>(2)  call.  Once "
7126 "connected, data may be transferred using B<read>(2)  and B<write>(2)  calls "
7127 "or some variant of the B<send>(2)  and B<recv>(2)  calls.  When a session "
7128 "has been completed a B<close>(2)  may be performed.  Out-of-band data may "
7129 "also be transmitted as described in B<send>(2)  and received as described in "
7130 "B<recv>(2)."
7131 msgstr ""
7132 "B<SOCK_STREAM> 型のソケットはパイプのような全二重バイト・ストリームである。 "
7133 "これらはレコード境界を保存しない。 ストリームは、ソケットがデータを送ったり受"
7134 "けたりする前に I<接続された> 状態になってなければならない。他のソケットへの接"
7135 "続は B<connect>(2)  コールによって行なわれる。一度接続したらデータは B<read>"
7136 "(2)  と B<write>(2)  コールや B<send>(2)  と B<recv>(2)  コールの変種を使用し"
7137 "て転送できる。 セッションが完了したら B<close>(2)  が行なわれる。帯域外データ"
7138 "の転送も B<send>(2)  に記述されており、 受信も B<recv>(2)  に記述されている。"
7139
7140 #. type: Plain text
7141 #: build/C/man2/socket.2:252
7142 msgid ""
7143 "The communications protocols which implement a B<SOCK_STREAM> ensure that "
7144 "data is not lost or duplicated.  If a piece of data for which the peer "
7145 "protocol has buffer space cannot be successfully transmitted within a "
7146 "reasonable length of time, then the connection is considered to be dead.  "
7147 "When B<SO_KEEPALIVE> is enabled on the socket the protocol checks in a "
7148 "protocol-specific manner if the other end is still alive.  A B<SIGPIPE> "
7149 "signal is raised if a process sends or receives on a broken stream; this "
7150 "causes naive processes, which do not handle the signal, to exit.  "
7151 "B<SOCK_SEQPACKET> sockets employ the same system calls as B<SOCK_STREAM> "
7152 "sockets.  The only difference is that B<read>(2)  calls will return only the "
7153 "amount of data requested, and any data remaining in the arriving packet will "
7154 "be discarded.  Also all message boundaries in incoming datagrams are "
7155 "preserved."
7156 msgstr ""
7157 "B<SOCK_STREAM> を実装した通信プロトコルはデータに損失や重複がないことを保証す"
7158 "る。 もし相手のプロトコルがバッファー空間を持つ データの断片を適当な時間のう"
7159 "ちに転送できなければ、 接続は断たれたとみなす。そのソケット B<SO_KEEPALIVE> "
7160 "が有効になっている場合、プロトコル独自の方法で接続の相手側がまだ 有効であるか"
7161 "をチェックする。 もしプロセスが、壊れたストリームでデータを送受信しようとした"
7162 "場合には B<SIGPIPE> シグナルが送られる; これは通常のそのシグナルを扱っていな"
7163 "いプロセスを 終了させる。 B<SOCK_SEQPACKET> ソケットは B<SOCK_STREAM> ソケッ"
7164 "トと同じシステム・コールを使用する。 唯一の違いは B<read>(2)  コールが要求さ"
7165 "れた量のデータのみを返し、到着したパケットの残りの部分を 捨ててしまうことであ"
7166 "る。同様に入ってくるデータグラムの全てのメッセージ境界は 保存される。"
7167
7168 #. type: Plain text
7169 #: build/C/man2/socket.2:262
7170 msgid ""
7171 "B<SOCK_DGRAM> and B<SOCK_RAW> sockets allow sending of datagrams to "
7172 "correspondents named in B<sendto>(2)  calls.  Datagrams are generally "
7173 "received with B<recvfrom>(2), which returns the next datagram along with the "
7174 "address of its sender."
7175 msgstr ""
7176 "B<SOCK_DGRAM> と B<SOCK_RAW> ソケットは B<sendto>(2)  コールで指定された相手"
7177 "へデータグラムを送ることが許されている。 データグラムは一般に B<recvfrom>"
7178 "(2)  で受けとり、 このコールは次のデータグラムを送信者のアドレスと一緒に返"
7179 "す。"
7180
7181 #. type: Plain text
7182 #: build/C/man2/socket.2:269
7183 msgid ""
7184 "B<SOCK_PACKET> is an obsolete socket type to receive raw packets directly "
7185 "from the device driver.  Use B<packet>(7)  instead."
7186 msgstr ""
7187 "B<SOCK_PACKET> は古いソケット型で、生(raw)のパケットをデバイスドライバから 直"
7188 "接受信するためのものである。 今は代わりに B<packet>(7)  を用いること。"
7189
7190 #. type: Plain text
7191 #: build/C/man2/socket.2:292
7192 msgid ""
7193 "An B<fcntl>(2)  B<F_SETOWN> operation can be used to specify a process or "
7194 "process group to receive a B<SIGURG> signal when the out-of-band data "
7195 "arrives or B<SIGPIPE> signal when a B<SOCK_STREAM> connection breaks "
7196 "unexpectedly.  This operation may also be used to set the process or process "
7197 "group that receives the I/O and asynchronous notification of I/O events via "
7198 "B<SIGIO>.  Using B<F_SETOWN> is equivalent to an B<ioctl>(2)  call with the "
7199 "B<FIOSETOWN> or B<SIOCSPGRP> argument."
7200 msgstr ""
7201 "B<fcntl>(2)  の B<F_SETOWN> 操作を使って、シグナル B<SIGURG> や B<SIGPIPE> を"
7202 "受けとるプロセス・グループを指定できる。 B<SIGURG> シグナルは帯域外データが到"
7203 "着した時に、 B<SIGPIPE> シグナルは B<SOCK_STREAM> 接続が予期せず切断された時"
7204 "に送られる。 また、 B<F_SETOWN> 操作は、I/O や I/O イベントの非同期 "
7205 "(asynchronous) 通知を B<SIGIO> を経由で受け取るプロセスやプロセス・グループを"
7206 "設定するのにも使用できる。 B<F_SETOWN> を使用することは B<FIOSETOWN> または "
7207 "B<SIOCSPGRP> の引数で B<ioctl>(2)  を使用することと等価である。"
7208
7209 #. type: Plain text
7210 #: build/C/man2/socket.2:302
7211 msgid ""
7212 "When the network signals an error condition to the protocol module (e.g., "
7213 "using a ICMP message for IP) the pending error flag is set for the socket.  "
7214 "The next operation on this socket will return the error code of the pending "
7215 "error.  For some protocols it is possible to enable a per-socket error queue "
7216 "to retrieve detailed information about the error; see B<IP_RECVERR> in B<ip>"
7217 "(7)."
7218 msgstr ""
7219 "ネットワークがプロトコル・モジュールにエラー状態を伝えた場合 (例えば、IP の "
7220 "ICMP メッセージを使用して)には、ソケットの ペンディング・エラー・フラグが設定"
7221 "される。次にこのソケットを操作した 時にペンディングされていたエラー・コードが"
7222 "返される。プロトコルによっては エラーについてのより詳しい情報を受け取るために"
7223 "ソケットごとのエラー・キューを 受け取ることが可能である。 B<ip>(7)  の "
7224 "B<IP_RECVERR> を参照すること。"
7225
7226 #. type: Plain text
7227 #: build/C/man2/socket.2:312
7228 msgid ""
7229 "The operation of sockets is controlled by socket level I<options>.  These "
7230 "options are defined in I<E<lt>sys/socket.hE<gt>>.  The functions "
7231 "B<setsockopt>(2)  and B<getsockopt>(2)  are used to set and get options, "
7232 "respectively."
7233 msgstr ""
7234 "ソケットの操作はソケット・レベル I<options> によって制御される。 これらのオプ"
7235 "ションは I<E<lt>sys/socket.hE<gt>> に定義されている。 B<setsockopt>(2)  と "
7236 "B<getsockopt>(2)  関数はそれぞれオプションの設定と取得を行なう。"
7237
7238 #. type: Plain text
7239 #: build/C/man2/socket.2:317
7240 msgid ""
7241 "On success, a file descriptor for the new socket is returned.  On error, -1 "
7242 "is returned, and I<errno> is set appropriately."
7243 msgstr ""
7244 "成功した場合、新しいソケットのファイル・ディスクリプターを返す。 エラーが発生"
7245 "した場合は -1 を返し、 I<errno> を適切に設定する。"
7246
7247 #. type: Plain text
7248 #: build/C/man2/socket.2:322
7249 msgid ""
7250 "Permission to create a socket of the specified type and/or protocol is "
7251 "denied."
7252 msgstr ""
7253 "指定されたタイプまたはプロトコルのソケットを作成する許可が与えられていない。"
7254
7255 #. type: Plain text
7256 #: build/C/man2/socket.2:325
7257 msgid "The implementation does not support the specified address family."
7258 msgstr "指定されたアドレスファミリーがサポートされていない。"
7259
7260 #. type: Plain text
7261 #: build/C/man2/socket.2:328
7262 msgid "Unknown protocol, or protocol family not available."
7263 msgstr "知らないプロトコル、または利用できないプロトコル・ファミリである。"
7264
7265 #.  Since Linux 2.6.27
7266 #. type: Plain text
7267 #: build/C/man2/socket.2:333
7268 msgid "Invalid flags in I<type>."
7269 msgstr "I<type> に無効なフラグが指定されている。"
7270
7271 #. type: Plain text
7272 #: build/C/man2/socket.2:336
7273 msgid "Process file table overflow."
7274 msgstr "プロセスのファイルテーブルが溢れている。"
7275
7276 #. type: TP
7277 #: build/C/man2/socket.2:339
7278 #, no-wrap
7279 msgid "B<ENOBUFS> or B<ENOMEM>"
7280 msgstr "B<ENOBUFS> または B<ENOMEM>"
7281
7282 #. type: Plain text
7283 #: build/C/man2/socket.2:344
7284 msgid ""
7285 "Insufficient memory is available.  The socket cannot be created until "
7286 "sufficient resources are freed."
7287 msgstr ""
7288 "十分なメモリがない。十分な資源が解放されるまではソケットを 作成することはでき"
7289 "ない。"
7290
7291 #. type: TP
7292 #: build/C/man2/socket.2:344 build/C/man2/socketpair.2:90
7293 #, no-wrap
7294 msgid "B<EPROTONOSUPPORT>"
7295 msgstr "B<EPROTONOSUPPORT>"
7296
7297 #. type: Plain text
7298 #: build/C/man2/socket.2:348
7299 msgid ""
7300 "The protocol type or the specified protocol is not supported within this "
7301 "domain."
7302 msgstr ""
7303 "このドメインでは指定されたプロトコルまたはプロトコル・タイプが サポートされて"
7304 "いない。"
7305
7306 #. type: Plain text
7307 #: build/C/man2/socket.2:350
7308 msgid "Other errors may be generated by the underlying protocol modules."
7309 msgstr "下位のプロトコル・モジュールから他のエラーが生成されるかもしれない。"
7310
7311 #. type: Plain text
7312 #: build/C/man2/socket.2:352
7313 msgid "4.4BSD, POSIX.1-2001."
7314 msgstr "4.4BSD, POSIX.1-2001."
7315
7316 #. type: Plain text
7317 #: build/C/man2/socket.2:358
7318 msgid "The B<SOCK_NONBLOCK> and B<SOCK_CLOEXEC> flags are Linux-specific."
7319 msgstr "フラグ B<SOCK_NONBLOCK>, B<SOCK_CLOEXEC> は Linux 固有である。"
7320
7321 #. type: Plain text
7322 #: build/C/man2/socket.2:364
7323 msgid ""
7324 "B<socket>()  appeared in 4.2BSD.  It is generally portable to/from non-BSD "
7325 "systems supporting clones of the BSD socket layer (including System V "
7326 "variants)."
7327 msgstr ""
7328 "B<socket>()  は 4.2BSD で登場した。一般に、(System V の変種を含めて)  BSD の"
7329 "ソケット層の互換性をサポートしている BSD 以外のシステムへの、 または、BSD 以"
7330 "外のシステムからの移植ができる。"
7331
7332 #. type: Plain text
7333 #: build/C/man2/socket.2:382
7334 msgid ""
7335 "The manifest constants used under 4.x BSD for protocol families are "
7336 "B<PF_UNIX>, B<PF_INET>, etc., while B<AF_UNIX> etc. are used for address "
7337 "families.  However, already the BSD man page promises: \"The protocol family "
7338 "generally is the same as the address family\", and subsequent standards use "
7339 "AF_* everywhere."
7340 msgstr ""
7341 "4.x BSD において定数を使用する場合、プロトコル・ファミリーには B<PF_UNIX>, "
7342 "B<PF_INET> 等を使用している。一方でアドレス・ファミリーには B<AF_UNIX> 等が使"
7343 "用されている。しかしながら BSD のマニュアルでは 「一般にプロトコル・ファミ"
7344 "リーはアドレス・ファミリーと同じものである。」 と保証している。それでそれ以外"
7345 "の規格では全ての場所で AF_* が使用されている。"
7346
7347 #. type: Plain text
7348 #: build/C/man2/socket.2:387
7349 msgid "An example of the use of B<socket>()  is shown in B<getaddrinfo>(3)."
7350 msgstr "B<socket>()  の利用例が B<getaddrinfo>(3)  に記載されている。"
7351
7352 #. type: Plain text
7353 #: build/C/man2/socket.2:410
7354 msgid ""
7355 "B<accept>(2), B<bind>(2), B<connect>(2), B<fcntl>(2), B<getpeername>(2), "
7356 "B<getsockname>(2), B<getsockopt>(2), B<ioctl>(2), B<listen>(2), B<read>(2), "
7357 "B<recv>(2), B<select>(2), B<send>(2), B<shutdown>(2), B<socketpair>(2), "
7358 "B<write>(2), B<getprotoent>(3), B<ip>(7), B<socket>(7), B<tcp>(7), B<udp>"
7359 "(7), B<unix>(7)"
7360 msgstr ""
7361 "B<accept>(2), B<bind>(2), B<connect>(2), B<fcntl>(2), B<getpeername>(2), "
7362 "B<getsockname>(2), B<getsockopt>(2), B<ioctl>(2), B<listen>(2), B<read>(2), "
7363 "B<recv>(2), B<select>(2), B<send>(2), B<shutdown>(2), B<socketpair>(2), "
7364 "B<write>(2), B<getprotoent>(3), B<ip>(7), B<socket>(7), B<tcp>(7), B<udp>"
7365 "(7), B<unix>(7)"
7366
7367 #. type: Plain text
7368 #: build/C/man2/socket.2:414
7369 msgid ""
7370 "\\(lqAn Introductory 4.3BSD Interprocess Communication Tutorial\\(rq is "
7371 "reprinted in I<UNIX Programmer's Supplementary Documents Volume 1.>"
7372 msgstr ""
7373 "\\(lqAn Introductory 4.3BSD Interprocess Communication Tutorial\\(rq は "
7374 "I<UNIX Programmer's Supplementary Documents Volume 1> として再版された。"
7375
7376 #. type: Plain text
7377 #: build/C/man2/socket.2:417
7378 msgid ""
7379 "\\(lqBSD Interprocess Communication Tutorial\\(rq is reprinted in I<UNIX "
7380 "Programmer's Supplementary Documents Volume 1.>"
7381 msgstr ""
7382 "\\(lqBSD Interprocess Communication Tutorial\\(rq は I<UNIX Programmer's "
7383 "Supplementary Documents Volume 1> として再版された。"
7384
7385 #. type: TH
7386 #: build/C/man7/socket.7:26
7387 #, no-wrap
7388 msgid "2010-06-13"
7389 msgstr "2010-06-13"
7390
7391 #. type: Plain text
7392 #: build/C/man7/socket.7:29
7393 msgid "socket - Linux socket interface"
7394 msgstr "socket - Linux のソケットインターフェース"
7395
7396 #. type: Plain text
7397 #: build/C/man7/socket.7:33
7398 msgid ""
7399 "I<sockfd>B< = socket(int >I<socket_family>B<, int >I<socket_type>B<, int "
7400 ">I<protocol>B<);>"
7401 msgstr ""
7402 "I<sockfd>B< = socket(int >I<socket_family>B<, int >I<socket_type>B<, int "
7403 ">I<protocol>B<);>"
7404
7405 #. type: Plain text
7406 #: build/C/man7/socket.7:52
7407 msgid ""
7408 "This manual page describes the Linux networking socket layer user "
7409 "interface.  The BSD compatible sockets are the uniform interface between the "
7410 "user process and the network protocol stacks in the kernel.  The protocol "
7411 "modules are grouped into I<protocol families> like B<AF_INET>, B<AF_IPX>, "
7412 "B<AF_PACKET> and I<socket types> like B<SOCK_STREAM> or B<SOCK_DGRAM>.  See "
7413 "B<socket>(2)  for more information on families and types."
7414 msgstr ""
7415 "このマニュアルページは Linux ネットワークのソケット層に対する ユーザインター"
7416 "フェースを記述するものである。 BSD 互換ソケットは、ユーザプロセスとカーネル内"
7417 "部の ネットワークプロトコルスタック群との間に、 統一的なインターフェースを提"
7418 "供するものである。 プロトコルモジュールは I<プロトコルファミリー (protocol "
7419 "familiy)> (例: B<AF_INET>, B<AF_IPX>, B<AF_PACKET>)  と I<ソケットタイプ "
7420 "(socket types)> (例: B<SOCK_STREAM>, B<SOCK_DGRAM>)  に分類できる。 これらに"
7421 "関するより詳しい情報は B<socket>(2)  を参照のこと。"
7422
7423 #. type: SS
7424 #: build/C/man7/socket.7:52
7425 #, no-wrap
7426 msgid "Socket Layer Functions"
7427 msgstr "ソケット層の関数群"
7428
7429 #. type: Plain text
7430 #: build/C/man7/socket.7:56
7431 msgid ""
7432 "These functions are used by the user process to send or receive packets and "
7433 "to do other socket operations.  For more information see their respective "
7434 "manual pages."
7435 msgstr ""
7436 "これらの関数はユーザプロセスがパケットを送受信したり、その他のソケット操作を "
7437 "行ったりするために用いられる。詳細はそれぞれのマニュアルページを 見てほしい。"
7438
7439 #. type: Plain text
7440 #: build/C/man7/socket.7:72
7441 msgid ""
7442 "B<socket>(2)  creates a socket, B<connect>(2)  connects a socket to a remote "
7443 "socket address, the B<bind>(2)  function binds a socket to a local socket "
7444 "address, B<listen>(2)  tells the socket that new connections shall be "
7445 "accepted, and B<accept>(2)  is used to get a new socket with a new incoming "
7446 "connection.  B<socketpair>(2)  returns two connected anonymous sockets (only "
7447 "implemented for a few local families like B<AF_UNIX>)"
7448 msgstr ""
7449 "B<socket>(2)  はソケットを生成する。 B<connect>(2)  はソケットをリモートのソ"
7450 "ケットアドレスに接続する。 B<bind>(2)  はソケットをローカルのソケットアドレス"
7451 "にバインドする。 B<listen>(2)  はソケットに新しい接続が来たら受信するように伝"
7452 "え、 B<accept>(2)  は外部からやってきた接続に対して新しいソケットを得るために"
7453 "用いられる。 B<socketpair>(2)  は互いに接続された二つの名前無しソケット "
7454 "(anonymous socket) を返す (B<AF_UNIX> のような、いくつかのローカルなファミ"
7455 "リーでしか実装されていない)。"
7456
7457 #. type: Plain text
7458 #: build/C/man7/socket.7:94
7459 msgid ""
7460 "B<send>(2), B<sendto>(2), and B<sendmsg>(2)  send data over a socket, and "
7461 "B<recv>(2), B<recvfrom>(2), B<recvmsg>(2)  receive data from a socket.  "
7462 "B<poll>(2)  and B<select>(2)  wait for arriving data or a readiness to send "
7463 "data.  In addition, the standard I/O operations like B<write>(2), B<writev>"
7464 "(2), B<sendfile>(2), B<read>(2), and B<readv>(2)  can be used to read and "
7465 "write data."
7466 msgstr ""
7467 "B<send>(2), B<sendto>(2), B<sendmsg>(2)  はソケットを通してデータを送信し、 "
7468 "B<recv>(2)  B<recvfrom>(2), B<recvmsg>(2)  はソケットからデータを受信する。 "
7469 "B<poll>(2)  と B<select>(2)  はデータの到着を待ったり、データ送信の準備ができ"
7470 "るまで待ったりする。 さらに、 B<write>(2), B<writev>(2), B<sendfile>(2), "
7471 "B<read>(2), B<readv>(2)  のような標準的な I/O 操作もデータの読み書きに用いる"
7472 "ことができる。"
7473
7474 #. type: Plain text
7475 #: build/C/man7/socket.7:105
7476 msgid ""
7477 "B<getsockname>(2)  returns the local socket address and B<getpeername>(2)  "
7478 "returns the remote socket address.  B<getsockopt>(2)  and B<setsockopt>(2)  "
7479 "are used to set or get socket layer or protocol options.  B<ioctl>(2)  can "
7480 "be used to set or read some other options."
7481 msgstr ""
7482 "B<getsockbyname>(2)  はローカルのソケットアドレスを返し、 B<getpeername>(2)  "
7483 "はリモートのソケットアドレスを返す。 B<getsockopt>(2)  と B<setsockopt>(2)  "
7484 "はソケット層のオプションやプロトコルオプションの取得・設定に用いられる。 他の"
7485 "いくつかのオプションの取得・設定には B<ioctl>(2)  を使うことができる。"
7486
7487 #. type: Plain text
7488 #: build/C/man7/socket.7:110
7489 msgid ""
7490 "B<close>(2)  is used to close a socket.  B<shutdown>(2)  closes parts of a "
7491 "full-duplex socket connection."
7492 msgstr ""
7493 "B<close>(2)  はソケットをクローズする。 B<shutdown>(2)  は全二重なソケット接"
7494 "続を部分的にクローズする。"
7495
7496 #. type: Plain text
7497 #: build/C/man7/socket.7:116
7498 msgid ""
7499 "Seeking, or calling B<pread>(2)  or B<pwrite>(2)  with a nonzero position is "
7500 "not supported on sockets."
7501 msgstr ""
7502 "シーク動作や、 0 以外の位置に対する B<pread>(2)  や B<pwrite>(2)  はソケット"
7503 "ではサポートされていない。"
7504
7505 #. type: Plain text
7506 #: build/C/man7/socket.7:133
7507 msgid ""
7508 "It is possible to do nonblocking I/O on sockets by setting the B<O_NONBLOCK> "
7509 "flag on a socket file descriptor using B<fcntl>(2).  Then all operations "
7510 "that would block will (usually)  return with B<EAGAIN> (operation should be "
7511 "retried later); B<connect>(2)  will return B<EINPROGRESS> error.  The user "
7512 "can then wait for various events via B<poll>(2)  or B<select>(2)."
7513 msgstr ""
7514 "非ブロッキングな I/O をソケットで行うことは可能で、 B<fcntl>(2)  を使ってソ"
7515 "ケットのファイルディスクリプタに B<O_NONBLOCK> フラグをセットすれば良い。 こ"
7516 "うするとブロックされる操作は、 (通常)  B<EAGAIN> エラーで戻ることになる (後で"
7517 "処理が再試行されることが期待されている)。 B<connect>(2)  では B<EINPROGRESS> "
7518 "エラーが返される。 この場合、ユーザはさまざまなイベントを B<poll>(2)  や "
7519 "B<select>(2)  を使って待つことができる。"
7520
7521 #. type: tbl table
7522 #: build/C/man7/socket.7:137
7523 #, no-wrap
7524 msgid "I/O events\n"
7525 msgstr "I/O イベント\n"
7526
7527 #. type: tbl table
7528 #: build/C/man7/socket.7:138
7529 #, no-wrap
7530 msgid "Event:Poll flag:Occurrence\n"
7531 msgstr "イベント:poll フラグ:内容\n"
7532
7533 #. type: tbl table
7534 #: build/C/man7/socket.7:139 build/C/man7/socket.7:142
7535 #, no-wrap
7536 msgid "Read:POLLIN:T{\n"
7537 msgstr "Read:POLLIN:T{\n"
7538
7539 #. type: tbl table
7540 #: build/C/man7/socket.7:140
7541 #, no-wrap
7542 msgid "New data arrived.\n"
7543 msgstr "新しいデータが到着した。\n"
7544
7545 #. type: tbl table
7546 #: build/C/man7/socket.7:143
7547 #, no-wrap
7548 msgid "A connection setup has been completed\n"
7549 msgstr "(接続志向のソケットで)\n"
7550
7551 #. type: tbl table
7552 #: build/C/man7/socket.7:144
7553 #, no-wrap
7554 msgid "(for connection-oriented sockets)\n"
7555 msgstr "接続の設定が終了した。\n"
7556
7557 #. type: tbl table
7558 #: build/C/man7/socket.7:146 build/C/man7/socket.7:149
7559 #, no-wrap
7560 msgid "Read:POLLHUP:T{\n"
7561 msgstr "Read:POLLHUP:T{\n"
7562
7563 #. type: tbl table
7564 #: build/C/man7/socket.7:147
7565 #, no-wrap
7566 msgid "A disconnection request has been initiated by the other end.\n"
7567 msgstr "接続先で切断要求が生成された。\n"
7568
7569 #. type: tbl table
7570 #: build/C/man7/socket.7:150
7571 #, no-wrap
7572 msgid "A connection is broken (only for connection-oriented protocols).\n"
7573 msgstr "接続が壊れた (接続志向のプロトコルのみ)。\n"
7574
7575 #. type: tbl table
7576 #: build/C/man7/socket.7:151
7577 #, no-wrap
7578 msgid "When the socket is written\n"
7579 msgstr "この場合、ソケットに書き込みが行われると\n"
7580
7581 #. type: tbl table
7582 #: build/C/man7/socket.7:152
7583 #, no-wrap
7584 msgid "B<SIGPIPE>\n"
7585 msgstr "B<SIGPIPE>\n"
7586
7587 #. type: tbl table
7588 #: build/C/man7/socket.7:153
7589 #, no-wrap
7590 msgid "is also sent.\n"
7591 msgstr "も送信される。\n"
7592
7593 #. type: tbl table
7594 #: build/C/man7/socket.7:155
7595 #, no-wrap
7596 msgid "Write:POLLOUT:T{\n"
7597 msgstr "Write:POLLOUT:T{\n"
7598
7599 #. type: tbl table
7600 #: build/C/man7/socket.7:156
7601 #, no-wrap
7602 msgid "Socket has enough send buffer space for writing new data.\n"
7603 msgstr "ソケットには新しいデータを書き込むのに充分なバッファ領域がある。\n"
7604
7605 #. type: tbl table
7606 #: build/C/man7/socket.7:158
7607 #, no-wrap
7608 msgid "Read/Write:T{\n"
7609 msgstr "Read/Write:T{\n"
7610
7611 #. type: tbl table
7612 #: build/C/man7/socket.7:159
7613 #, no-wrap
7614 msgid "POLLIN|\n"
7615 msgstr "POLLIN|\n"
7616
7617 #. type: tbl table
7618 #: build/C/man7/socket.7:160
7619 #, no-wrap
7620 msgid ".br\n"
7621 msgstr ".br\n"
7622
7623 #. type: tbl table
7624 #: build/C/man7/socket.7:161
7625 #, no-wrap
7626 msgid "POLLOUT\n"
7627 msgstr "POLLOUT\n"
7628
7629 #. type: tbl table
7630 #: build/C/man7/socket.7:163
7631 #, no-wrap
7632 msgid "An outgoing\n"
7633 msgstr "外部向けの\n"
7634
7635 #. type: tbl table
7636 #: build/C/man7/socket.7:164
7637 #, no-wrap
7638 msgid "B<connect>(2)\n"
7639 msgstr "B<connect>(2)\n"
7640
7641 #. type: tbl table
7642 #: build/C/man7/socket.7:165
7643 #, no-wrap
7644 msgid "finished.\n"
7645 msgstr "が終了した。\n"
7646
7647 #. type: tbl table
7648 #: build/C/man7/socket.7:167
7649 #, no-wrap
7650 msgid "Read/Write:POLLERR:An asynchronous error occurred.\n"
7651 msgstr "Read/Write:POLLERR:非同期的 (asynchronous) なエラーが起こった。\n"
7652
7653 #. type: tbl table
7654 #: build/C/man7/socket.7:168
7655 #, no-wrap
7656 msgid "Read/Write:POLLHUP:The other end has shut down one direction.\n"
7657 msgstr "Read/Write:POLLHUP:接続先が片方向を切断した。\n"
7658
7659 #. type: tbl table
7660 #: build/C/man7/socket.7:169
7661 #, no-wrap
7662 msgid "Exception:POLLPRI:T{\n"
7663 msgstr "Exception:POLLPRI:T{\n"
7664
7665 #. type: tbl table
7666 #: build/C/man7/socket.7:170
7667 #, no-wrap
7668 msgid "Urgent data arrived.\n"
7669 msgstr "緊急データ (urgent data) が到着した。この場合は\n"
7670
7671 #. type: tbl table
7672 #: build/C/man7/socket.7:171
7673 #, no-wrap
7674 msgid "B<SIGURG>\n"
7675 msgstr "B<SIGURG>\n"
7676
7677 #. type: tbl table
7678 #: build/C/man7/socket.7:172
7679 #, no-wrap
7680 msgid "is sent then.\n"
7681 msgstr "が送信される。\n"
7682
7683 #. type: Plain text
7684 #: build/C/man7/socket.7:202
7685 msgid ""
7686 "An alternative to B<poll>(2)  and B<select>(2)  is to let the kernel inform "
7687 "the application about events via a B<SIGIO> signal.  For that the B<O_ASYNC> "
7688 "flag must be set on a socket file descriptor via B<fcntl>(2)  and a valid "
7689 "signal handler for B<SIGIO> must be installed via B<sigaction>(2).  See the "
7690 "I<Signals> discussion below."
7691 msgstr ""
7692 "B<poll>(2)  や B<select>(2)  を使う代わりに、カーネルからアプリケーションに "
7693 "イベントを通知させるのに B<SIGIO> シグナルを使う方法もある。 この方法を使うに"
7694 "は、 B<fcntl>(2)  を用いてソケットのファイルディスクリプタに B<O_ASYNC> フラ"
7695 "グをセットし、 B<SIGIO> に対する有効なシグナルハンドラを B<sigaction>(2)  に"
7696 "よって設定しておく必要がある。 後述の I<シグナル> に関する議論も参考にするこ"
7697 "と。"
7698
7699 #. type: SS
7700 #: build/C/man7/socket.7:202
7701 #, no-wrap
7702 msgid "Socket Options"
7703 msgstr "ソケットオプション"
7704
7705 #.  FIXME
7706 #.  In the list below, the text used to describe argument types
7707 #.  for each socket option should be more consistent
7708 #.  SO_ACCEPTCONN is in POSIX.1-2001, and its origin is explained in
7709 #.  W R Stevens, UNPv1
7710 #. type: Plain text
7711 #: build/C/man7/socket.7:216
7712 msgid ""
7713 "These socket options can be set by using B<setsockopt>(2)  and read with "
7714 "B<getsockopt>(2)  with the socket level set to B<SOL_SOCKET> for all sockets:"
7715 msgstr ""
7716 "これらのソケットオプションは、 B<setsockopt>(2)  を用いれば設定でき、 "
7717 "B<getsockopt>(2)  を用いれば取得できる。 但し、どのソケットの場合も ソケット"
7718 "レベルには B<SOL_SOCKET> を指定すること。"
7719
7720 #. type: TP
7721 #: build/C/man7/socket.7:216
7722 #, no-wrap
7723 msgid "B<SO_ACCEPTCONN>"
7724 msgstr "B<SO_ACCEPTCONN>"
7725
7726 #. type: Plain text
7727 #: build/C/man7/socket.7:224
7728 msgid ""
7729 "Returns a value indicating whether or not this socket has been marked to "
7730 "accept connections with B<listen>(2).  The value 0 indicates that this is "
7731 "not a listening socket, the value 1 indicates that this is a listening "
7732 "socket.  This socket option is read-only."
7733 msgstr ""
7734 "このソケットが B<listen>(2)  によって接続待ち受け状態に設定されているかどうか"
7735 "を示す値を返す。 値 0 は listen 状態のソケットでないことを、 値 1 は listen "
7736 "状態のソケットであることを示す。このソケットオプションは読み込み専用である。"
7737
7738 #. type: TP
7739 #: build/C/man7/socket.7:224
7740 #, no-wrap
7741 msgid "B<SO_BINDTODEVICE>"
7742 msgstr "B<SO_BINDTODEVICE>"
7743
7744 #. type: Plain text
7745 #: build/C/man7/socket.7:243
7746 msgid ""
7747 "Bind this socket to a particular device like \\(lqeth0\\(rq, as specified in "
7748 "the passed interface name.  If the name is an empty string or the option "
7749 "length is zero, the socket device binding is removed.  The passed option is "
7750 "a variable-length null-terminated interface name string with the maximum "
7751 "size of B<IFNAMSIZ>.  If a socket is bound to an interface, only packets "
7752 "received from that particular interface are processed by the socket.  Note "
7753 "that this only works for some socket types, particularly B<AF_INET> "
7754 "sockets.  It is not supported for packet sockets (use normal B<bind>(2)  "
7755 "there)."
7756 msgstr ""
7757 "このソケットを、引き数で渡したインターフェース名で指定される\n"
7758 "(\\(lqeth0\\(rq のような) 特定のデバイスにバインドする。\n"
7759 "名前が空文字列だったり、オプションの長さ (optlen) が 0 の場合には、\n"
7760 "ソケットのバインドが削除される。渡すオプションは、インターフェース名が\n"
7761 "入ったヌル文字で終端された可変長の文字列である。\n"
7762 "文字列の最大のサイズは B<IFNAMSIX> である。\n"
7763 "ソケットがインターフェースにバインドされると、その特定のインターフェース\n"
7764 "から受信されたパケットだけを処理する。\n"
7765 "このオプションはいくつかのソケットタイプ、\n"
7766 "特に B<AF_INET> に対してのみ動作する点に注意すること。\n"
7767 "パケットソケットではサポートされていない (通常の B<bind>(2) を使うこと)。"
7768
7769 #. type: TP
7770 #: build/C/man7/socket.7:243
7771 #, no-wrap
7772 msgid "B<SO_BROADCAST>"
7773 msgstr "B<SO_BROADCAST>"
7774
7775 #. type: Plain text
7776 #: build/C/man7/socket.7:250
7777 msgid ""
7778 "Set or get the broadcast flag.  When enabled, datagram sockets receive "
7779 "packets sent to a broadcast address and they are allowed to send packets to "
7780 "a broadcast address.  This option has no effect on stream-oriented sockets."
7781 msgstr ""
7782 "ブロードキャストフラグを設定・取得する。有効になっていると、 データグラムソ"
7783 "ケットはブロードキャストアドレスに送られたパケットを受信したり、 ブロードキャ"
7784 "ストアドレスにパケットを送信したりできるようになる。 ストリーム指向のソケット"
7785 "には何の効果もない。"
7786
7787 #. type: TP
7788 #: build/C/man7/socket.7:250
7789 #, no-wrap
7790 msgid "B<SO_BSDCOMPAT>"
7791 msgstr "B<SO_BSDCOMPAT>"
7792
7793 #. type: Plain text
7794 #: build/C/man7/socket.7:262
7795 msgid ""
7796 "Enable BSD bug-to-bug compatibility.  This is used by the UDP protocol "
7797 "module in Linux 2.0 and 2.2.  If enabled ICMP errors received for a UDP "
7798 "socket will not be passed to the user program.  In later kernel versions, "
7799 "support for this option has been phased out: Linux 2.4 silently ignores it, "
7800 "and Linux 2.6 generates a kernel warning (printk()) if a program uses this "
7801 "option.  Linux 2.0 also enabled BSD bug-to-bug compatibility options (random "
7802 "header changing, skipping of the broadcast flag) for raw sockets with this "
7803 "option, but that was removed in Linux 2.2."
7804 msgstr ""
7805 "BSD のバグに対して互換性を取るための機能を有効にする。 この機能は Linux 2.0 "
7806 "と 2.2 の UDP プロトコルモジュールで使用されている。 有効になっていると、 "
7807 "UDP ソケットで受信された ICMP エラーは ユーザプログラムに渡されない。 これ以"
7808 "降のバージョンのカーネルでは、このオプションのサポートは 段階的に廃止されてき"
7809 "た。 Linux 2.4 ではこのオプションは黙って無視され、 Linux 2.6 ではプログラム"
7810 "がこのオプションを使用すると (printk() を使って)  カーネルの警告メッセージが"
7811 "出力される。 Linux 2.0 では、このオプションを指定すると、 raw ソケットにおい"
7812 "ても BSD のバグ (ランダムヘッダ変更、 ブロードキャストフラグのスキップ)  に対"
7813 "する互換機能が有効になっていた。 しかし、こちらは Linux 2.2 で削除された。"
7814
7815 #. type: TP
7816 #: build/C/man7/socket.7:262
7817 #, no-wrap
7818 msgid "B<SO_DEBUG>"
7819 msgstr "B<SO_DEBUG>"
7820
7821 #. type: Plain text
7822 #: build/C/man7/socket.7:268
7823 msgid ""
7824 "Enable socket debugging.  Only allowed for processes with the "
7825 "B<CAP_NET_ADMIN> capability or an effective user ID of 0."
7826 msgstr ""
7827 "ソケットのデバッグ機能を有効にする。 B<CAP_NET_ADMIN> 権限を持つプロセスか、"
7828 "実効ユーザ ID が 0 のプロセスでしか 利用できない。"
7829
7830 #. type: TP
7831 #: build/C/man7/socket.7:268
7832 #, no-wrap
7833 msgid "B<SO_DOMAIN> (since Linux 2.6.32)"
7834 msgstr "B<SO_DOMAIN> (Linux 2.6.32 以降)"
7835
7836 #. type: Plain text
7837 #: build/C/man7/socket.7:276
7838 msgid ""
7839 "Retrieves the socket domain as an integer, returning a value such as "
7840 "B<AF_INET6>.  See B<socket>(2)  for details.  This socket option is read-"
7841 "only."
7842 msgstr ""
7843
7844 #. type: TP
7845 #: build/C/man7/socket.7:276
7846 #, no-wrap
7847 msgid "B<SO_ERROR>"
7848 msgstr "B<SO_ERROR>"
7849
7850 #. type: Plain text
7851 #: build/C/man7/socket.7:281
7852 msgid ""
7853 "Get and clear the pending socket error.  This socket option is read-only.  "
7854 "Expects an integer."
7855 msgstr ""
7856 "保留になっていたソケットエラーを取得してクリアする。\n"
7857 "このソケットオプションは読み込み専用である。整数値をとる。"
7858
7859 #. type: TP
7860 #: build/C/man7/socket.7:281
7861 #, no-wrap
7862 msgid "B<SO_DONTROUTE>"
7863 msgstr "B<SO_DONTROUTE>"
7864
7865 #. type: Plain text
7866 #: build/C/man7/socket.7:290
7867 msgid ""
7868 "Don't send via a gateway, only send to directly connected hosts.  The same "
7869 "effect can be achieved by setting the B<MSG_DONTROUTE> flag on a socket "
7870 "B<send>(2)  operation.  Expects an integer boolean flag."
7871 msgstr ""
7872 "ゲートウェイを経由せず、直接接続されているホストに送信する。 B<send>(2)  操作"
7873 "で B<MSG_DONTROUTE> フラグをセットした場合も同じ効果が得られる。 ブール整数の"
7874 "フラグを取る。"
7875
7876 #. type: TP
7877 #: build/C/man7/socket.7:290
7878 #, no-wrap
7879 msgid "B<SO_KEEPALIVE>"
7880 msgstr "B<SO_KEEPALIVE>"
7881
7882 #. type: Plain text
7883 #: build/C/man7/socket.7:294
7884 msgid ""
7885 "Enable sending of keep-alive messages on connection-oriented sockets.  "
7886 "Expects an integer boolean flag."
7887 msgstr ""
7888 "接続志向のソケットに対する keep-alive メッセージの送信を有効にする。 ブール値"
7889 "の整数フラグをとる。"
7890
7891 #. type: TP
7892 #: build/C/man7/socket.7:294
7893 #, no-wrap
7894 msgid "B<SO_LINGER>"
7895 msgstr "B<SO_LINGER>"
7896
7897 #. type: Plain text
7898 #: build/C/man7/socket.7:302
7899 msgid ""
7900 "Sets or gets the B<SO_LINGER> option.  The argument is a I<linger> structure."
7901 msgstr ""
7902 "B<SO_LINGER> オプションを取得・設定する。引き数には I<linger> 構造体を取る。"
7903
7904 #. type: Plain text
7905 #: build/C/man7/socket.7:309
7906 #, no-wrap
7907 msgid ""
7908 "struct linger {\n"
7909 "    int l_onoff;    /* linger active */\n"
7910 "    int l_linger;   /* how many seconds to linger for */\n"
7911 "};\n"
7912 msgstr ""
7913 "struct linger {\n"
7914 "    int l_onoff;    /* linger active */\n"
7915 "    int l_linger;   /* how many seconds to linger for */\n"
7916 "};\n"
7917
7918 #. type: Plain text
7919 #: build/C/man7/socket.7:323
7920 msgid ""
7921 "When enabled, a B<close>(2)  or B<shutdown>(2)  will not return until all "
7922 "queued messages for the socket have been successfully sent or the linger "
7923 "timeout has been reached.  Otherwise, the call returns immediately and the "
7924 "closing is done in the background.  When the socket is closed as part of "
7925 "B<exit>(2), it always lingers in the background."
7926 msgstr ""
7927 "有効になっていると、 B<close>(2)  や B<shutdown>(2)  は、そのソケットにキュー"
7928 "イングされたメッセージがすべて送信完了するか、 linger (居残り) タイムアウトに"
7929 "なるまで返らない。無効になっていると、 これらのコールはただちに戻り、クローズ"
7930 "動作はバックグラウンドで行われる。 ソケットのクローズを B<exit>(2)  の一部と"
7931 "して行った場合には、残っているソケットの クローズ動作は必ずバックグラウンドに"
7932 "送られる。"
7933
7934 #. type: TP
7935 #: build/C/man7/socket.7:323
7936 #, no-wrap
7937 msgid "B<SO_OOBINLINE>"
7938 msgstr "B<SO_OOBINLINE>"
7939
7940 #.  don't document it because it can do too much harm.
7941 #. .B SO_NO_CHECK
7942 #. type: Plain text
7943 #: build/C/man7/socket.7:332
7944 msgid ""
7945 "If this option is enabled, out-of-band data is directly placed into the "
7946 "receive data stream.  Otherwise out-of-band data is only passed when the "
7947 "B<MSG_OOB> flag is set during receiving."
7948 msgstr ""
7949 "このオプションを有効にすると、帯域外データ (out-of-band data) は 受信データス"
7950 "トリーム中に置かれる。有効にしなければ、 帯域外データは受信時に B<MSG_OOB> フ"
7951 "ラグがセットされている場合に限って渡される。"
7952
7953 #. type: TP
7954 #: build/C/man7/socket.7:332
7955 #, no-wrap
7956 msgid "B<SO_PASSCRED>"
7957 msgstr "B<SO_PASSCRED>"
7958
7959 #.  FIXME Document SO_PASSSEC, added in 2.6.18; there is some info
7960 #.  in the 2.6.18 ChangeLog
7961 #. type: Plain text
7962 #: build/C/man7/socket.7:341
7963 msgid ""
7964 "Enable or disable the receiving of the B<SCM_CREDENTIALS> control message.  "
7965 "For more information see B<unix>(7)."
7966 msgstr ""
7967 "B<SCM_CREDENTIALS> 制御メッセージの受信を有効/無効にする。詳細は B<unix>(7)  "
7968 "を参照のこと。"
7969
7970 #. type: TP
7971 #: build/C/man7/socket.7:341
7972 #, no-wrap
7973 msgid "B<SO_PEERCRED>"
7974 msgstr "B<SO_PEERCRED>"
7975
7976 #. type: Plain text
7977 #: build/C/man7/socket.7:361
7978 msgid ""
7979 "Return the credentials of the foreign process connected to this socket.  "
7980 "This is only possible for connected B<AF_UNIX> stream sockets and B<AF_UNIX> "
7981 "stream and datagram socket pairs created using B<socketpair>(2); see B<unix>"
7982 "(7).  The returned credentials are those that were in effect at the time of "
7983 "the call to B<connect>(2)  or B<socketpair>(2).  Argument is a I<ucred> "
7984 "structure.  This socket option is read-only."
7985 msgstr ""
7986 "このソケットに接続してきた外部プロセスの信任状 (credential) を返す。\n"
7987 "このソケットオプションが利用できるのは、接続された B<AF_UNIX> ストリームソ"
7988 "ケット間、\n"
7989 "および B<socketpair>(2) を使って作成された B<AF_UNIX> のストリームソケット"
7990 "と\n"
7991 "データグラムソケットのペアだけである。\n"
7992 "B<unix>(7)  を参照のこと。\n"
7993 "B<connect>(2) や B<socketpair>(2) が呼ばれた時に有効であった信任状が返され"
7994 "る。\n"
7995 "引き数は I<ucred> 構造体である。\n"
7996 "このソケットオプションは読み込み専用である。"
7997
7998 #. type: TP
7999 #: build/C/man7/socket.7:361
8000 #, no-wrap
8001 msgid "B<SO_PRIORITY>"
8002 msgstr "B<SO_PRIORITY>"
8003
8004 #. type: Plain text
8005 #: build/C/man7/socket.7:374
8006 msgid ""
8007 "Set the protocol-defined priority for all packets to be sent on this "
8008 "socket.  Linux uses this value to order the networking queues: packets with "
8009 "a higher priority may be processed first depending on the selected device "
8010 "queueing discipline.  For B<ip>(7), this also sets the IP type-of-service "
8011 "(TOS) field for outgoing packets.  Setting a priority outside the range 0 to "
8012 "6 requires the B<CAP_NET_ADMIN> capability."
8013 msgstr ""
8014 "プロトコルで定義された優先度を、このソケットから 送信される全てのパケットに"
8015 "セットする。 Linux はネットワークキュー内部の 整列にこの値を用いる。高い優先"
8016 "度を持っているパケットは先に処理される。 ただしそのデバイスのキュー処理のやり"
8017 "方に依存する。 B<ip>(7)  では、外向けパケットの IP type-of-service (TOS) "
8018 "フィールドにもこの値が設定される。 0 から 6 以外の優先度をセットするには "
8019 "B<CAP_NET_ADMIN> ケーパビリティが必要である。"
8020
8021 #. type: TP
8022 #: build/C/man7/socket.7:374
8023 #, no-wrap
8024 msgid "B<SO_PROTOCOL> (since Linux 2.6.32)"
8025 msgstr "B<SO_PROTOCOL> (Linux 2.6.32 以降)"
8026
8027 #. type: Plain text
8028 #: build/C/man7/socket.7:382
8029 msgid ""
8030 "Retrieves the socket protocol as an integer, returning a value such as "
8031 "B<IPPROTO_SCTP>.  See B<socket>(2)  for details.  This socket option is read-"
8032 "only."
8033 msgstr ""
8034
8035 #. type: TP
8036 #: build/C/man7/socket.7:382
8037 #, no-wrap
8038 msgid "B<SO_RCVBUF>"
8039 msgstr "B<SO_RCVBUF>"
8040
8041 #.  Most (all?) other implementations do not do this -- MTK, Dec 05
8042 #. type: Plain text
8043 #: build/C/man7/socket.7:397
8044 msgid ""
8045 "Sets or gets the maximum socket receive buffer in bytes.  The kernel doubles "
8046 "this value (to allow space for bookkeeping overhead)  when it is set using "
8047 "B<setsockopt>(2), and this doubled value is returned by B<getsockopt>(2).  "
8048 "The default value is set by the I</proc/sys/net/core/rmem_default> file, and "
8049 "the maximum allowed value is set by the I</proc/sys/net/core/rmem_max> "
8050 "file.  The minimum (doubled) value for this option is 256."
8051 msgstr ""
8052 "ソケットの受信バッファの最大サイズを設定・取得する (バイト単位)。 "
8053 "B<setsockopt>(2)  を使って値が設定されたときに (管理オーバヘッド用の領域を確"
8054 "保するために)  カーネルはこの値を 2倍し、 B<getsockopt>(2)  はこの 2倍された"
8055 "値を返す。 デフォルトの値は I</proc/sys/net/core/rmem_default> ファイルで設定"
8056 "され、許容される最大の値は I</proc/sys/net/core/rmem_max> ファイルで設定され"
8057 "る。 このオプションの最小値は (2倍した値で) 256 である。"
8058
8059 #. type: TP
8060 #: build/C/man7/socket.7:397
8061 #, no-wrap
8062 msgid "B<SO_RCVBUFFORCE> (since Linux 2.6.14)"
8063 msgstr "B<SO_RCVBUFFORCE> (Linux 2.6.14 以降)"
8064
8065 #. type: Plain text
8066 #: build/C/man7/socket.7:406
8067 msgid ""
8068 "Using this socket option, a privileged (B<CAP_NET_ADMIN>)  process can "
8069 "perform the same task as B<SO_RCVBUF>, but the I<rmem_max> limit can be "
8070 "overridden."
8071 msgstr ""
8072 "このソケットオプションを使うと、特権プロセス (B<CAP_NET_ADMIN> を持つプロセ"
8073 "ス) は B<SO_RCVBUF> と同じことを実行できる。 ただし、上限 I<rmem_max> を上書"
8074 "きすることができる。"
8075
8076 #. type: TP
8077 #: build/C/man7/socket.7:406
8078 #, no-wrap
8079 msgid "B<SO_RCVLOWAT> and B<SO_SNDLOWAT>"
8080 msgstr "B<SO_RCVLOWAT> と B<SO_SNDLOWAT>"
8081
8082 #.  See http://marc.theaimsgroup.com/?l=linux-kernel&m=111049368106984&w=2
8083 #.  Tested on kernel 2.6.14 -- mtk, 30 Nov 05
8084 #. type: Plain text
8085 #: build/C/man7/socket.7:435
8086 msgid ""
8087 "Specify the minimum number of bytes in the buffer until the socket layer "
8088 "will pass the data to the protocol (B<SO_SNDLOWAT>)  or the user on "
8089 "receiving (B<SO_RCVLOWAT>).  These two values are initialized to 1.  "
8090 "B<SO_SNDLOWAT> is not changeable on Linux (B<setsockopt>(2)  fails with the "
8091 "error B<ENOPROTOOPT>).  B<SO_RCVLOWAT> is changeable only since Linux 2.4.  "
8092 "The B<select>(2)  and B<poll>(2)  system calls currently do not respect the "
8093 "B<SO_RCVLOWAT> setting on Linux, and mark a socket readable when even a "
8094 "single byte of data is available.  A subsequent read from the socket will "
8095 "block until B<SO_RCVLOWAT> bytes are available."
8096 msgstr ""
8097 "バッファ中に溜めることのできるデータの最小値を指定する。 このサイズを越える"
8098 "と、ソケット層はそのデータをプロトコルに渡し (B<SO_SNDLOWAT>)、 受信時には"
8099 "ユーザに渡す (B<SO_RCVLOWAT>)。 これら二つの値は 1 に初期化される。 "
8100 "B<SO_SNDLOWAT> は Linux では変更できない (B<setsockopt>(2)  は "
8101 "B<ENOPROTOOPT> エラーで失敗する)。 B<SO_RCVLOWAT> は Linux 2.4 以降でのみ変更"
8102 "可能である。 現状、Linux ではシステムコール B<select>(2)  と B<poll>(2)  は "
8103 "B<SO_RCVLOWAT> の設定を考慮に入れずに動作し、 データが1バイト利用可能になった"
8104 "だけでも、 ソケットは読み出し可能とのマークをつける。 一方、それに続けて行う"
8105 "ソケットからの read は B<SO_RCVLOWAT> バイトのデータが利用可能になるまで停止"
8106 "してしまう。"
8107
8108 #. type: TP
8109 #: build/C/man7/socket.7:435
8110 #, no-wrap
8111 msgid "B<SO_RCVTIMEO> and B<SO_SNDTIMEO>"
8112 msgstr "B<SO_RCVTIMEO> と B<SO_SNDTIMEO>"
8113
8114 #.  Not implemented in 2.0.
8115 #.  Implemented in 2.1.11 for getsockopt: always return a zero struct.
8116 #.  Implemented in 2.3.41 for setsockopt, and actually used.
8117 #.  in fact to EAGAIN
8118 #. type: Plain text
8119 #: build/C/man7/socket.7:466
8120 msgid ""
8121 "Specify the receiving or sending timeouts until reporting an error.  The "
8122 "argument is a I<struct timeval>.  If an input or output function blocks for "
8123 "this period of time, and data has been sent or received, the return value of "
8124 "that function will be the amount of data transferred; if no data has been "
8125 "transferred and the timeout has been reached then -1 is returned with "
8126 "I<errno> set to B<EAGAIN> or B<EWOULDBLOCK> just as if the socket was "
8127 "specified to be nonblocking.  If the timeout is set to zero (the default)  "
8128 "then the operation will never timeout.  Timeouts only have effect for system "
8129 "calls that perform socket I/O (e.g., B<read>(2), B<recvmsg>(2), B<send>(2), "
8130 "B<sendmsg>(2)); timeouts have no effect for B<select>(2), B<poll>(2), "
8131 "B<epoll_wait>(2), etc."
8132 msgstr ""
8133 "送信・受信のタイムアウトを指定する。これを越えるとエラーを報告する。 引き数"
8134 "は I<struct timeval> である。 入出力関数がタイムアウト時間の間ブロックされ、"
8135 "かつデータの送信または 受信が行われていた場合は、転送されたデータ量が関数の返"
8136 "り値となる。 何もデータが転送されずにタイムアウトに達した場合は、 -1 を返"
8137 "し、 I<errno> に B<EAGAIN> か B<EWOULDBLOCK> を設定され、 あたかもソケットに"
8138 "非ブロッキングが指定されたように見える。 タイムアウト値に (デフォルト値であ"
8139 "る) 0 に設定すると、 操作は決してタイムアウトしなくなる。 タイムアウトが影響"
8140 "を及ぼすのは、 ソケット I/O を実行するシステムコールだけ (例えば B<read>(2), "
8141 "B<recvmsg>(2), B<send>(2), B<sendmsg>(2))  である。 B<select>(2), B<poll>"
8142 "(2), B<epoll_wait>(2)  などにはタイムアウトは影響を及ぼさない。"
8143
8144 #. type: TP
8145 #: build/C/man7/socket.7:466
8146 #, no-wrap
8147 msgid "B<SO_REUSEADDR>"
8148 msgstr "B<SO_REUSEADDR>"
8149
8150 #. type: Plain text
8151 #: build/C/man7/socket.7:481
8152 msgid ""
8153 "Indicates that the rules used in validating addresses supplied in a B<bind>"
8154 "(2)  call should allow reuse of local addresses.  For B<AF_INET> sockets "
8155 "this means that a socket may bind, except when there is an active listening "
8156 "socket bound to the address.  When the listening socket is bound to "
8157 "B<INADDR_ANY> with a specific port then it is not possible to bind to this "
8158 "port for any local address.  Argument is an integer boolean flag."
8159 msgstr ""
8160 "B<bind>(2)  コールに与えられたアドレスが正しいかを判断するルールで、 ローカル"
8161 "アドレスの再利用を可能にする。 つまり B<AF_INET> ソケットなら、そのアドレスに"
8162 "バインドされたアクティブな listen 状態のソケットが存在しない限り、バインドが"
8163 "行える。 listen 状態のソケットがアドレス B<INADDR_ANY> で特定のポートにバイン"
8164 "ドされている場合には、 このポートに対しては、どんなローカルアドレスでもバイン"
8165 "ドできない。 引き数はブール整数のフラグである。"
8166
8167 #. type: TP
8168 #: build/C/man7/socket.7:481
8169 #, no-wrap
8170 msgid "B<SO_SNDBUF>"
8171 msgstr "B<SO_SNDBUF>"
8172
8173 #.  Most (all?) other implementations do not do this -- MTK, Dec 05
8174 #. type: Plain text
8175 #: build/C/man7/socket.7:496
8176 msgid ""
8177 "Sets or gets the maximum socket send buffer in bytes.  The kernel doubles "
8178 "this value (to allow space for bookkeeping overhead)  when it is set using "
8179 "B<setsockopt>(2), and this doubled value is returned by B<getsockopt>(2).  "
8180 "The default value is set by the I</proc/sys/net/core/wmem_default> file and "
8181 "the maximum allowed value is set by the I</proc/sys/net/core/wmem_max> "
8182 "file.  The minimum (doubled) value for this option is 2048."
8183 msgstr ""
8184 "ソケットの送信バッファの最大サイズを設定・取得する (バイト単位)。 "
8185 "B<setsockopt>(2)  を使って値が設定されたときに (管理オーバヘッド用の領域を確"
8186 "保するために)  カーネルはこの値を 2倍し、 B<getsockopt>(2)  はこの 2倍された"
8187 "値を返す。 デフォルトの値は I</proc/sys/net/core/wmem_default> ファイルで設定"
8188 "され、許容される最大の値は I</proc/sys/net/core/wmem_max> ファイルで設定され"
8189 "る。 このオプションの最小値は (2倍した値で) 2048 である。"
8190
8191 #. type: TP
8192 #: build/C/man7/socket.7:496
8193 #, no-wrap
8194 msgid "B<SO_SNDBUFFORCE> (since Linux 2.6.14)"
8195 msgstr "B<SO_SNDBUFFORCE> (Linux 2.6.14 以降)"
8196
8197 #. type: Plain text
8198 #: build/C/man7/socket.7:505
8199 msgid ""
8200 "Using this socket option, a privileged (B<CAP_NET_ADMIN>)  process can "
8201 "perform the same task as B<SO_SNDBUF>, but the I<wmem_max> limit can be "
8202 "overridden."
8203 msgstr ""
8204 "このソケットオプションを使うと、特権プロセス (B<CAP_NET_ADMIN> を持つプロセ"
8205 "ス) は B<SO_SNDBUF> と同じことを実行できる。 ただし、上限 I<wmem_max> を上書"
8206 "きすることができる。"
8207
8208 #. type: TP
8209 #: build/C/man7/socket.7:505
8210 #, no-wrap
8211 msgid "B<SO_TIMESTAMP>"
8212 msgstr "B<SO_TIMESTAMP>"
8213
8214 #. type: Plain text
8215 #: build/C/man7/socket.7:521
8216 msgid ""
8217 "Enable or disable the receiving of the B<SO_TIMESTAMP> control message.  The "
8218 "timestamp control message is sent with level B<SOL_SOCKET> and the "
8219 "I<cmsg_data> field is a I<struct timeval> indicating the reception time of "
8220 "the last packet passed to the user in this call.  See B<cmsg>(3)  for "
8221 "details on control messages."
8222 msgstr ""
8223 "B<SO_TIMESTAMP> 制御メッセージの受信を有効/無効にする。 タイムスタンプ制御"
8224 "メッセージはレベル B<SOL_SOCKET> で送信され、 I<cmsg_data> フィールドはこのシ"
8225 "ステムコールでユーザに渡した 最後のパケットの受信時刻を示す I<struct "
8226 "timeval> である。 制御メッセージの詳細については B<cmsg>(3)  を参照。"
8227
8228 #. type: TP
8229 #: build/C/man7/socket.7:521
8230 #, no-wrap
8231 msgid "B<SO_TYPE>"
8232 msgstr "B<SO_TYPE>"
8233
8234 #. type: Plain text
8235 #: build/C/man7/socket.7:526
8236 msgid ""
8237 "Gets the socket type as an integer (e.g., B<SOCK_STREAM>).  This socket "
8238 "option is read-only."
8239 msgstr ""
8240 "ソケットのタイプを整数で取得する (例: B<SOCK_STREAM>)。\n"
8241 "このソケットオプションは読み出し専用である。"
8242
8243 #. type: SS
8244 #: build/C/man7/socket.7:526
8245 #, no-wrap
8246 msgid "Signals"
8247 msgstr "シグナル"
8248
8249 #. type: Plain text
8250 #: build/C/man7/socket.7:537
8251 msgid ""
8252 "When writing onto a connection-oriented socket that has been shut down (by "
8253 "the local or the remote end)  B<SIGPIPE> is sent to the writing process and "
8254 "B<EPIPE> is returned.  The signal is not sent when the write call specified "
8255 "the B<MSG_NOSIGNAL> flag."
8256 msgstr ""
8257 "(ローカルもしくはリモート側で) 切断された 接続指向 (connection-oriented) のソ"
8258 "ケットに対して 書き込みを行うと、その書き込みを行ったプロセスに B<SIGPIPE> が"
8259 "送られ、 B<EPIPE> が返される。 write 呼び出しに B<MSG_NOSIGNAL> フラグを指定"
8260 "していた場合はシグナルは送られない。"
8261
8262 #. type: Plain text
8263 #: build/C/man7/socket.7:562
8264 msgid ""
8265 "When requested with the B<FIOSETOWN> B<fcntl>(2)  or B<SIOCSPGRP> B<ioctl>"
8266 "(2), B<SIGIO> is sent when an I/O event occurs.  It is possible to use "
8267 "B<poll>(2)  or B<select>(2)  in the signal handler to find out which socket "
8268 "the event occurred on.  An alternative (in Linux 2.2) is to set a real-time "
8269 "signal using the B<F_SETSIG> B<fcntl>(2); the handler of the real time "
8270 "signal will be called with the file descriptor in the I<si_fd> field of its "
8271 "I<siginfo_t>.  See B<fcntl>(2)  for more information."
8272 msgstr ""
8273 "B<FIOSETOWN> B<fcntl>(2)  や B<SIOCSPGRP> B<ioctl>(2)  をプロセスまたはプロセ"
8274 "スグループに指定しておくと、 I/O イベントが起きたときに B<SIGIO> が送られ"
8275 "る。 B<poll>(2)  や B<select>(2)  をシグナルハンドラ内で用いれば、どのソケッ"
8276 "トでイベントが起こったかを 知ることができる。 (Linux 2.2 における) 別の方法と"
8277 "しては、 B<F_SETSIG> B<fcntl>(2)  を用いてリアルタイムシグナルを設定するやり"
8278 "方もある。 リアルタイムシグナルのハンドラは、 I<siginfo_t> の I<si_fd> フィー"
8279 "ルドにファイルディスクリプタが入った状態で呼び出される。 詳細は B<fcntl>(2)  "
8280 "を参照のこと。"
8281
8282 #.  .SS Ancillary Messages
8283 #. type: Plain text
8284 #: build/C/man7/socket.7:570
8285 msgid ""
8286 "Under some circumstances (e.g., multiple processes accessing a single "
8287 "socket), the condition that caused the B<SIGIO> may have already disappeared "
8288 "when the process reacts to the signal.  If this happens, the process should "
8289 "wait again because Linux will resend the signal later."
8290 msgstr ""
8291 "状況によっては (例えば複数のプロセスが一つのソケットにアクセスしているな"
8292 "ど)、 B<SIGIO> の原因となった状態は、プロセスがそのシグナルへの対応を行ったと"
8293 "きには 消えてしまっているかもしれない。 この場合は、プロセスは再び待つように"
8294 "すべきである。 Linux は同じシグナルを後で再送するからである。"
8295
8296 #. type: SS
8297 #: build/C/man7/socket.7:570
8298 #, no-wrap
8299 msgid "/proc interfaces"
8300 msgstr "/proc インタフェース"
8301
8302 #. type: Plain text
8303 #: build/C/man7/socket.7:574
8304 msgid ""
8305 "The core socket networking parameters can be accessed via files in the "
8306 "directory I</proc/sys/net/core/>."
8307 msgstr ""
8308 "core のソケットのネットワーキングパラメータには、 I</proc/sys/net/core/> ディ"
8309 "レクトリ内のファイルを通してアクセスできる。"
8310
8311 #. type: TP
8312 #: build/C/man7/socket.7:574
8313 #, no-wrap
8314 msgid "I<rmem_default>"
8315 msgstr "I<rmem_default>"
8316
8317 #. type: Plain text
8318 #: build/C/man7/socket.7:577
8319 msgid "contains the default setting in bytes of the socket receive buffer."
8320 msgstr "ソケットの受信バッファサイズのデフォルト値 (バイト単位)。"
8321
8322 #. type: TP
8323 #: build/C/man7/socket.7:577
8324 #, no-wrap
8325 msgid "I<rmem_max>"
8326 msgstr "I<rmem_max>"
8327
8328 #. type: Plain text
8329 #: build/C/man7/socket.7:583
8330 msgid ""
8331 "contains the maximum socket receive buffer size in bytes which a user may "
8332 "set by using the B<SO_RCVBUF> socket option."
8333 msgstr ""
8334 "B<SO_RCVBUF> ソケットオプションを用いてユーザが設定できる ソケットの受信バッ"
8335 "ファサイズの最大値 (バイト単位)。"
8336
8337 #. type: TP
8338 #: build/C/man7/socket.7:583
8339 #, no-wrap
8340 msgid "I<wmem_default>"
8341 msgstr "I<wmem_default>"
8342
8343 #. type: Plain text
8344 #: build/C/man7/socket.7:586
8345 msgid "contains the default setting in bytes of the socket send buffer."
8346 msgstr "ソケットの送信バッファサイズのデフォルト値 (バイト単位)。"
8347
8348 #. type: TP
8349 #: build/C/man7/socket.7:586
8350 #, no-wrap
8351 msgid "I<wmem_max>"
8352 msgstr "I<wmem_max>"
8353
8354 #. type: Plain text
8355 #: build/C/man7/socket.7:592
8356 msgid ""
8357 "contains the maximum socket send buffer size in bytes which a user may set "
8358 "by using the B<SO_SNDBUF> socket option."
8359 msgstr ""
8360 "B<SO_SNDBUF> ソケットオプションを用いてユーザが設定できる ソケットの送信バッ"
8361 "ファサイズの最大値 (バイト単位)。"
8362
8363 #. type: TP
8364 #: build/C/man7/socket.7:592
8365 #, no-wrap
8366 msgid "I<message_cost> and I<message_burst>"
8367 msgstr "I<message_cost> と I<message_burst>"
8368
8369 #. type: Plain text
8370 #: build/C/man7/socket.7:596
8371 msgid ""
8372 "configure the token bucket filter used to load limit warning messages caused "
8373 "by external network events."
8374 msgstr ""
8375 "トークン・バケット・フィルターを設定する。 これは外部のネットワークイベントに"
8376 "よって引き起こされた 負荷限界の警告メッセージに用いられる。"
8377
8378 #. type: TP
8379 #: build/C/man7/socket.7:596
8380 #, no-wrap
8381 msgid "I<netdev_max_backlog>"
8382 msgstr "I<netdev_max_backlog>"
8383
8384 #. type: Plain text
8385 #: build/C/man7/socket.7:599
8386 msgid "Maximum number of packets in the global input queue."
8387 msgstr "グローバルな入力キューにおける最大のパケット数。"
8388
8389 #. type: TP
8390 #: build/C/man7/socket.7:599
8391 #, no-wrap
8392 msgid "I<optmem_max>"
8393 msgstr "I<optmem_max>"
8394
8395 #.  netdev_fastroute is not documented because it is experimental
8396 #. type: Plain text
8397 #: build/C/man7/socket.7:604
8398 msgid ""
8399 "Maximum length of ancillary data and user control data like the iovecs per "
8400 "socket."
8401 msgstr ""
8402 "ソケットあたりの、補助データ (ancillary data) とユーザ制御データ (iovecs のよ"
8403 "うなもの) との和の最大長。"
8404
8405 #. type: SS
8406 #: build/C/man7/socket.7:604
8407 #, no-wrap
8408 msgid "Ioctls"
8409 msgstr "ioctl"
8410
8411 #. type: Plain text
8412 #: build/C/man7/socket.7:607
8413 msgid "These operations can be accessed using B<ioctl>(2):"
8414 msgstr "以下に示す操作には B<ioctl>(2)  を用いてアクセスできる。"
8415
8416 #. type: Plain text
8417 #: build/C/man7/socket.7:611
8418 #, no-wrap
8419 msgid "I<error>B< = ioctl(>I<ip_socket>B<, >I<ioctl_type>B<, >I<&value_result>B<);>\n"
8420 msgstr "I<error>B< = ioctl(>I<ip_socket>B<, >I<ioctl_type>B<, >I<&value_result>B<);>\n"
8421
8422 #. type: TP
8423 #: build/C/man7/socket.7:613
8424 #, no-wrap
8425 msgid "B<SIOCGSTAMP>"
8426 msgstr "B<SIOCGSTAMP>"
8427
8428 #. type: Plain text
8429 #: build/C/man7/socket.7:637
8430 msgid ""
8431 "Return a I<struct timeval> with the receive timestamp of the last packet "
8432 "passed to the user.  This is useful for accurate round trip time "
8433 "measurements.  See B<setitimer>(2)  for a description of I<struct timeval>.  "
8434 "This ioctl should only be used if the socket option B<SO_TIMESTAMP> is not "
8435 "set on the socket.  Otherwise, it returns the timestamp of the last packet "
8436 "that was received while B<SO_TIMESTAMP> was not set, or it fails if no such "
8437 "packet has been received, (i.e., B<ioctl>(2)  returns -1 with I<errno> set "
8438 "to B<ENOENT>)."
8439 msgstr ""
8440 "最後にユーザに渡されたパケットの受信タイムスタンプを I<struct timeval> に入れ"
8441 "て返す。 これは round trip 時間を正確に測りたいときに便利である。 I<struct "
8442 "timeval> の説明は B<setitimer>(2)  を見てほしい。 この ioctl は、ソケットオプ"
8443 "ション B<SO_TIMESTAMP> がソケットにセットされていない場合にのみ使用すべきであ"
8444 "る。 さもなければ、この ioctl は B<SO_TIMESTAMP> がセットされていなかった間に"
8445 "受信した最後のパケットの時刻を返すか、 そのようなパケットを受信していない場合"
8446 "には失敗する (つまり、 B<ioctl>(2)  は -1 を返し、 I<errno> に B<ENOENT> を"
8447 "セットする)。"
8448
8449 #. type: TP
8450 #: build/C/man7/socket.7:637
8451 #, no-wrap
8452 msgid "B<SIOCSPGRP>"
8453 msgstr "B<SIOCSPGRP>"
8454
8455 #. type: Plain text
8456 #: build/C/man7/socket.7:656
8457 msgid ""
8458 "Set the process or process group to send B<SIGIO> or B<SIGURG> signals to "
8459 "when an asynchronous I/O operation has finished or urgent data is "
8460 "available.  The argument is a pointer to a I<pid_t>.  If the argument is "
8461 "positive, send the signals to that process.  If the argument is negative, "
8462 "send the signals to the process group with the ID of the absolute value of "
8463 "the argument.  The process may only choose itself or its own process group "
8464 "to receive signals unless it has the B<CAP_KILL> capability or an effective "
8465 "UID of 0."
8466 msgstr ""
8467 "非同期 I/O 操作の終了時や緊急データの受信時に B<SIGIO> や B<SIGURG> シグナル"
8468 "群を送るプロセスやプロセスグループを設定する。 引き数は I<pid_t> へのポインタ"
8469 "である。 引き数が正だと、そのプロセスにシグナルが送られる。負だと、 引き数の"
8470 "絶対値を ID に持つプロセスグループにシグナルが送られる。 シグナル受信先には、"
8471 "自分自身のプロセス / 自分の所属するプロセスグループ しか指定できない。但し、 "
8472 "B<CAP_KILL> ケーパビリティを持っている場合、及び実効ユーザ ID が 0 のプロセス"
8473 "の場合は この限りではない。"
8474
8475 #. type: TP
8476 #: build/C/man7/socket.7:656
8477 #, no-wrap
8478 msgid "B<FIOASYNC>"
8479 msgstr "B<FIOASYNC>"
8480
8481 #. type: Plain text
8482 #: build/C/man7/socket.7:666
8483 msgid ""
8484 "Change the B<O_ASYNC> flag to enable or disable asynchronous I/O mode of the "
8485 "socket.  Asynchronous I/O mode means that the B<SIGIO> signal or the signal "
8486 "set with B<F_SETSIG> is raised when a new I/O event occurs."
8487 msgstr ""
8488 "B<O_ASYNC> フラグを変更し、ソケットの非同期 (asynchronous) I/O モードを 有効/"
8489 "無効にする。非同期 I/O モードでは、 新しい I/O イベントが起きたときに、 "
8490 "B<SIGIO> シグナルや B<F_SETSIG> で設定されたシグナル・セットが発行される。"
8491
8492 #. type: Plain text
8493 #: build/C/man7/socket.7:674
8494 msgid ""
8495 "Argument is an integer boolean flag.  (This operation is synonymous with the "
8496 "use of B<fcntl>(2)  to set the B<O_ASYNC> flag.)"
8497 msgstr ""
8498 "引き数はブール整数のフラグである。 (この操作は B<fcntl>(2)  を使って "
8499 "B<O_ASYNC> フラグをセットするのと同じ意味である。)"
8500
8501 #. type: TP
8502 #: build/C/man7/socket.7:674
8503 #, no-wrap
8504 msgid "B<SIOCGPGRP>"
8505 msgstr "B<SIOCGPGRP>"
8506
8507 #. type: Plain text
8508 #: build/C/man7/socket.7:683
8509 msgid ""
8510 "Get the current process or process group that receives B<SIGIO> or B<SIGURG> "
8511 "signals, or 0 when none is set."
8512 msgstr ""
8513 "B<SIGIO> や B<SIGURG> を受信したカレントプロセス・プロセスグループを取得す"
8514 "る。 ない場合は 0 が返る。"
8515
8516 #. type: Plain text
8517 #: build/C/man7/socket.7:687
8518 msgid "Valid B<fcntl>(2)  operations:"
8519 msgstr "有効な B<fcntl>(2)  操作:"
8520
8521 #. type: TP
8522 #: build/C/man7/socket.7:687
8523 #, no-wrap
8524 msgid "B<FIOGETOWN>"
8525 msgstr "B<FIOGETOWN>"
8526
8527 #. type: Plain text
8528 #: build/C/man7/socket.7:692
8529 msgid "The same as the B<SIOCGPGRP> B<ioctl>(2)."
8530 msgstr "B<SIOCGPGRP> B<ioctl>(2)  と同じ。"
8531
8532 #. type: TP
8533 #: build/C/man7/socket.7:692
8534 #, no-wrap
8535 msgid "B<FIOSETOWN>"
8536 msgstr "B<FIOSETOWN>"
8537
8538 #. type: Plain text
8539 #: build/C/man7/socket.7:697
8540 msgid "The same as the B<SIOCSPGRP> B<ioctl>(2)."
8541 msgstr "B<SIOCSPGRP> B<ioctl>(2)  と同じ。"
8542
8543 #. type: Plain text
8544 #: build/C/man7/socket.7:711
8545 msgid ""
8546 "B<SO_BINDTODEVICE> was introduced in Linux 2.0.30.  B<SO_PASSCRED> is new in "
8547 "Linux 2.2.  The I</proc> interfaces was introduced in Linux 2.2.  "
8548 "B<SO_RCVTIMEO> and B<SO_SNDTIMEO> are supported since Linux 2.3.41.  "
8549 "Earlier, timeouts were fixed to a protocol-specific setting, and could not "
8550 "be read or written."
8551 msgstr ""
8552 "B<SO_BINDTODEVICE> は Linux 2.0.30 で導入された。 B<SO_PASSCRED> は Linux "
8553 "2.2 で登場した。 I</proc> インタフェースは Linux 2.2 で導入された。 "
8554 "B<SO_RCVTIMEO> と B<SO_SNDTIMEO> は Linux 2.3.41 以降でサポートされている。 "
8555 "それ以前は、タイムアウトはプロトコル固有の固定の設定値で、 読み書きをすること"
8556 "はできなかった。"
8557
8558 #. type: Plain text
8559 #: build/C/man7/socket.7:716
8560 msgid ""
8561 "Linux assumes that half of the send/receive buffer is used for internal "
8562 "kernel structures; thus the values in the corresponding I</proc> files are "
8563 "twice what can be observed on the wire."
8564 msgstr ""
8565 "Linux は、送受信バッファの半分を内部のカーネル構造体で用いると仮定している。 "
8566 "したがって、対応する I</proc> ファイルはネットワーク回線上での大きさの 2 倍に"
8567 "なる。"
8568
8569 #. type: Plain text
8570 #: build/C/man7/socket.7:729
8571 msgid ""
8572 "Linux will only allow port reuse with the B<SO_REUSEADDR> option when this "
8573 "option was set both in the previous program that performed a B<bind>(2)  to "
8574 "the port and in the program that wants to reuse the port.  This differs from "
8575 "some implementations (e.g., FreeBSD)  where only the later program needs to "
8576 "set the B<SO_REUSEADDR> option.  Typically this difference is invisible, "
8577 "since, for example, a server program is designed to always set this option."
8578 msgstr ""
8579 "Linux では、 B<SO_REUSEADDR> オプションでポートの再利用が許可されるのは、 そ"
8580 "のポートに対して B<bind>(2)  を前に実行したプログラムとそのポートを再利用 し"
8581 "ようとするプログラムの両方で B<SO_REUSEADDR> がセットされた場合のみである。 "
8582 "この動作は (FreeBSD などの) いくつかの実装とは異なる。これらでは、 後でポート"
8583 "を再利用しようとするプログラムで B<SO_REUSEADDR> オプションをセットするだけで"
8584 "よい。 たいていはこの違いは見えない。なぜなら、例えばサーバプログラムは 常に"
8585 "このオプションをセットするように設計されるからである。"
8586
8587 #.  FIXME Document SO_ATTACH_FILTER and SO_DETACH_FILTER
8588 #.  .SH AUTHORS
8589 #.  This man page was written by Andi Kleen.
8590 #. type: Plain text
8591 #: build/C/man7/socket.7:742
8592 msgid ""
8593 "The B<CONFIG_FILTER> socket options B<SO_ATTACH_FILTER> and "
8594 "B<SO_DETACH_FILTER> are not documented.  The suggested interface to use them "
8595 "is via the libpcap library."
8596 msgstr ""
8597 "B<CONFIG_FILTER> ソケットオプションである B<SO_ATTACH_FILTER> と "
8598 "B<SO_DETACH_FILTER> について記載されていない。これらは libpcap ライブラリを通"
8599 "して 用いる方が良い。"
8600
8601 #. type: Plain text
8602 #: build/C/man7/socket.7:752
8603 msgid ""
8604 "B<getsockopt>(2), B<setsockopt>(2), B<socket>(2), B<capabilities>(7), B<ddp>"
8605 "(7), B<ip>(7), B<packet>(7), B<tcp>(7), B<udp>(7), B<unix>(7)"
8606 msgstr ""
8607 "B<getsockopt>(2), B<setsockopt>(2), B<socket>(2), B<capabilities>(7), B<ddp>"
8608 "(7), B<ip>(7), B<packet>(7), B<tcp>(7), B<udp>(7), B<unix>(7)"
8609
8610 #. type: TH
8611 #: build/C/man2/socketcall.2:26
8612 #, no-wrap
8613 msgid "SOCKETCALL"
8614 msgstr "SOCKETCALL"
8615
8616 #. type: TH
8617 #: build/C/man2/socketcall.2:26
8618 #, no-wrap
8619 msgid "2007-06-28"
8620 msgstr "2007-06-28"
8621
8622 #. type: Plain text
8623 #: build/C/man2/socketcall.2:29
8624 msgid "socketcall - socket system calls"
8625 msgstr "socketcall - ソケット・システムコール"
8626
8627 #. type: Plain text
8628 #: build/C/man2/socketcall.2:31
8629 msgid "B<int socketcall(int >I<call>B<, unsigned long *>I<args>B<);>"
8630 msgstr "B<int socketcall(int >I<call>B<, unsigned long *>I<args>B<);>"
8631
8632 #. type: Plain text
8633 #: build/C/man2/socketcall.2:39
8634 msgid ""
8635 "B<socketcall>()  is a common kernel entry point for the socket system "
8636 "calls.  I<call> determines which socket function to invoke.  I<args> points "
8637 "to a block containing the actual arguments, which are passed through to the "
8638 "appropriate call."
8639 msgstr ""
8640 "B<socketcall>()  はソケット・システムコールのための共通のカーネル・エント"
8641 "リ・ ポイント(kernel entry point)である。 I<call> はどのソケット関数を呼び出"
8642 "すかを指定する。 I<args> は適切なコールに渡すための実際の引き数を含んでいるブ"
8643 "ロックを指す。"
8644
8645 #. type: Plain text
8646 #: build/C/man2/socketcall.2:43
8647 msgid ""
8648 "User programs should call the appropriate functions by their usual names.  "
8649 "Only standard library implementors and kernel hackers need to know about "
8650 "B<socketcall>()."
8651 msgstr ""
8652 "ユーザー・プログラムは通常の名前を使用して適切な関数を呼び出すべきである。 標"
8653 "準ライブラリの実装者やカーネル・ハッカーのみが B<socketcall>()  について知る"
8654 "必要がある。"
8655
8656 #. type: Plain text
8657 #: build/C/man2/socketcall.2:46
8658 msgid ""
8659 "This call is specific to Linux, and should not be used in programs intended "
8660 "to be portable."
8661 msgstr ""
8662 "このコールは Linux 特有であり、移植を意図したプログラムで 使用してはいけな"
8663 "い。"
8664
8665 #. type: Plain text
8666 #: build/C/man2/socketcall.2:54
8667 msgid ""
8668 "On a few architectures, for example ia64, there is no B<socketcall>()  "
8669 "system call; instead B<socket>(2), B<accept>(2), B<bind>(2), and so on "
8670 "really are implemented as separate system calls."
8671 msgstr ""
8672 "ia64 などのいくつかのアーキテクチャでは、システムコール B<socketcall>()  が存"
8673 "在しない。実際には、その代わりに B<socket>(2), B<accept>(2), B<bind>(2)  など"
8674 "が独立したシステムコールとして実装されている。"
8675
8676 #. type: Plain text
8677 #: build/C/man2/socketcall.2:71
8678 msgid ""
8679 "B<accept>(2), B<bind>(2), B<connect>(2), B<getpeername>(2), B<getsockname>"
8680 "(2), B<getsockopt>(2), B<listen>(2), B<recv>(2), B<recvfrom>(2), B<recvmsg>"
8681 "(2), B<send>(2), B<sendmsg>(2), B<sendto>(2), B<setsockopt>(2), B<shutdown>"
8682 "(2), B<socket>(2), B<socketpair>(2)"
8683 msgstr ""
8684 "B<accept>(2), B<bind>(2), B<connect>(2), B<getpeername>(2), B<getsockname>"
8685 "(2), B<getsockopt>(2), B<listen>(2), B<recv>(2), B<recvfrom>(2), B<recvmsg>"
8686 "(2), B<send>(2), B<sendmsg>(2), B<sendto>(2), B<setsockopt>(2), B<shutdown>"
8687 "(2), B<socket>(2), B<socketpair>(2)"
8688
8689 #. type: TH
8690 #: build/C/man2/socketpair.2:40
8691 #, no-wrap
8692 msgid "SOCKETPAIR"
8693 msgstr "SOCKETPAIR"
8694
8695 #. type: TH
8696 #: build/C/man2/socketpair.2:40
8697 #, no-wrap
8698 msgid "2008-10-11"
8699 msgstr "2008-10-11"
8700
8701 #. type: Plain text
8702 #: build/C/man2/socketpair.2:43
8703 msgid "socketpair - create a pair of connected sockets"
8704 msgstr "socketpair - 接続されたソケットのペアを作成する"
8705
8706 #. type: Plain text
8707 #: build/C/man2/socketpair.2:50
8708 msgid ""
8709 "B<int socketpair(int >I<domain>B<, int >I<type>B<, int >I<protocol>B<, int "
8710 ">I<sv>B<[2]);>"
8711 msgstr ""
8712 "B<int socketpair(int >I<domain>B<, int >I<type>B<, int >I<protocol>B<, int "
8713 ">I<sv>B<[2]);>"
8714
8715 #. type: Plain text
8716 #: build/C/man2/socketpair.2:61
8717 msgid ""
8718 "The B<socketpair>()  call creates an unnamed pair of connected sockets in "
8719 "the specified I<domain>, of the specified I<type>, and using the optionally "
8720 "specified I<protocol>.  For further details of these arguments, see B<socket>"
8721 "(2)."
8722 msgstr ""
8723 "B<socketpair>()  は、指定されたドメイン I<domain> に指定された種類 I<type> で"
8724 "名前のないソケットの接続されたペアを作成する。 I<protocol> が指定されると、こ"
8725 "のプロトコルを用いる。 これらの引き数の詳細は B<socket>(2)  を参照のこと。"
8726
8727 #. type: Plain text
8728 #: build/C/man2/socketpair.2:67
8729 msgid ""
8730 "The descriptors used in referencing the new sockets are returned in I<sv>[0] "
8731 "and I<sv>[1].  The two sockets are indistinguishable."
8732 msgstr ""
8733 "新しいソケットの参照に使用するディスクリプタ (descriptor) が I<sv>[0] と "
8734 "I<sv>[1] に返される。 二つのソケットは全く同じである。"
8735
8736 #. type: Plain text
8737 #: build/C/man2/socketpair.2:76
8738 msgid "The specified address family is not supported on this machine."
8739 msgstr "このマシンでは指定されたアドレス・ファミリがサポートされていない。"
8740
8741 #. type: Plain text
8742 #: build/C/man2/socketpair.2:81
8743 msgid ""
8744 "The address I<sv> does not specify a valid part of the process address space."
8745 msgstr "アドレス I<sv> がこのプロセスで使えるアドレス空間を指定していない。"
8746
8747 #. type: Plain text
8748 #: build/C/man2/socketpair.2:84
8749 msgid "Too many descriptors are in use by this process."
8750 msgstr "このプロセスが使用しているディスクリプタの数が多すぎる。"
8751
8752 #. type: Plain text
8753 #: build/C/man2/socketpair.2:90
8754 msgid "The specified protocol does not support creation of socket pairs."
8755 msgstr "指定されたプロトコルではソケットのペアの作成がサポートされていない。"
8756
8757 #. type: Plain text
8758 #: build/C/man2/socketpair.2:93
8759 msgid "The specified protocol is not supported on this machine."
8760 msgstr "このマシンでは指定されたプロトコルがサポートされていない。"
8761
8762 #. type: Plain text
8763 #: build/C/man2/socketpair.2:101
8764 msgid ""
8765 "4.4BSD, POSIX.1-2001.  The B<socketpair>()  function call appeared in "
8766 "4.2BSD.  It is generally portable to/from non-BSD systems supporting clones "
8767 "of the BSD socket layer (including System V variants)."
8768 msgstr ""
8769 "4.4BSD, POSIX.1-2001.  B<socketpair>()  関数コールは 4.2BSD で現われた。一般"
8770 "に (System V の変種を含めて)  BSD のソケット層のクローンをサポートしている、"
8771 "BSD 以外のシステムと、 互いに移植性がある。"
8772
8773 #. type: Plain text
8774 #: build/C/man2/socketpair.2:107
8775 msgid ""
8776 "On Linux, the only supported domain for this call is B<AF_UNIX> (or "
8777 "synonymously, B<AF_LOCAL>).  (Most implementations have the same "
8778 "restriction.)"
8779 msgstr ""
8780 "Linux では、この関数でサポートされているドメインは B<AF_UNIX> (または同義語で"
8781 "ある B<AF_LOCAL>)  だけである。 (ほとんどの実装で同じ制限がある)"
8782
8783 #. type: Plain text
8784 #: build/C/man2/socketpair.2:116
8785 msgid ""
8786 "Since Linux 2.6.27, B<socketpair>()  supports the B<SOCK_NONBLOCK> and "
8787 "B<SOCK_CLOEXEC> flags described in B<socket>(2)."
8788 msgstr ""
8789 "Linux 2.6.27 以降では、 B<socketpair>()  は、フラグ B<SOCK_NONBLOCK> と "
8790 "B<SOCK_CLOEXEC> に対応している。フラグの説明は B<socket>(2)  を参照のこと。"
8791
8792 #. type: Plain text
8793 #: build/C/man2/socketpair.2:128
8794 msgid ""
8795 "B<pipe>(2), B<read>(2), B<socket>(2), B<write>(2), B<socket>(7), B<unix>(7)"
8796 msgstr ""
8797 "B<pipe>(2), B<read>(2), B<socket>(2), B<write>(2), B<socket>(7), B<unix>(7)"
8798
8799 #~ msgid "COLOPHON"
8800 #~ msgstr "この文書について"
8801
8802 #~ msgid ""
8803 #~ "This page is part of release 3.38 of the Linux I<man-pages> project.  A "
8804 #~ "description of the project, and information about reporting bugs, can be "
8805 #~ "found at http://www.kernel.org/doc/man-pages/."
8806 #~ msgstr ""
8807 #~ "この man ページは Linux I<man-pages> プロジェクトのリリース 3.38 の一部で"
8808 #~ "ある。\n"
8809 #~ "プロジェクトの説明とバグ報告に関する情報は\n"
8810 #~ "http://www.kernel.org/doc/man-pages/ に書かれている。"
8811
8812 #~ msgid "RETURN VALUES"
8813 #~ msgstr "RETURN VALUES"
8814
8815 #~ msgid "2011-10-01"
8816 #~ msgstr "2011-10-01"