# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2013-03-22 01:06+0900\n" "PO-Revision-Date: 2012-05-29 21:31+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: build/C/man2/accept.2:41 #, no-wrap msgid "ACCEPT" msgstr "ACCEPT" #. type: TH #: build/C/man2/accept.2:41 #, no-wrap msgid "2010-09-10" msgstr "2010-09-10" #. type: TH #: build/C/man2/accept.2:41 build/C/man2/bind.2:68 build/C/man2/connect.2:67 #: build/C/man2/getsockname.2:40 build/C/man2/getsockopt.2:44 #: build/C/man2/listen.2:45 build/C/man2/recv.2:41 build/C/man2/recvmmsg.2:31 #: build/C/man2/select.2:38 build/C/man2/select_tut.2:32 #: build/C/man2/send.2:40 build/C/man2/sendmmsg.2:28 #: build/C/man3/sockatmark.3:25 build/C/man2/socket.2:43 #: build/C/man7/socket.7:48 build/C/man2/socketcall.2:25 #: build/C/man2/socketpair.2:42 #, no-wrap msgid "Linux" msgstr "Linux" #. type: TH #: build/C/man2/accept.2:41 build/C/man2/bind.2:68 #: build/C/man3/bindresvport.3:30 build/C/man2/connect.2:67 #: build/C/man3/getifaddrs.3:36 build/C/man2/getsockname.2:40 #: build/C/man2/getsockopt.2:44 build/C/man3/if_nameindex.3:26 #: build/C/man3/if_nametoindex.3:25 build/C/man2/listen.2:45 #: build/C/man2/recv.2:41 build/C/man2/recvmmsg.2:31 build/C/man2/select.2:38 #: build/C/man2/select_tut.2:32 build/C/man2/send.2:40 #: build/C/man2/sendmmsg.2:28 build/C/man3/sockatmark.3:25 #: build/C/man2/socket.2:43 build/C/man7/socket.7:48 #: build/C/man2/socketcall.2:25 build/C/man2/socketpair.2:42 #, no-wrap msgid "Linux Programmer's Manual" msgstr "Linux Programmer's Manual" #. type: SH #: build/C/man2/accept.2:42 build/C/man2/bind.2:69 #: build/C/man3/bindresvport.3:31 build/C/man2/connect.2:68 #: build/C/man3/getifaddrs.3:37 build/C/man2/getsockname.2:41 #: build/C/man2/getsockopt.2:45 build/C/man3/if_nameindex.3:27 #: build/C/man3/if_nametoindex.3:26 build/C/man2/listen.2:46 #: build/C/man2/recv.2:42 build/C/man2/recvmmsg.2:32 build/C/man2/select.2:39 #: build/C/man2/select_tut.2:33 build/C/man2/send.2:41 #: build/C/man2/sendmmsg.2:29 build/C/man3/sockatmark.3:26 #: build/C/man2/socket.2:44 build/C/man7/socket.7:49 #: build/C/man2/socketcall.2:26 build/C/man2/socketpair.2:43 #, no-wrap msgid "NAME" msgstr "名前" #. type: Plain text #: build/C/man2/accept.2:44 #, fuzzy #| msgid "accept - accept a connection on a socket" msgid "accept, accept4 - accept a connection on a socket" msgstr "accept - ソケットへの接続を受ける" #. type: SH #: build/C/man2/accept.2:44 build/C/man2/bind.2:71 #: build/C/man3/bindresvport.3:33 build/C/man2/connect.2:70 #: build/C/man3/getifaddrs.3:39 build/C/man2/getsockname.2:43 #: build/C/man2/getsockopt.2:47 build/C/man3/if_nameindex.3:29 #: build/C/man3/if_nametoindex.3:29 build/C/man2/listen.2:48 #: build/C/man2/recv.2:44 build/C/man2/recvmmsg.2:34 build/C/man2/select.2:42 #: build/C/man2/select_tut.2:36 build/C/man2/send.2:43 #: build/C/man2/sendmmsg.2:31 build/C/man3/sockatmark.3:28 #: build/C/man2/socket.2:46 build/C/man7/socket.7:51 #: build/C/man2/socketcall.2:28 build/C/man2/socketpair.2:45 #, no-wrap msgid "SYNOPSIS" msgstr "書式" #. type: Plain text #: build/C/man2/accept.2:48 build/C/man2/bind.2:75 #, no-wrap msgid "" "B<#include Esys/types.hE> /* See NOTES */\n" "B<#include Esys/socket.hE>\n" msgstr "" "B<#include Esys/types.hE> /* 「注意」参照 */\n" "B<#include Esys/socket.hE>\n" #. type: Plain text #: build/C/man2/accept.2:50 #, no-wrap msgid "BIB<, struct sockaddr *>IB<, socklen_t *>IB<);>\n" msgstr "BIB<, struct sockaddr *>IB<, socklen_t *>IB<);>\n" #. type: Plain text #: build/C/man2/accept.2:53 #, no-wrap msgid "" "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n" "B<#include Esys/socket.hE>\n" msgstr "" "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n" "B<#include Esys/socket.hE>\n" #. type: Plain text #: build/C/man2/accept.2:56 #, no-wrap msgid "" "BIB<, struct sockaddr *>IB<,>\n" "B< socklen_t *>IB<, int >IB<);>\n" msgstr "" "BIB<, struct sockaddr *>IB<,>\n" "B< socklen_t *>IB<, int >IB<);>\n" #. type: SH #: build/C/man2/accept.2:57 build/C/man2/bind.2:79 #: build/C/man3/bindresvport.3:40 build/C/man2/connect.2:79 #: build/C/man3/getifaddrs.3:48 build/C/man2/getsockname.2:50 #: build/C/man2/getsockopt.2:58 build/C/man3/if_nameindex.3:36 #: build/C/man3/if_nametoindex.3:37 build/C/man2/listen.2:56 #: build/C/man2/recv.2:59 build/C/man2/recvmmsg.2:44 build/C/man2/select.2:81 #: build/C/man2/select_tut.2:75 build/C/man2/send.2:58 #: build/C/man2/sendmmsg.2:40 build/C/man3/sockatmark.3:42 #: build/C/man2/socket.2:52 build/C/man7/socket.7:55 #: build/C/man2/socketcall.2:30 build/C/man2/socketpair.2:52 #, no-wrap msgid "DESCRIPTION" msgstr "説明" #. type: Plain text #: build/C/man2/accept.2:72 msgid "" "The B() system call is used with connection-based socket types " "(B, B). It extracts the first connection " "request on the queue of pending connections for the listening socket, " "I, creates a new connected socket, and returns a new file descriptor " "referring to that socket. The newly created socket is not in the listening " "state. The original socket I is unaffected by this call." msgstr "" "B() システムコールは、接続指向のソケット型 (B, " "B) で用いられる。 この関数は、接続待ちソケット I 宛" "ての保留状態の接続要求が入っているキューから 先頭の接続要求を取り出し、接続済" "みソケットを新規に生成し、 そのソケットを参照する新しいファイル・ディスクリプ" "タを返す。 新規に生成されたソケットは、接続待ち (listen) 状態ではない。 もと" "もとのソケット I はこの呼び出しによって影響を受けない。" #. type: Plain text #: build/C/man2/accept.2:81 msgid "" "The argument I is a socket that has been created with B(2), " "bound to a local address with B(2), and is listening for connections " "after a B(2)." msgstr "" "引き数 I は、 B(2) によって生成され、 B(2) によって" "ローカルアドレスにバインドされ、 B(2) を経て接続を待っているソケット" "である。" #. type: Plain text #: build/C/man2/accept.2:99 msgid "" "The argument I is a pointer to a I structure. This " "structure is filled in with the address of the peer socket, as known to the " "communications layer. The exact format of the address returned I is " "determined by the socket's address family (see B(2) and the " "respective protocol man pages). When I is NULL, nothing is filled in; " "in this case, I is not used, and should also be NULL." msgstr "" "I 引き数は I 構造体へのポインタである。 この構造体には接続相" "手のソケットのアドレスが入っている。 I 引き数で返されるアドレスの正確な" "フォーマットは、 ソケットのアドレス種別によって変わる (B(2) およびそ" "れぞれのプロトコルの man ページを参照)。 I が NULL の場合、 I に" "は何も入らない。この場合、 I は使用されず、この引き数は NULL にして" "おくべきである。" #. type: Plain text #: build/C/man2/accept.2:107 msgid "" "The I argument is a value-result argument: the caller must " "initialize it to contain the size (in bytes) of the structure pointed to by " "I; on return it will contain the actual size of the peer address." msgstr "" "I 引き数は入出力両用の引き数である。呼び出し時には、呼び出し元が " "I が指す構造体のサイズ (バイト単位) で初期化しておかなければならない。 " "返ってくる時には、接続相手のアドレスの実際の大きさが格納される。" #. type: Plain text #: build/C/man2/accept.2:112 build/C/man2/getsockname.2:67 msgid "" "The returned address is truncated if the buffer provided is too small; in " "this case, I will return a value greater than was supplied to the " "call." msgstr "" "渡されたバッファが小さ過ぎた場合は、返されるアドレスの末尾が切り詰められ" "る。\n" "この場合には、 I には、呼び出し時に指定された値よりも大きな値が格納" "される。" #. type: Plain text #: build/C/man2/accept.2:125 msgid "" "If no pending connections are present on the queue, and the socket is not " "marked as nonblocking, B() blocks the caller until a connection is " "present. If the socket is marked nonblocking and no pending connections are " "present on the queue, B() fails with the error B or " "B." msgstr "" "キューに保留となっている接続要求がなく、 かつソケットが非停止になっていないと" "きは、 B() は接続が発生するまで呼び出し元を停止 (block) する。 ソ" "ケットが非停止になっていて、 待ち状態の接続要求がキューに無いときは、 " "B() はエラー B か B で失敗する。" #. type: Plain text #: build/C/man2/accept.2:139 msgid "" "In order to be notified of incoming connections on a socket, you can use " "B(2) または B(2) を用いれば" "よい。 新しい接続要求が来るとソケットは読み込み可能になるので、 そうしたら " "B() を呼んでその接続に対するソケットを取得すればよい。 あるいはソ" "ケットに設定を行い、何らかのアクションがあったときに B を配送 " "(deliver) させるようにすることもできる。詳細は B(7) を参照のこと。" #. type: Plain text #: build/C/man2/accept.2:152 msgid "" "For certain protocols which require an explicit confirmation, such as " "DECNet, B() can be thought of as merely dequeuing the next " "connection request and not implying confirmation. Confirmation can be " "implied by a normal read or write on the new file descriptor, and rejection " "can be implied by closing the new socket. Currently only DECNet has these " "semantics on Linux." msgstr "" "明示的な接続確認 (confirmation) を必要とするようなプロトコル (DECNet など) で" "は、 B() は単に次の接続要求をキューから取り出すだけであり、 接続確認" "は行わないことに注意せよ。接続確認は、 新しいファイル・ディスクリプタに対す" "る 通常の読み取り/書き込みによってなされ、接続拒否 (rejection) は新しいソ" "ケットをクローズすることによってなされる。 現在のところ、 Linux 上でこれらの" "セマンティクスを持つのは DECNet だけである。" #. type: Plain text #: build/C/man2/accept.2:162 msgid "" "If I is 0, then B() is the same as B(). The " "following values can be bitwise ORed in I to obtain different " "behavior:" msgstr "" "I が 0 の場合、 B() は B() と同じである。 I " "に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることが" "できる。" #. type: TP #: build/C/man2/accept.2:162 build/C/man2/socket.2:164 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:170 build/C/man2/socket.2:172 msgid "" "Set the B file status flag on the new open file description. " "Using this flag saves extra calls to B(2) to achieve the same result." msgstr "" "新しく生成されるオープンファイル記述 (open file description) の " "B ファイルステータスフラグをセットする。 このフラグを使うこと" "で、 B をセットするために B(2) を追加で呼び出す必要がなく" "なる。" #. type: TP #: build/C/man2/accept.2:170 build/C/man2/socket.2:172 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:180 build/C/man2/socket.2:182 msgid "" "Set the close-on-exec (B) flag on the new file descriptor. See " "the description of the B flag in B(2) for reasons why this " "may be useful." msgstr "" "新しいファイルディスクリプタに対して close-on-exec (B) フラグを" "セットする。 このフラグが役に立つ理由については、 B(2) の " "B フラグの説明を参照のこと。" #. type: SH #: build/C/man2/accept.2:180 build/C/man2/bind.2:152 #: build/C/man3/bindresvport.3:67 build/C/man2/connect.2:127 #: build/C/man3/getifaddrs.3:142 build/C/man2/getsockname.2:67 #: build/C/man2/getsockopt.2:131 build/C/man3/if_nameindex.3:71 #: build/C/man3/if_nametoindex.3:54 build/C/man2/listen.2:82 #: build/C/man2/recv.2:388 build/C/man2/recvmmsg.2:149 #: build/C/man2/select.2:289 build/C/man2/select_tut.2:485 #: build/C/man2/send.2:275 build/C/man2/sendmmsg.2:119 #: build/C/man3/sockatmark.3:51 build/C/man2/socket.2:314 #: build/C/man2/socketpair.2:69 #, no-wrap msgid "RETURN VALUE" msgstr "返り値" #. type: Plain text #: build/C/man2/accept.2:187 msgid "" "On success, these system calls return a nonnegative integer that is a " "descriptor for the accepted socket. On error, -1 is returned, and I " "is set appropriately." msgstr "" "成功した場合、これらのシステムコールは 受け付けたソケットのディスクリプタであ" "る非負の整数値を返す。 エラーが発生した場合は -1 を返し、 I を適切に設" "定する。" #. type: SS #: build/C/man2/accept.2:187 #, fuzzy, no-wrap #| msgid "Error Handling" msgid "Error handling" msgstr "エラー処理" #. type: Plain text #: build/C/man2/accept.2:214 msgid "" "Linux B() (and B()) passes already-pending network errors " "on the new socket as an error code from B(). This behavior differs " "from other BSD socket implementations. For reliable operation the " "application should detect the network errors defined for the protocol after " "B() and treat them like B by retrying. In the case of TCP/" "IP, these are B, B, B, B, " "B, B, B, and B." msgstr "" "Linux の B() (と B()) は、新しいソケットにおける、発生済み" "のネットワークエラーを B() からのエラーコードとして渡す。 この振舞い" "は BSD ソケットの実装とは異なる。 信頼性の高い動作を行うためには、 アプリケー" "ションはプロトコルで定義されているネットワークエラーの検知を B() の" "あとに行い、それらのエラーを B と同じように扱い、再試行 (retry) を行" "うべきである。 TCP/IP では、以下のエラーが該当する: B, B, " "B, B, B, B, B, " "B" #. type: SH #: build/C/man2/accept.2:214 build/C/man2/bind.2:157 #: build/C/man3/bindresvport.3:72 build/C/man2/connect.2:132 #: build/C/man3/getifaddrs.3:149 build/C/man2/getsockname.2:72 #: build/C/man2/getsockopt.2:136 build/C/man3/if_nameindex.3:78 #: build/C/man3/if_nametoindex.3:69 build/C/man2/listen.2:87 #: build/C/man2/recv.2:393 build/C/man2/recvmmsg.2:157 #: build/C/man2/select.2:306 build/C/man2/send.2:280 #: build/C/man2/sendmmsg.2:133 build/C/man3/sockatmark.3:56 #: build/C/man2/socket.2:319 build/C/man2/socketpair.2:74 #, no-wrap msgid "ERRORS" msgstr "エラー" #. type: TP #: build/C/man2/accept.2:215 build/C/man2/recv.2:398 build/C/man2/send.2:296 #, no-wrap msgid "B or B" msgstr "B または B" #. Actually EAGAIN on Linux #. type: Plain text #: build/C/man2/accept.2:223 msgid "" "The socket is marked nonblocking and no connections are present to be " "accepted. POSIX.1-2001 allows either error to be returned for this case, " "and does not require these constants to have the same value, so a portable " "application should check for both possibilities." msgstr "" "ソケットが非停止になっていて、 かつ受付け対象の接続が存在しない。 " "POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これら 2 つ" "の定数が同じ値を持つことも求めていない。 したがって、移植性が必要なアプリケー" "ションでは、両方の可能性を 確認すべきである。" #. type: TP #: build/C/man2/accept.2:223 build/C/man2/bind.2:165 #: build/C/man2/connect.2:169 build/C/man2/getsockname.2:73 #: build/C/man2/getsockopt.2:137 build/C/man2/listen.2:91 #: build/C/man2/recv.2:407 build/C/man2/select.2:307 build/C/man2/send.2:304 #: build/C/man3/sockatmark.3:57 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:226 msgid "The descriptor is invalid." msgstr "ディスクリプタが不正。" #. type: TP #: build/C/man2/accept.2:226 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:229 msgid "A connection has been aborted." msgstr "接続が中止された。" #. type: TP #: build/C/man2/accept.2:229 build/C/man2/bind.2:191 #: build/C/man2/connect.2:175 build/C/man2/getsockname.2:78 #: build/C/man2/getsockopt.2:142 build/C/man2/recv.2:416 #: build/C/man2/send.2:313 build/C/man2/socketpair.2:78 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:234 msgid "" "The I argument is not in a writable part of the user address space." msgstr "I 引き数がユーザアドレス空間の書き込み可能領域にない。" #. type: TP #: build/C/man2/accept.2:234 build/C/man2/connect.2:203 #: build/C/man2/recv.2:420 build/C/man2/select.2:312 build/C/man2/send.2:316 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:239 msgid "" "The system call was interrupted by a signal that was caught before a valid " "connection arrived; see B(7)." msgstr "" "有効な接続が到着する前に捕捉されたシグナルによって システムコールが中断され" "た。 B(7) 参照。" #. type: TP #: build/C/man2/accept.2:239 build/C/man2/accept.2:244 build/C/man2/bind.2:169 #: build/C/man2/bind.2:195 build/C/man2/getsockname.2:84 #: build/C/man2/getsockopt.2:152 build/C/man2/recv.2:425 #: build/C/man2/recvmmsg.2:161 build/C/man2/select.2:316 #: build/C/man2/send.2:320 build/C/man3/sockatmark.3:61 #: build/C/man2/socket.2:327 build/C/man2/socket.2:330 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:244 msgid "" "Socket is not listening for connections, or I is invalid (e.g., is " "negative)." msgstr "" "ソケットが接続待ち状態ではない。もしくは、 I が不正である (例えば、" "負の場合など)。" #. type: Plain text #: build/C/man2/accept.2:249 msgid "(B()) invalid value in I." msgstr "(B()) I に不正な値が指定されている。" #. type: TP #: build/C/man2/accept.2:249 build/C/man2/socket.2:335 #: build/C/man2/socketpair.2:83 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:252 msgid "The per-process limit of open file descriptors has been reached." msgstr "1プロセスがオープンできるファイル・ディスクリプタ数の上限に達した。" #. type: TP #: build/C/man2/accept.2:252 build/C/man2/socket.2:338 #: build/C/man2/socketpair.2:86 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:255 build/C/man2/socket.2:341 #: build/C/man2/socketpair.2:89 msgid "The system limit on the total number of open files has been reached." msgstr "オープンされたファイルの総数がシステム全体の上限に達していた。" #. type: TP #: build/C/man2/accept.2:255 #, no-wrap msgid "B, B" msgstr "B, B" #. type: Plain text #: build/C/man2/accept.2:260 msgid "" "Not enough free memory. This often means that the memory allocation is " "limited by the socket buffer limits, not by the system memory." msgstr "" "メモリが足りない。 多くの場合は、システムメモリが足りないわけではなく、 ソ" "ケットバッファの大きさによるメモリ割り当ての制限である。" #. type: TP #: build/C/man2/accept.2:260 build/C/man2/bind.2:174 #: build/C/man2/connect.2:215 build/C/man2/getsockname.2:92 #: build/C/man2/getsockopt.2:166 build/C/man2/listen.2:96 #: build/C/man2/recv.2:440 build/C/man2/send.2:349 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:263 msgid "The descriptor references a file, not a socket." msgstr "ディスクリプタはソケットではなくファイルを参照している。" #. type: TP #: build/C/man2/accept.2:263 build/C/man2/listen.2:101 build/C/man2/send.2:354 #: build/C/man2/socketpair.2:89 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:267 msgid "The referenced socket is not of type B." msgstr "参照しているソケットの型が B でない。" #. type: TP #: build/C/man2/accept.2:267 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:270 msgid "Protocol error." msgstr "プロトコル・エラー。" #. type: Plain text #: build/C/man2/accept.2:274 msgid "In addition, Linux B() may fail if:" msgstr "上記に加えて、Linux の B() は以下のエラーで失敗する:" #. type: TP #: build/C/man2/accept.2:274 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/accept.2:277 msgid "Firewall rules forbid connection." msgstr "ファイアウォールのルールにより接続が禁止された。" #. type: Plain text #: build/C/man2/accept.2:289 msgid "" "In addition, network errors for the new socket and as defined for the " "protocol may be returned. Various Linux kernels can return other errors " "such as B, B, B, B. The " "value B may be seen during a trace." msgstr "" "この他に、新しいソケットに対するネットワークエラーが返されることもある。 これ" "らはそれぞれのプロトコルで定義されている。 いろいろな Linux カーネルでは、 以" "下に示すようなエラーを返すこともある。 B, B, " "B, B. B がトレースの最中に現れるこ" "ともある。" #. type: SH #: build/C/man2/accept.2:289 build/C/man3/getifaddrs.3:162 #: build/C/man3/if_nameindex.3:97 build/C/man2/recvmmsg.2:165 #: build/C/man2/select.2:325 build/C/man2/sendmmsg.2:145 #: build/C/man3/sockatmark.3:68 build/C/man7/socket.7:802 #, no-wrap msgid "VERSIONS" msgstr "バージョン" #. type: Plain text #: build/C/man2/accept.2:294 msgid "" "The B() system call is available starting with Linux 2.6.28; " "support in glibc is available starting with version 2.10." msgstr "" "B() システムコールは Linux 2.6.28 以降で利用可能である。 glibc での" "サポートはバージョン 2.10 以降で利用可能である。" #. type: SH #: build/C/man2/accept.2:294 build/C/man2/bind.2:222 #: build/C/man3/bindresvport.3:92 build/C/man2/connect.2:225 #: build/C/man3/getifaddrs.3:170 build/C/man2/getsockname.2:97 #: build/C/man2/getsockopt.2:171 build/C/man3/if_nameindex.3:104 #: build/C/man3/if_nametoindex.3:85 build/C/man2/listen.2:106 #: build/C/man2/recv.2:445 build/C/man2/recvmmsg.2:170 #: build/C/man2/select.2:331 build/C/man2/send.2:368 #: build/C/man2/sendmmsg.2:150 build/C/man3/sockatmark.3:71 #: build/C/man2/socket.2:352 build/C/man2/socketcall.2:42 #: build/C/man2/socketpair.2:95 #, no-wrap msgid "CONFORMING TO" msgstr "準拠" #. The BSD man page documents five possible error returns #. (EBADF, ENOTSOCK, EOPNOTSUPP, EWOULDBLOCK, EFAULT). #. POSIX.1-2001 documents errors #. EAGAIN, EBADF, ECONNABORTED, EINTR, EINVAL, EMFILE, #. ENFILE, ENOBUFS, ENOMEM, ENOTSOCK, EOPNOTSUPP, EPROTO, EWOULDBLOCK. #. In addition, SUSv2 documents EFAULT and ENOSR. #. type: Plain text #: build/C/man2/accept.2:306 msgid "" "B(): POSIX.1-2001, SVr4, 4.4BSD, (B() first appeared in " "4.2BSD)." msgstr "" "B(): POSIX.1-2001, SVr4, 4.4BSD, (B() は 4.2BSD で初めて実装" "された)." #. type: Plain text #: build/C/man2/accept.2:309 msgid "B() is a nonstandard Linux extension." msgstr "B() は非標準の Linux による拡張である。" #. Some testing seems to show that Tru64 5.1 and HP-UX 11 also #. do not inherit file status flags -- MTK Jun 05 #. type: Plain text #: build/C/man2/accept.2:324 msgid "" "On Linux, the new socket returned by B() does I inherit file " "status flags such as B and B from the listening " "socket. This behavior differs from the canonical BSD sockets " "implementation. Portable programs should not rely on inheritance or " "noninheritance of file status flags and always explicitly set all required " "flags on the socket returned from B()." msgstr "" "Linux では、 B() が返す新しいソケットは listen を行っているソケット" "の ファイル状態フラグ (B や B など) を継承「しない」。 " "この動作は標準的な BSD ソケットの実装とは異なっている。 移植性を考慮したプロ" "グラムではファイル状態フラグが継承されるかどうかは 前提にせず、常に B" "() が返したソケットに対して全ての必要なフラグを明示的に設定するように すべき" "である。" #. type: SH #: build/C/man2/accept.2:324 build/C/man2/bind.2:234 #: build/C/man3/bindresvport.3:95 build/C/man2/connect.2:241 #: build/C/man3/getifaddrs.3:190 build/C/man2/getsockname.2:103 #: build/C/man2/getsockopt.2:178 build/C/man2/listen.2:111 #: build/C/man2/recv.2:455 build/C/man2/select.2:346 #: build/C/man2/select_tut.2:503 build/C/man2/send.2:382 #: build/C/man2/sendmmsg.2:153 build/C/man3/sockatmark.3:73 #: build/C/man2/socket.2:366 build/C/man7/socket.7:816 #: build/C/man2/socketcall.2:45 build/C/man2/socketpair.2:103 #, no-wrap msgid "NOTES" msgstr "注意" #. type: Plain text #: build/C/man2/accept.2:330 build/C/man2/bind.2:240 #: build/C/man2/connect.2:247 build/C/man2/getsockopt.2:184 #: build/C/man2/listen.2:137 build/C/man2/socket.2:372 #: build/C/man2/socketpair.2:124 msgid "" "POSIX.1-2001 does not require the inclusion of Isys/types.hE>, and " "this header file is not required on Linux. However, some historical (BSD) " "implementations required this header file, and portable applications are " "probably wise to include it." msgstr "" "POSIX.1-2001 では Isys/types.hE> のインクルードは必須とされておら" "ず、 Linux ではこのヘッダファイルは必要ではない。 しかし、歴史的には、いくつ" "かの実装 (BSD 系) でこのヘッダファイルが 必要であり、移植性が必要なアプリケー" "ションではこのファイルを インクルードするのが賢明であろう。" #. type: Plain text #: build/C/man2/accept.2:351 msgid "" "There may not always be a connection waiting after a B is delivered " "or B(2) または B(2) が読み込み可能イ" "ベントを返した後に、 必ずしも待機中の接続があるとは限らない。 なぜならその接" "続は、 B() が呼ばれる前に、非同期的なネットワークエラーや 他のスレッ" "ドから呼ばれた (別の) accept によって 削除されているかもしれないからである。 " "この場合、その B() 呼び出しは停止 (block) し、次の接続の到着を待ちつ" "づける。 B() に停止を行わせないようにするには、引き数に渡すソケット " "I に B フラグをセットしておく必要がある (B(7) を" "見よ)。" #. type: SS #: build/C/man2/accept.2:351 #, no-wrap msgid "The socklen_t type" msgstr "socklen_t 型" #. type: Plain text #: build/C/man2/accept.2:361 msgid "" "The third argument of B() was originally declared as an I " "(and is that under libc4 and libc5 and on many other systems like 4.x BSD, " "SunOS 4, SGI); a POSIX.1g draft standard wanted to change it into a I, and that is what it is for SunOS 5. Later POSIX drafts have I, and so do the Single UNIX Specification and glibc2. Quoting Linus " "Torvalds:" msgstr "" "B() の第 3 引き数は、もともと I と宣言されていた (libc4 や " "libc5, 4.x BSD, SunOS 4, SGI など多くのシステムではそうなっている)。 " "POSIX.1g draft 標準は、 これを I に変更しようとし、SunOS 5 ではそう" "宣言されている。 後に POSIX drafts には I が含まれるようにな" "り、 Single UNIX Specification や glibc2 ではこのように宣言されるようになっ" "た。 Linus Torvald の発言を引用する:" #. .I fails: only italicizes a single line #. type: Plain text #: build/C/man2/accept.2:378 msgid "" "\"_Any_ sane library _must_ have \"socklen_t\" be the same size as int. " "Anything else breaks any BSD socket layer stuff. POSIX initially I " "make it a size_t, and I (and hopefully others, but obviously not too many) " "complained to them very loudly indeed. Making it a size_t is completely " "broken, exactly because size_t very seldom is the same size as \"int\" on 64-" "bit architectures, for example. And it I to be the same size as \"int" "\" because that's what the BSD socket interface is. Anyway, the POSIX " "people eventually got a clue, and created \"socklen_t\". They shouldn't " "have touched it in the first place, but once they did they felt it had to " "have a named type for some unfathomable reason (probably somebody didn't " "like losing face over having done the original stupid thing, so they " "silently just renamed their blunder).\"" msgstr "" "「まともなライブラリを作りたければ、 \"socklen_t\" のサイズは int と同じにし" "なきゃならない。 さもないと BSD ソケット層を破壊することになっちゃう。 POSIX " "は最初こいつを size_t にしたんで、 ぼくは彼らに文句をがなりたてた (多分そうい" "う人は他にもいたと思う。多くはなかったようだけど)。 こいつを size_t にするの" "は完全にいかれてる。 例えば 64 ビットアーキテクチャでは、 size_t が \"int\" " "と同じサイズだなんてことはほとんどないからね。 このサイズは \"int\" と 同じで" "なきゃ『ダメ』なんだ。 BSD ソケットインターフェースっていうのはそういうものな" "んだから。 まあともかく POSIX の人たちも、 \"socklen_t\" を作るという解決策を" "なんとかひねり出した。 そもそも最初から放っておけば良かったんだが、 いじっ" "ちゃった以上、 名前付きの型を持たせなきゃならない、と思ったみたいだね。 なん" "でかはわかんないけど (きっと最初にやっちまった馬鹿な間違いで顔をつぶしたくな" "かったから、 こっそり名前を付け替えて自分たちの大失敗をごまかそうとしたんだろ" "う)。」" #. type: SH #: build/C/man2/accept.2:378 build/C/man2/bind.2:254 #: build/C/man2/connect.2:258 build/C/man3/getifaddrs.3:207 #: build/C/man3/if_nameindex.3:108 build/C/man2/listen.2:166 #: build/C/man2/recv.2:490 build/C/man2/recvmmsg.2:173 #: build/C/man2/select.2:537 build/C/man2/select_tut.2:529 #: build/C/man2/send.2:419 build/C/man2/sendmmsg.2:168 #: build/C/man3/sockatmark.3:97 build/C/man2/socket.2:385 #, no-wrap msgid "EXAMPLE" msgstr "例" #. type: Plain text #: build/C/man2/accept.2:381 build/C/man2/listen.2:169 msgid "See B(2)." msgstr "B(2) 参照。" #. type: SH #: build/C/man2/accept.2:381 build/C/man2/bind.2:319 #: build/C/man3/bindresvport.3:101 build/C/man2/connect.2:263 #: build/C/man3/getifaddrs.3:290 build/C/man2/getsockname.2:112 #: build/C/man2/getsockopt.2:202 build/C/man3/if_nameindex.3:146 #: build/C/man3/if_nametoindex.3:89 build/C/man2/listen.2:169 #: build/C/man2/recv.2:495 build/C/man2/recvmmsg.2:268 #: build/C/man2/select.2:574 build/C/man2/select_tut.2:819 #: build/C/man2/send.2:424 build/C/man2/sendmmsg.2:236 #: build/C/man3/sockatmark.3:132 build/C/man2/socket.2:390 #: build/C/man7/socket.7:847 build/C/man2/socketcall.2:53 #: build/C/man2/socketpair.2:124 #, no-wrap msgid "SEE ALSO" msgstr "関連項目" #. type: Plain text #: build/C/man2/accept.2:388 msgid "" "B(2), B(2), B(2), B(2), B(2), " "B(7)" #. type: SH #: build/C/man2/accept.2:388 build/C/man2/bind.2:332 #: build/C/man3/bindresvport.3:104 build/C/man2/connect.2:270 #: build/C/man3/getifaddrs.3:296 build/C/man2/getsockname.2:119 #: build/C/man2/getsockopt.2:210 build/C/man3/if_nameindex.3:153 #: build/C/man3/if_nametoindex.3:93 build/C/man2/listen.2:175 #: build/C/man2/recv.2:506 build/C/man2/recvmmsg.2:275 #: build/C/man2/select.2:588 build/C/man2/select_tut.2:838 #: build/C/man2/send.2:439 build/C/man2/sendmmsg.2:241 #: build/C/man3/sockatmark.3:137 build/C/man2/socket.2:419 #: build/C/man7/socket.7:859 build/C/man2/socketcall.2:71 #: build/C/man2/socketpair.2:131 #, no-wrap msgid "COLOPHON" msgstr "この文書について" #. type: Plain text #: build/C/man2/accept.2:395 build/C/man2/bind.2:339 #: build/C/man3/bindresvport.3:111 build/C/man2/connect.2:277 #: build/C/man3/getifaddrs.3:303 build/C/man2/getsockname.2:126 #: build/C/man2/getsockopt.2:217 build/C/man3/if_nameindex.3:160 #: build/C/man3/if_nametoindex.3:100 build/C/man2/listen.2:182 #: build/C/man2/recv.2:513 build/C/man2/recvmmsg.2:282 #: build/C/man2/select.2:595 build/C/man2/select_tut.2:845 #: build/C/man2/send.2:446 build/C/man2/sendmmsg.2:248 #: build/C/man3/sockatmark.3:144 build/C/man2/socket.2:426 #: build/C/man7/socket.7:866 build/C/man2/socketcall.2:78 #: build/C/man2/socketpair.2:138 #, fuzzy #| msgid "" #| "This page is part of release 3.41 of the Linux I project. A " #| "description of the project, and information about reporting bugs, can be " #| "found at http://www.kernel.org/doc/man-pages/." msgid "" "This page is part of release 3.50 of the Linux I project. A " "description of the project, and information about reporting bugs, can be " "found at http://www.kernel.org/doc/man-pages/." msgstr "" "この man ページは Linux I プロジェクトのリリース 3.41 の一部\n" "である。プロジェクトの説明とバグ報告に関する情報は\n" "http://www.kernel.org/doc/man-pages/ に書かれている。" #. type: TH #: build/C/man2/bind.2:68 #, no-wrap msgid "BIND" msgstr "BIND" #. type: TH #: build/C/man2/bind.2:68 #, no-wrap msgid "2007-12-28" msgstr "2007-12-28" #. type: Plain text #: build/C/man2/bind.2:71 msgid "bind - bind a name to a socket" msgstr "bind - ソケットに名前をつける" #. type: Plain text #: build/C/man2/bind.2:78 #, no-wrap msgid "" "BIB<, const struct sockaddr *>IB<,>\n" "B< socklen_t >IB<);>\n" msgstr "" "BIB<, const struct sockaddr *>IB<,>\n" "B< socklen_t >IB<);>\n" #. type: Plain text #: build/C/man2/bind.2:92 msgid "" "When a socket is created with B(2), it exists in a name space " "(address family) but has no address assigned to it. B() assigns the " "address specified by I to the socket referred to by the file " "descriptor I. I specifies the size, in bytes, of the " "address structure pointed to by I. Traditionally, this operation is " "called \\(lqassigning a name to a socket\\(rq." msgstr "" "B(2) でソケットが作成されたとき、そのソケットは名前空間 (アドレス・" "ファミリー) に 存在するが、アドレスは割り当てられていない。 B() は、" "ファイルディスクリプタ I で参照されるソケットに I で指定された" "アドレスを割り当てる。 I には I が指すアドレス構造体のサイズを" "バイト単位で指定する。 伝統的にこの操作は 「ソケットに名前をつける」 と呼ばれ" "る。" #. type: Plain text #: build/C/man2/bind.2:99 msgid "" "It is normally necessary to assign a local address using B() before a " "B socket may receive connections (see B(2))." msgstr "" "B ソケットが接続を受け付けられるようにするには (B(2) を" "参照)、通常その前に B() を使用してローカルアドレスを割り当てる必要があ" "る。" #. type: Plain text #: build/C/man2/bind.2:130 msgid "" "The rules used in name binding vary between address families. Consult the " "manual entries in Section 7 for detailed information. For B see " "B(7), for B see B(7), for B see B(7), for " "B see B(7), for B see B(7), for " "B see B(7) and for B see B(7)." msgstr "" "名前付けのルールはアドレス・ファミリーごとに異なっている。詳細な情報は 第 7 " "章の各マニュアルを参照すること。 B は B(7) を、 B は " "B(7) を、 B は B(7) を、 B は B" "(7) を、 B は B(7) を、 B は B(7) を、 " "B は B(7) を参照。" #. type: Plain text #: build/C/man2/bind.2:137 msgid "" "The actual structure passed for the I argument will depend on the " "address family. The I structure is defined as something like:" msgstr "" "I 引き数に実際にどのような構造体が渡されるかは、 アドレス・ファミリーに" "依存する。 I 構造体は以下のような感じで定義されている:" #. type: Plain text #: build/C/man2/bind.2:144 #, no-wrap msgid "" "struct sockaddr {\n" " sa_family_t sa_family;\n" " char sa_data[14];\n" "}\n" msgstr "" "struct sockaddr {\n" " sa_family_t sa_family;\n" " char sa_data[14];\n" "}\n" #. type: Plain text #: build/C/man2/bind.2:152 msgid "" "The only purpose of this structure is to cast the structure pointer passed " "in I in order to avoid compiler warnings. See EXAMPLE below." msgstr "" "この構造体は、 I に渡される構造体へのポインタをキャストし、 コンパイラ" "の警告メッセージを抑えるためだけに存在する。 下記の「例」を参照。" #. type: Plain text #: build/C/man2/bind.2:157 build/C/man2/getsockname.2:72 #: build/C/man2/getsockopt.2:136 build/C/man2/listen.2:87 #: build/C/man2/socketpair.2:74 msgid "" "On success, zero is returned. On error, -1 is returned, and I is set " "appropriately." msgstr "" "成功した場合にはゼロが返される。エラー時には -1 が返され、 I が適切に" "設定される。" #. type: TP #: build/C/man2/bind.2:158 build/C/man2/bind.2:182 #: build/C/man3/bindresvport.3:77 build/C/man2/connect.2:135 #: build/C/man2/send.2:285 build/C/man2/socket.2:320 #, no-wrap msgid "B" msgstr "B" #. e.g., privileged port in AF_INET domain #. type: Plain text #: build/C/man2/bind.2:162 msgid "The address is protected, and the user is not the superuser." msgstr "そのアドレスは保護されていて、かつユーザがスーパーユーザではない。" #. type: TP #: build/C/man2/bind.2:162 build/C/man3/bindresvport.3:82 #: build/C/man2/connect.2:148 build/C/man2/listen.2:88 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/bind.2:165 msgid "The given address is already in use." msgstr "指定されたアドレスが既に使用中である。" #. type: Plain text #: build/C/man2/bind.2:169 msgid "I is not a valid descriptor." msgstr "I が不正なディスクリプタである。" #. This may change in the future: see #. .I linux/unix/sock.c for details. #. type: Plain text #: build/C/man2/bind.2:174 msgid "The socket is already bound to an address." msgstr "ソケットがすでにアドレスに結びつけ (bind) られている。" #. type: Plain text #: build/C/man2/bind.2:178 msgid "I is a descriptor for a file, not a socket." msgstr "" "I がファイルに対するディスクリプタで、ソケットに対するものではない。" #. type: Plain text #: build/C/man2/bind.2:182 msgid "The following errors are specific to UNIX domain (B) sockets:" msgstr "以下のエラーは UNIXドメイン (B) のソケット特有である:" #. type: Plain text #: build/C/man2/bind.2:187 msgid "" "Search permission is denied on a component of the path prefix. (See also " "B(7).)" msgstr "" "パス名の構成要素に検索許可 (search permission) がない (B" "(7) も参照すること)。" #. type: TP #: build/C/man2/bind.2:187 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/bind.2:191 msgid "" "A nonexistent interface was requested or the requested address was not local." msgstr "" "存在しないインタフェースが要求されたか、要求されたアドレスが ローカルではな" "かった。" #. type: Plain text #: build/C/man2/bind.2:195 msgid "I points outside the user's accessible address space." msgstr "I がユーザのアクセス可能なアドレス空間の外を指している。" #. type: Plain text #: build/C/man2/bind.2:202 msgid "" "The I is wrong, or the socket was not in the B family." msgstr "I が不正であるか、ソケットが B ファミリーではない。" #. type: TP #: build/C/man2/bind.2:202 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/bind.2:206 msgid "Too many symbolic links were encountered in resolving I." msgstr "I を解決する際に遭遇したシンボリック・リンクが多過ぎる。" #. type: TP #: build/C/man2/bind.2:206 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/bind.2:210 msgid "I is too long." msgstr "I が長過ぎる。" #. type: TP #: build/C/man2/bind.2:210 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/bind.2:213 msgid "The file does not exist." msgstr "ファイルが存在しない。" #. type: TP #: build/C/man2/bind.2:213 build/C/man2/recv.2:429 build/C/man2/select.2:322 #: build/C/man2/send.2:343 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/bind.2:216 msgid "Insufficient kernel memory was available." msgstr "カーネルに、利用可能なメモリーが十分にない。" #. type: TP #: build/C/man2/bind.2:216 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/bind.2:219 msgid "A component of the path prefix is not a directory." msgstr "パス名の構成要素がディレクトリではない。" #. type: TP #: build/C/man2/bind.2:219 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/bind.2:222 msgid "The socket inode would reside on a read-only file system." msgstr "ソケット inode が読み込み専用のファイルシステム上にある。" #. SVr4 documents an additional #. .B ENOSR #. general error condition, and #. additional #. .B EIO #. and #. .B EISDIR #. UNIX-domain error conditions. #. type: Plain text #: build/C/man2/bind.2:234 msgid "SVr4, 4.4BSD, POSIX.1-2001 (B() first appeared in 4.2BSD)." msgstr "SVr4, 4.4BSD, POSIX.1-2001 (B() は 4.2BSD で最初に現われた)。" #. type: Plain text #: build/C/man2/bind.2:251 msgid "" "The third argument of B() is in reality an I (and this is what 4." "x BSD and libc4 and libc5 have). Some POSIX confusion resulted in the " "present I, also used by glibc. See also B(2)." msgstr "" "B() の三番目の引き数は (4.x BSD や libc4, libc5 と同様に) 実際には " "I である。glibc でも使われている現在の I に関して、POSIX には" "少し混乱がある。 詳しくは B(2) を参照のこと。" #. type: SH #: build/C/man2/bind.2:251 build/C/man2/getsockopt.2:199 #: build/C/man2/select.2:474 build/C/man2/send.2:414 #: build/C/man3/sockatmark.3:93 build/C/man7/socket.7:834 #, no-wrap msgid "BUGS" msgstr "バグ" #. FIXME What *are* transparent proxy options? #. type: Plain text #: build/C/man2/bind.2:254 msgid "The transparent proxy options are not described." msgstr "透過的プロキシ (transparent proxy) オプションについて記述していない。" #. type: Plain text #: build/C/man2/bind.2:259 msgid "" "An example of the use of B() with Internet domain sockets can be " "found in B(3)." msgstr "" "インターネット・ドメイン・ソケットでの B() の利用例が B" "(3) に記載されている。" #. listen.7 refers to this example. #. accept.7 refers to this example. #. unix.7 refers to this example. #. type: Plain text #: build/C/man2/bind.2:266 msgid "" "The following example shows how to bind a stream socket in the UNIX " "(B) domain, and accept connections:" msgstr "" "以下の例は、UNIX ドメイン (B) でストリームソケットを bind する方法" "を示したものである。" #. type: Plain text #: build/C/man2/bind.2:273 #, no-wrap msgid "" "#include Esys/socket.hE\n" "#include Esys/un.hE\n" "#include Estdlib.hE\n" "#include Estdio.hE\n" "#include Estring.hE\n" msgstr "" "#include Esys/socket.hE\n" "#include Esys/un.hE\n" "#include Estdlib.hE\n" "#include Estdio.hE\n" "#include Estring.hE\n" #. type: Plain text #: build/C/man2/bind.2:276 #, no-wrap msgid "" "#define MY_SOCK_PATH \"/somepath\"\n" "#define LISTEN_BACKLOG 50\n" msgstr "" "#define MY_SOCK_PATH \"/somepath\"\n" "#define LISTEN_BACKLOG 50\n" #. type: Plain text #: build/C/man2/bind.2:279 #, no-wrap msgid "" "#define handle_error(msg) \\e\n" " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" msgstr "" "#define handle_error(msg) \\e\n" " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" #. type: Plain text #: build/C/man2/bind.2:286 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, cfd;\n" " struct sockaddr_un my_addr, peer_addr;\n" " socklen_t peer_addr_size;\n" msgstr "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int sfd, cfd;\n" " struct sockaddr_un my_addr, peer_addr;\n" " socklen_t peer_addr_size;\n" #. type: Plain text #: build/C/man2/bind.2:290 #, no-wrap msgid "" " sfd = socket(AF_UNIX, SOCK_STREAM, 0);\n" " if (sfd == -1)\n" " handle_error(\"socket\");\n" msgstr "" " sfd = socket(AF_UNIX, SOCK_STREAM, 0);\n" " if (sfd == -1)\n" " handle_error(\"socket\");\n" #. type: Plain text #: build/C/man2/bind.2:296 #, no-wrap msgid "" " memset(&my_addr, 0, sizeof(struct sockaddr_un));\n" " /* Clear structure */\n" " my_addr.sun_family = AF_UNIX;\n" " strncpy(my_addr.sun_path, MY_SOCK_PATH,\n" " sizeof(my_addr.sun_path) - 1);\n" msgstr "" " memset(&my_addr, 0, sizeof(struct sockaddr_un));\n" " /* Clear structure */\n" " my_addr.sun_family = AF_UNIX;\n" " strncpy(my_addr.sun_path, MY_SOCK_PATH,\n" " sizeof(my_addr.sun_path) - 1);\n" #. type: Plain text #: build/C/man2/bind.2:300 #, no-wrap msgid "" " if (bind(sfd, (struct sockaddr *) &my_addr,\n" " sizeof(struct sockaddr_un)) == -1)\n" " handle_error(\"bind\");\n" msgstr "" " if (bind(sfd, (struct sockaddr *) &my_addr,\n" " sizeof(struct sockaddr_un)) == -1)\n" " handle_error(\"bind\");\n" #. type: Plain text #: build/C/man2/bind.2:303 #, no-wrap msgid "" " if (listen(sfd, LISTEN_BACKLOG) == -1)\n" " handle_error(\"listen\");\n" msgstr "" " if (listen(sfd, LISTEN_BACKLOG) == -1)\n" " handle_error(\"listen\");\n" #. type: Plain text #: build/C/man2/bind.2:306 #, no-wrap msgid "" " /* Now we can accept incoming connections one\n" " at a time using accept(2) */\n" msgstr "" " /* Now we can accept incoming connections one\n" " at a time using accept(2) */\n" #. type: Plain text #: build/C/man2/bind.2:312 #, no-wrap msgid "" " peer_addr_size = sizeof(struct sockaddr_un);\n" " cfd = accept(sfd, (struct sockaddr *) &peer_addr,\n" " &peer_addr_size);\n" " if (cfd == -1)\n" " handle_error(\"accept\");\n" msgstr "" " peer_addr_size = sizeof(struct sockaddr_un);\n" " cfd = accept(sfd, (struct sockaddr *) &peer_addr,\n" " &peer_addr_size)\n" " if (cfd == -1)\n" " handle_error(\"accept\");\n" #. type: Plain text #: build/C/man2/bind.2:314 #, no-wrap msgid " /* Code to deal with incoming connection(s)... */\n" msgstr " /* Code to deal with incoming connection(s)... */\n" #. type: Plain text #: build/C/man2/bind.2:318 #, no-wrap msgid "" " /* When no longer required, the socket pathname, MY_SOCK_PATH\n" " should be deleted using unlink(2) or remove(3) */\n" "}\n" msgstr "" " /* When no longer required, the socket pathname, MY_SOCK_PATH\n" " should be deleted using unlink(2) or remove(3) */\n" "}\n" #. type: Plain text #: build/C/man2/bind.2:332 msgid "" "B(2), B(2), B(2), B(2), B(2), " "B(3), B(3), B(7), B(7), B" "(7), B(7), B(7)" msgstr "" "B(2), B(2), B(2), B(2), B(2), " "B(3), B(3), B(7), B(7), B" "(7), B(7), B(7)" #. type: TH #: build/C/man3/bindresvport.3:30 #, no-wrap msgid "BINDRESVPORT" msgstr "BINDRESVPORT" #. type: TH #: build/C/man3/bindresvport.3:30 build/C/man2/connect.2:67 #: build/C/man2/getsockname.2:40 build/C/man2/getsockopt.2:44 #: build/C/man3/sockatmark.3:25 #, no-wrap msgid "2008-12-03" msgstr "2008-12-03" #. type: Plain text #: build/C/man3/bindresvport.3:33 msgid "bindresvport - bind a socket to a privileged IP port" msgstr "bindresvport - ソケットを特権 IP ポートにバインドする" #. type: Plain text #: build/C/man3/bindresvport.3:37 #, no-wrap msgid "" "B<#include Esys/types.hE>\n" "B<#include Enetinet/in.hE>\n" msgstr "" "B<#include Esys/types.hE>\n" "B<#include Enetinet/in.hE>\n" #. type: Plain text #: build/C/man3/bindresvport.3:39 #, no-wrap msgid "BIB<, struct sockaddr_in *>IB<);>\n" msgstr "BIB<, struct sockaddr_in *>IB<);>\n" #. Glibc actually starts searching with a port # in the range 600 to 1023 #. type: Plain text #: build/C/man3/bindresvport.3:46 msgid "" "B() is used to bind a socket descriptor to a privileged " "anonymous IP port, that is, a port number arbitrarily selected from the " "range 512 to 1023." msgstr "" "B() は、ソケット・ディスクリプタを特権無名 (privileged " "anonymous) IP ポートに バインドするのに使う。特権無名 IP ポートとは、 ポート" "番号が 512 から 1023 の範囲から任意に選択されるポートである。" #. type: Plain text #: build/C/man3/bindresvport.3:56 msgid "" "If the B(2) performed by B() is successful, and I " "is not NULL, then Isin_port> returns the port number actually " "allocated." msgstr "" "B() によって実行された B(2) が成功し、 I が NULL " "以外の場合、実際に割り当てられたポート番号が Isin_port> に入れて返" "される。" #. type: Plain text #: build/C/man3/bindresvport.3:67 msgid "" "I can be NULL, in which case Isin_family> is implicitly taken " "to be B. However, in this case, B() has no way to " "return the port number actually allocated. (This information can later be " "obtained using B(2).)" msgstr "" "I には NULL を指定することもでき、その場合には Isin_family> は" "暗黙のうちに B とみなされる。 しかし、この場合には、 B" "() は実際に割り当てられたポート番号を返す手段を持たない (割り当てられたポー" "ト番号は、後で B(2) を使って取得できる)。" #. type: Plain text #: build/C/man3/bindresvport.3:72 msgid "" "B() returns 0 on success; otherwise -1 is returned and " "I set to indicate the cause of the error." msgstr "" "B() は成功すると 0 を返す。それ以外の場合、-1 を返し、 " "I にエラーの原因を示す値を設定する。" #. type: Plain text #: build/C/man3/bindresvport.3:77 msgid "" "B() can fail for any of the same reasons as B(2). In " "addition, the following errors may occur:" msgstr "" "B() は B(2) と同じ原因で失敗する可能性がある。 さらに、" "以下のエラーが発生することがある:" #. type: Plain text #: build/C/man3/bindresvport.3:82 msgid "" "The caller did not have superuser privilege (to be precise: the " "B capability is required)." msgstr "" "呼び出し元がスーパーユーザの特権を持っていなかった (より正確に言うと、 " "B ケーパビリティが必要である)。" #. type: Plain text #: build/C/man3/bindresvport.3:85 msgid "All privileged ports are in use." msgstr "全ての特権ポートが使用中である。" #. type: TP #: build/C/man3/bindresvport.3:85 #, no-wrap msgid "B (B in glibc 2.7 and earlier)" msgstr "B (glibc 2.7 以前では B)" #. type: Plain text #: build/C/man3/bindresvport.3:92 msgid "I is not NULL and Isin_family> is not B." msgstr "" "I が NULL 以外で、かつ Isin_family> が B でなかった。" #. type: Plain text #: build/C/man3/bindresvport.3:95 msgid "" "Not in POSIX.1-2001. Present on the BSDs, Solaris, and many other systems." msgstr "" "POSIX.1-2001 にはない。 BSD, Solaris およびその他の多くのシステムに存在する。" #. type: Plain text #: build/C/man3/bindresvport.3:101 msgid "" "Unlike some B() implementations, the glibc implementation " "ignores any value that the caller supplies in Isin_port>." msgstr "" "B() のいくつかの実装と異なり、glibc の実装では呼び出し元が " "Isin_port> で渡した値はどんな値であっても無視される。" #. type: Plain text #: build/C/man3/bindresvport.3:104 msgid "B(2), B(2)" msgstr "B(2), B(2)" #. type: TH #: build/C/man2/connect.2:67 #, no-wrap msgid "CONNECT" msgstr "CONNECT" #. type: Plain text #: build/C/man2/connect.2:70 msgid "connect - initiate a connection on a socket" msgstr "connect - ソケットの接続を行う" #. type: Plain text #: build/C/man2/connect.2:73 build/C/man2/getsockopt.2:50 #: build/C/man2/listen.2:51 #, no-wrap msgid "B<#include Esys/types.hE> /* See NOTES */\n" msgstr "B<#include Esys/types.hE> /* 「注意」参照 */\n" #. type: Plain text #: build/C/man2/connect.2:75 build/C/man2/getsockname.2:46 #: build/C/man2/getsockopt.2:52 build/C/man2/listen.2:53 #: build/C/man2/recv.2:51 #, no-wrap msgid "B<#include Esys/socket.hE>\n" msgstr "B<#include Esys/socket.hE>\n" #. type: Plain text #: build/C/man2/connect.2:78 #, no-wrap msgid "" "BIB<, const struct sockaddr *>IB<,>\n" "B< socklen_t >IB<);>\n" msgstr "" "BIB<, const struct sockaddr *>IB<,>\n" "B< socklen_t >IB<);>\n" #. type: Plain text #: build/C/man2/connect.2:97 msgid "" "The B() system call connects the socket referred to by the file " "descriptor I to the address specified by I. The I " "argument specifies the size of I. The format of the address in " "I is determined by the address space of the socket I; see " "B(2) for further details." msgstr "" "B() システムコールは、ファイルディスクリプタ I が参照してい" "るソケットを I で指定されたアドレスに接続する。 I 引き数は " "I の大きさを示す。 I のアドレスのフォーマットはソケット " "I のアドレス空間により異なる。 さらなる詳細は B(2) を参照の" "こと。" #. type: Plain text #: build/C/man2/connect.2:113 msgid "" "If the socket I is of type B then I is the address " "to which datagrams are sent by default, and the only address from which " "datagrams are received. If the socket is of type B or " "B, this call attempts to make a connection to the socket " "that is bound to the address specified by I." msgstr "" "ソケット I が B 型であれば、 I は、デフォルトのデー" "タグラムの送信先のアドレスであり、 データグラムを受信する唯一のアドレスを示す" "に過ぎない。 ソケットが B 型もしくは B 型であれ" "ば、このシステムコールは I で指定されたアドレスに結び付けられたソケット" "に対する接続の 作成を試みる。" #. type: Plain text #: build/C/man2/connect.2:127 msgid "" "Generally, connection-based protocol sockets may successfully B() " "only once; connectionless protocol sockets may use B() multiple " "times to change their association. Connectionless sockets may dissolve the " "association by connecting to an address with the I member of " "I set to B (supported on Linux since kernel 2.2)." msgstr "" "一般的に、接続指向 (connection-oriented) プロトコルでは一度だけ B" "() が成功する。 非接続 (connectionless) プロトコルでは対応を変更するために何" "度も B() を使用できる。 非接続ソケットは I の " "I メンバに B を設定することで、接続アドレスの対応を解消" "することができる (B はカーネル 2.2 以降の Linux でサポート)。" #. type: Plain text #: build/C/man2/connect.2:132 msgid "" "If the connection or binding succeeds, zero is returned. On error, -1 is " "returned, and I is set appropriately." msgstr "" "接続または対応づけに成功するとゼロを返す。 失敗すると -1 を返し、 I に" "適切な値を設定する。" #. type: Plain text #: build/C/man2/connect.2:135 msgid "" "The following are general socket errors only. There may be other domain-" "specific error codes." msgstr "" "以下は一般的なソケットについてのエラーである。他にドメイン特有のエラー が発生" "する可能性がある。" #. type: Plain text #: build/C/man2/connect.2:143 msgid "" "For UNIX domain sockets, which are identified by pathname: Write permission " "is denied on the socket file, or search permission is denied for one of the " "directories in the path prefix. (See also B(7).)" msgstr "" "UNIX ドメインソケットはパス名で識別される。 ソケット・ファイルへの書き込み許" "可がなかったか、パス名へ 到達するまでのディレクトリのいずれかに対する検索許可" "がなかった。 (B(7) も参照のこと)" #. type: TP #: build/C/man2/connect.2:143 #, no-wrap msgid "B, B" msgstr "B, B" #. type: Plain text #: build/C/man2/connect.2:148 msgid "" "The user tried to connect to a broadcast address without having the socket " "broadcast flag enabled or the connection request failed because of a local " "firewall rule." msgstr "" "ソケットのブロードキャスト・フラグが有効になっていないのに ユーザがブロード" "キャストへ接続を試みた。または、ローカルのファイアウォールの 規則により接続の" "要求が失敗した。" #. type: Plain text #: build/C/man2/connect.2:151 msgid "Local address is already in use." msgstr "ローカルアドレスが既に使用されている。" #. type: TP #: build/C/man2/connect.2:151 build/C/man2/socket.2:324 #: build/C/man2/socketpair.2:75 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/connect.2:156 msgid "" "The passed address didn't have the correct address family in its " "I field." msgstr "" "渡されたアドレスの I フィールドが正しいアドレス・ファミリーではな" "い。" #. type: TP #: build/C/man2/connect.2:156 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/connect.2:165 msgid "" "No more free local ports or insufficient entries in the routing cache. For " "B see the description of I " "B(7) for information on how to increase the number of local ports." msgstr "" "使用可能なローカルのポートがないか、 ルーティングキャッシュに十分なエントリが" "ない。 B の場合に、ローカルポートの数を増やす方法については、 B" "(7) の I の説明を参照のこと。" #. type: TP #: build/C/man2/connect.2:165 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/connect.2:169 msgid "" "The socket is nonblocking and a previous connection attempt has not yet been " "completed." msgstr "" "ソケットが非停止 (nonblocking) に設定されており、 前の接続が完了していない。" #. type: Plain text #: build/C/man2/connect.2:172 msgid "The file descriptor is not a valid index in the descriptor table." msgstr "" "ファイルディスクリプターがディスクリプターテーブルの 有効なインデックスではな" "い。" #. type: TP #: build/C/man2/connect.2:172 build/C/man2/recv.2:412 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/connect.2:175 msgid "No-one listening on the remote address." msgstr "リモートアドレスで接続を待っているプログラムがない。" #. type: Plain text #: build/C/man2/connect.2:178 msgid "The socket structure address is outside the user's address space." msgstr "ソケット構造体のアドレスがユーザーのアドレス空間外にある。" #. type: TP #: build/C/man2/connect.2:178 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/connect.2:203 msgid "" "The socket is nonblocking and the connection cannot be completed " "immediately. It is possible to B(2) indicates " "writability, use B(2) to read the B option at level " "B to determine whether B() completed successfully " "(B is zero) or unsuccessfully (B is one of the usual " "error codes listed here, explaining the reason for the failure)." msgstr "" "ソケットが非停止 (nonblocking) に設定されていて、接続をすぐに 完了することが" "できない。その場合、 B(2) " "で書き込み可能になった後に、 B(2) を使って B レベル" "で B オプションを読み出すこ とにより、 B() が成功したか、" "失敗したかを判断できる。 成功の場合 B が 0 であり、 失敗の場合 " "B がここのリストにあるいずれかのエラーコードであり、 それにより失敗" "の原因が分かる。" #. For TCP, the connection will complete asynchronously. #. See http://lkml.org/lkml/2005/7/12/254 #. type: Plain text #: build/C/man2/connect.2:209 msgid "" "The system call was interrupted by a signal that was caught; see B" "(7)." msgstr "" "捕捉されたシグナルによりシステムコールが中断された。 B(7) 参照。" #. type: TP #: build/C/man2/connect.2:209 build/C/man2/send.2:323 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/connect.2:212 msgid "The socket is already connected." msgstr "ソケットは既に接続 (connect) されている。" #. type: TP #: build/C/man2/connect.2:212 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/connect.2:215 msgid "Network is unreachable." msgstr "到達できないネットワークである。" #. type: Plain text #: build/C/man2/connect.2:218 msgid "The file descriptor is not associated with a socket." msgstr "ファイルディスクリプターがソケットと関連付けられていない。" #. type: TP #: build/C/man2/connect.2:218 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/connect.2:225 msgid "" "Timeout while attempting connection. The server may be too busy to accept " "new connections. Note that for IP sockets the timeout may be very long when " "syncookies are enabled on the server." msgstr "" "接続を試みている途中で時間切れ (timeout) になった。サーバーが混雑していて 新" "たな接続を受け入れられないのかもしれない。 IP ソケットでは、 syncookie がサー" "バーで有効になっている場合、 タイムアウトが非常に長くなる場合があるので注意す" "ること。" #. SVr4 documents the additional #. general error codes #. .BR EADDRNOTAVAIL , #. .BR EINVAL , #. .BR EAFNOSUPPORT , #. .BR EALREADY , #. .BR EINTR , #. .BR EPROTOTYPE , #. and #. .BR ENOSR . #. It also #. documents many additional error conditions not described here. #. type: Plain text #: build/C/man2/connect.2:241 msgid "" "SVr4, 4.4BSD, (the B() function first appeared in 4.2BSD), " "POSIX.1-2001." msgstr "" "SVr4, 4.4BSD, (B() 関数は 4.2BSD で最初に登場した), POSIX.1-2001." #. type: Plain text #: build/C/man2/connect.2:258 msgid "" "The third argument of B() is in reality an I (and this is " "what 4.x BSD and libc4 and libc5 have). Some POSIX confusion resulted in " "the present I, also used by glibc. See also B(2)." msgstr "" "B() の三番目の引き数は 4.x BSD や libc4, libc5 と同様に実際には " "I である。 POSIX では紆余曲折を経て現在の I になっており、 " "glibc でも I を使っている。 B(2) も参照のこと。" #. type: Plain text #: build/C/man2/connect.2:263 msgid "An example of the use of B() is shown in B(3)." msgstr "B() の利用例が B(3) に記載されている。" #. type: Plain text #: build/C/man2/connect.2:270 msgid "" "B(2), B(2), B(2), B(2), B(2), " "B(7)" msgstr "" "B(2), B(2), B(2), B(2), B(2), " "B(7)" #. type: TH #: build/C/man3/getifaddrs.3:36 #, no-wrap msgid "GETIFADDRS" msgstr "GETIFADDRS" #. type: TH #: build/C/man3/getifaddrs.3:36 #, fuzzy, no-wrap #| msgid "2011-10-01" msgid "2012-11-11" msgstr "2011-10-01" #. type: TH #: build/C/man3/getifaddrs.3:36 build/C/man3/if_nameindex.3:26 #: build/C/man3/if_nametoindex.3:25 #, no-wrap msgid "GNU" msgstr "GNU" #. type: Plain text #: build/C/man3/getifaddrs.3:39 msgid "getifaddrs, freeifaddrs - get interface addresses" msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:43 #, no-wrap msgid "" "B<#include Esys/types.hE>\n" "B<#include Eifaddrs.hE>\n" msgstr "" "B<#include Esys/types.hE>\n" "B<#include Eifaddrs.hE>\n" #. type: Plain text #: build/C/man3/getifaddrs.3:45 #, no-wrap msgid "BIB<);>\n" msgstr "BIB<);>\n" #. type: Plain text #: build/C/man3/getifaddrs.3:47 #, no-wrap msgid "BIB<);>\n" msgstr "BIB<);>\n" #. type: Plain text #: build/C/man3/getifaddrs.3:58 msgid "" "The B() function creates a linked list of structures describing " "the network interfaces of the local system, and stores the address of the " "first item of the list in I<*ifap>. The list consists of I " "structures, defined as follows:" msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:77 #, no-wrap msgid "" "struct ifaddrs {\n" " struct ifaddrs *ifa_next; /* Next item in list */\n" " char *ifa_name; /* Name of interface */\n" " unsigned int ifa_flags; /* Flags from SIOCGIFFLAGS */\n" " struct sockaddr *ifa_addr; /* Address of interface */\n" " struct sockaddr *ifa_netmask; /* Netmask of interface */\n" " union {\n" " struct sockaddr *ifu_broadaddr;\n" " /* Broadcast address of interface */\n" " struct sockaddr *ifu_dstaddr;\n" " /* Point-to-point destination address */\n" " } ifa_ifu;\n" "#define ifa_broadaddr ifa_ifu.ifu_broadaddr\n" "#define ifa_dstaddr ifa_ifu.ifu_dstaddr\n" " void *ifa_data; /* Address-specific data */\n" "};\n" msgstr "" "struct ifaddrs {\n" " struct ifaddrs *ifa_next; /* Next item in list */\n" " char *ifa_name; /* Name of interface */\n" " unsigned int ifa_flags; /* Flags from SIOCGIFFLAGS */\n" " struct sockaddr *ifa_addr; /* Address of interface */\n" " struct sockaddr *ifa_netmask; /* Netmask of interface */\n" " union {\n" " struct sockaddr *ifu_broadaddr;\n" " /* Broadcast address of interface */\n" " struct sockaddr *ifu_dstaddr;\n" " /* Point-to-point destination address */\n" " } ifa_ifu;\n" "#define ifa_broadaddr ifa_ifu.ifu_broadaddr\n" "#define ifa_dstaddr ifa_ifu.ifu_dstaddr\n" " void *ifa_data; /* Address-specific data */\n" "};\n" #. type: Plain text #: build/C/man3/getifaddrs.3:84 msgid "" "The I field contains a pointer to the next structure on the list, " "or NULL if this is the last item of the list." msgstr "" #. The constant #. .B IF NAMESIZE #. indicates the maximum length of this field. #. type: Plain text #: build/C/man3/getifaddrs.3:91 msgid "The I points to the null-terminated interface name." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:100 msgid "" "The I field contains the interface flags, as returned by the " "B B(2) operation (see B(7) for a list of " "these flags)." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:109 msgid "" "The I field points to a structure containing the interface " "address. (The I subfield should be consulted to determine the " "format of the address structure.) This field may contain a NULL pointer." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:116 msgid "" "The I field points to a structure containing the netmask " "associated with I, if applicable for the address family. This " "field may contain a NULL pointer." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:131 msgid "" "Depending on whether the bit B or B is set " "in I (only one can be set at a time), either I " "will contain the broadcast address associated with I (if " "applicable for the address family) or I will contain the " "destination address of the point-to-point interface." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:136 msgid "" "The I field points to a buffer containing address-family-specific " "data; this field may be NULL if there is no such data for this interface." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:142 msgid "" "The data returned by B() is dynamically allocated and should be " "freed using B() when no longer needed." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:149 msgid "" "On success, B() returns zero; on error, -1 is returned, and " "I is set appropriately." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:162 msgid "" "B() may fail and set I for any of the errors specified " "for B(2), B(2), B(2), B(2), B" "(2), B(3), or B(3)." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:170 msgid "" "The B() function first appeared in glibc 2.3, but before glibc " "2.3.3, the implementation only supported IPv4 addresses; IPv6 support was " "added in glibc 2.3.3. Support of address families other than IPv4 is only " "available on kernels that support netlink." msgstr "" #. , but the BSD-derived documentation generally #. appears to be confused and obsolete on this point. #. i.e., commonly it still says one of them will be NULL, even if #. the ifa_ifu union is already present #. type: Plain text #: build/C/man3/getifaddrs.3:190 msgid "" "Not in POSIX.1-2001. This function first appeared in BSDi and is present on " "the BSD systems, but with slightly different semantics documented" "\\(emreturning one entry per interface, not per address. This means " "I and other fields can actually be NULL if the interface has no " "address, and no link-level address is returned if the interface has an IP " "address assigned. Also, the way of choosing either I or " "I differs on various systems." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:207 msgid "" "The addresses returned on Linux will usually be the IPv4 and IPv6 addresses " "assigned to the interface, but also one B address per interface " "containing lower-level details about the interface and its physical layer. " "In this case, the I field may contain a pointer to a I, defined in Ilinux/if_link.hE> (in Linux 2.4 and " "earlier, I, defined in Ilinux/netdevice." "hE>), which contains various interface attributes and statistics." msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:214 msgid "" "The program below demonstrates the use of B(), B(), " "and B(3). Here is what we see when running this program on one " "system:" msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:228 #, no-wrap msgid "" "$ B<./a.out>\n" "lo address family: 17 (AF_PACKET)\n" "eth0 address family: 17 (AF_PACKET)\n" "lo address family: 2 (AF_INET)\n" " address: E127.0.0.1E\n" "eth0 address family: 2 (AF_INET)\n" " address: E10.1.1.4E\n" "lo address family: 10 (AF_INET6)\n" " address: E::1E\n" "eth0 address family: 10 (AF_INET6)\n" " address: Efe80::2d0:59ff:feda:eb51%eth0E\n" msgstr "" "$ B<./a.out>\n" "lo address family: 17 (AF_PACKET)\n" "eth0 address family: 17 (AF_PACKET)\n" "lo address family: 2 (AF_INET)\n" " address: E127.0.0.1E\n" "eth0 address family: 2 (AF_INET)\n" " address: E10.1.1.4E\n" "lo address family: 10 (AF_INET6)\n" " address: E::1E\n" "eth0 address family: 10 (AF_INET6)\n" " address: Efe80::2d0:59ff:feda:eb51%eth0E\n" #. type: SS #: build/C/man3/getifaddrs.3:230 build/C/man3/if_nameindex.3:120 #: build/C/man2/recvmmsg.2:206 #, no-wrap msgid "Program source" msgstr "" #. type: Plain text #: build/C/man3/getifaddrs.3:240 #, no-wrap msgid "" "#include Earpa/inet.hE\n" "#include Esys/socket.hE\n" "#include Enetdb.hE\n" "#include Eifaddrs.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" msgstr "" "#include Earpa/inet.hE\n" "#include Esys/socket.hE\n" "#include Enetdb.hE\n" "#include Eifaddrs.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" #. type: Plain text #: build/C/man3/getifaddrs.3:247 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " struct ifaddrs *ifaddr, *ifa;\n" " int family, s;\n" " char host[NI_MAXHOST];\n" msgstr "" "int\n" "main(int argc, char *argv[])\n" "{\n" " struct ifaddrs *ifaddr, *ifa;\n" " int family, s;\n" " char host[NI_MAXHOST];\n" #. type: Plain text #: build/C/man3/getifaddrs.3:252 #, no-wrap msgid "" " if (getifaddrs(&ifaddr) == -1) {\n" " perror(\"getifaddrs\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (getifaddrs(&ifaddr) == -1) {\n" " perror(\"getifaddrs\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: build/C/man3/getifaddrs.3:255 #, no-wrap msgid "" " /* Walk through linked list, maintaining head pointer so we\n" " can free list later */\n" msgstr "" " /* Walk through linked list, maintaining head pointer so we\n" " can free list later */\n" #. type: Plain text #: build/C/man3/getifaddrs.3:259 #, no-wrap msgid "" " for (ifa = ifaddr; ifa != NULL; ifa = ifa-Eifa_next) {\n" " if (ifa-Eifa_addr == NULL)\n" " continue;\n" msgstr "" " for (ifa = ifaddr; ifa != NULL; ifa = ifa-Eifa_next) {\n" " if (ifa-Eifa_addr == NULL)\n" " continue;\n" #. type: Plain text #: build/C/man3/getifaddrs.3:261 #, no-wrap msgid " family = ifa-Eifa_addr-Esa_family;\n" msgstr " family = ifa-Eifa_addr-Esa_family;\n" #. type: Plain text #: build/C/man3/getifaddrs.3:264 #, no-wrap msgid "" " /* Display interface name and family (including symbolic\n" " form of the latter for the common families) */\n" msgstr "" " /* Display interface name and family (including symbolic\n" " form of the latter for the common families) */\n" #. type: Plain text #: build/C/man3/getifaddrs.3:270 #, no-wrap msgid "" " printf(\"%s\\t address family: %d%s\\en\",\n" " ifa-Eifa_name, family,\n" " (family == AF_PACKET) ? \" (AF_PACKET)\" :\n" " (family == AF_INET) ? \" (AF_INET)\" :\n" " (family == AF_INET6) ? \" (AF_INET6)\" : \"\");\n" msgstr "" " printf(\"%s\\t address family: %d%s\\en\",\n" " ifa-Eifa_name, family,\n" " (family == AF_PACKET) ? \" (AF_PACKET)\" :\n" " (family == AF_INET) ? \" (AF_INET)\" :\n" " (family == AF_INET6) ? \" (AF_INET6)\" : \"\");\n" #. type: Plain text #: build/C/man3/getifaddrs.3:272 #, no-wrap msgid " /* For an AF_INET* interface address, display the address */\n" msgstr " /* For an AF_INET* interface address, display the address */\n" #. type: Plain text #: build/C/man3/getifaddrs.3:285 #, no-wrap msgid "" " if (family == AF_INET || family == AF_INET6) {\n" " s = getnameinfo(ifa-Eifa_addr,\n" " (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" " sizeof(struct sockaddr_in6),\n" " host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);\n" " if (s != 0) {\n" " printf(\"getnameinfo() failed: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"\\etaddress: E%sE\\en\", host);\n" " }\n" " }\n" msgstr "" " if (family == AF_INET || family == AF_INET6) {\n" " s = getnameinfo(ifa-Eifa_addr,\n" " (family == AF_INET) ? sizeof(struct sockaddr_in) :\n" " sizeof(struct sockaddr_in6),\n" " host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);\n" " if (s != 0) {\n" " printf(\"getnameinfo() failed: %s\\en\", gai_strerror(s));\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"\\etaddress: E%sE\\en\", host);\n" " }\n" " }\n" #. type: Plain text #: build/C/man3/getifaddrs.3:289 #, no-wrap msgid "" " freeifaddrs(ifaddr);\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" " freeifaddrs(ifaddr);\n" " exit(EXIT_SUCCESS);\n" "}\n" #. type: Plain text #: build/C/man3/getifaddrs.3:296 msgid "" "B(2), B(2), B(2), B(7), B(8)" msgstr "" "B(2), B(2), B(2), B(7), B(8)" #. type: TH #: build/C/man2/getsockname.2:40 #, no-wrap msgid "GETSOCKNAME" msgstr "GETSOCKNAME" #. type: Plain text #: build/C/man2/getsockname.2:43 msgid "getsockname - get socket name" msgstr "getsockname - ソケットの名前を取得する" #. type: Plain text #: build/C/man2/getsockname.2:49 #, no-wrap msgid "BIB<, struct sockaddr *>IB<, socklen_t *>IB<);>\n" msgstr "BIB<, struct sockaddr *>IB<, socklen_t *>IB<);>\n" #. type: Plain text #: build/C/man2/getsockname.2:62 msgid "" "B() returns the current address to which the socket I " "is bound, in the buffer pointed to by I. The I argument " "should be initialized to indicate the amount of space (in bytes) pointed to " "by I. On return it contains the actual size of the socket address." msgstr "" "B() は、ソケット I に結び付けられている現在のアドレス" "を、 I が指すバッファに格納して返す。 I 引き数は、 I が" "指している領域のサイズ (バイト単位) に初期化しておかなければならない。 関数が" "返る時には、 I にはソケットアドレスの実際のサイズ (バイト単位) が格" "納される。" #. type: Plain text #: build/C/man2/getsockname.2:78 build/C/man2/getsockopt.2:142 #: build/C/man2/listen.2:96 msgid "The argument I is not a valid descriptor." msgstr "引き数 I は有効なディスクリプターでない。" #. type: Plain text #: build/C/man2/getsockname.2:84 msgid "" "The I argument points to memory not in a valid part of the process " "address space." msgstr "" "引き数 I の指しているメモリがプロセスのアドレス空間の有効な部分ではな" "い。" #. type: Plain text #: build/C/man2/getsockname.2:88 msgid "I is invalid (e.g., is negative)." msgstr "I が不正である (例えば、負で場合など)。" #. type: TP #: build/C/man2/getsockname.2:88 build/C/man3/if_nameindex.3:83 #: build/C/man2/send.2:335 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man2/getsockname.2:92 msgid "" "Insufficient resources were available in the system to perform the operation." msgstr "処理をするだけの十分なリソースがシステムに無い。" #. type: Plain text #: build/C/man2/getsockname.2:97 build/C/man2/getsockopt.2:171 msgid "The argument I is a file, not a socket." msgstr "引き数 I がソケットではなくファイルである。" #. SVr4 documents additional ENOMEM #. and ENOSR error codes. #. type: Plain text #: build/C/man2/getsockname.2:103 msgid "" "SVr4, 4.4BSD (the B() function call appeared in 4.2BSD), " "POSIX.1-2001." msgstr "" "SVr4, 4.4BSD (B() 関数は 4.2BSD で追加された), POSIX.1-2001." #. type: Plain text #: build/C/man2/getsockname.2:112 msgid "" "The third argument of B() is in reality an I (and this " "is what 4.x BSD and libc4 and libc5 have). Some POSIX confusion resulted in " "the present I, also used by glibc. See also B(2)." msgstr "" "B() の三番目の引き数は (4.x BSD や libc4, libc5 と同様に) 実際" "には I である。 glibc でも使われている現在の I に関して、 " "POSIX には少し混乱がある。 詳しくは B(2) を参照のこと。" #. type: Plain text #: build/C/man2/getsockname.2:119 msgid "" "B(2), B(2), B(3), B(7), B(7), B" "(7)" msgstr "" "B(2), B(2), B(3), B(7), B(7), B" "(7)" #. type: TH #: build/C/man2/getsockopt.2:44 #, no-wrap msgid "GETSOCKOPT" msgstr "GETSOCKOPT" #. type: Plain text #: build/C/man2/getsockopt.2:47 msgid "getsockopt, setsockopt - get and set options on sockets" msgstr "getsockopt, setsockopt - ソケットのオプションの設定と取得を行なう" #. type: Plain text #: build/C/man2/getsockopt.2:57 #, no-wrap msgid "" "BIB<, int >IB<, int >IB<,>\n" "B< void *>IB<, socklen_t *>IB<);>\n" "BIB<, int >IB<, int >IB<,>\n" "B< const void *>IB<, socklen_t >IB<);>\n" msgstr "" "BIB<, int >IB<, int >IB<,>\n" "B< void *>IB<, socklen_t *>IB<);>\n" "BIB<, int >IB<, int >IB<,>\n" "B< const void *>IB<, socklen_t >IB<);>\n" #. type: Plain text #: build/C/man2/getsockopt.2:67 msgid "" "B() and B() manipulate options for the socket " "referred to by the file descriptor I. Options may exist at multiple " "protocol levels; they are always present at the uppermost socket level." msgstr "" "B() と B() は、ファイルディスクリプタ I で" "参照されるソケットに関連するオプションの操作を行う。 オプションは複数のプロト" "コル層(level)に存在するかもしれないが、 これらは常に最上位のソケット層へと設" "定される。" #. type: Plain text #: build/C/man2/getsockopt.2:86 msgid "" "When manipulating socket options, the level at which the option resides and " "the name of the option must be specified. To manipulate options at the " "sockets API level, I is specified as B. To manipulate " "options at any other level the protocol number of the appropriate protocol " "controlling the option is supplied. For example, to indicate that an option " "is to be interpreted by the B protocol, I should be set to the " "protocol number of B; see B(3)." msgstr "" "ソケット・オプションを操作する際には、オプションの層 (level) と オプションの" "名前を指定しなければならない。 ソケット API 層でオプションを操作する為には、 " "I を B に指定する。 他の全ての層でオプションを操作する為に" "は、与えられたオプションの 制御主体となるプロトコルのプロトコル番号を指定す" "る。例えば、 オプションが B プロトコルで解釈されるべきことを指示するに" "は、 I に B のプロトコル番号を指定しなければならない。 " "B(3) を参照すること。" #. type: Plain text #: build/C/man2/getsockopt.2:108 msgid "" "The arguments I and I are used to access option values for " "B(). For B() they identify a buffer in which the " "value for the requested option(s) are to be returned. For B(), " "I is a value-result argument, initially containing the size of the " "buffer pointed to by I, and modified on return to indicate the " "actual size of the value returned. If no option value is to be supplied or " "returned, I may be NULL." msgstr "" "I と I 引き数は B() のオプションの値にアクセスす" "るために用いられる。 B() では要求したオプションの値を返すための" "バッファーを指定する。 B() では I は値と結果両用の引き数" "で、最初に I の指しているバッファーのサイズを与え、実際に返される値の" "サイズに 書き換えられる。もしオプション値を与えず、返されもしない場合には " "I は NULL でも良い。" #. type: Plain text #: build/C/man2/getsockopt.2:118 msgid "" "I and any specified options are passed uninterpreted to the " "appropriate protocol module for interpretation. The include file Isys/" "socket.hE> contains definitions for socket level options, described " "below. Options at other protocol levels vary in format and name; consult " "the appropriate entries in section 4 of the manual." msgstr "" "I および指定されたオプションは解釈されずに、適切なプロトコル・モ" "ジュールに 渡されて解釈される。インクルード・ファイル Isys/socket." "hE> には後述のソケット層のオプションの定義が含まれている。 他のプロトコル" "層では名前や形式は異なる。 マニュアルのセクション 4 の適切なエントリを参照す" "ること。" #. type: Plain text #: build/C/man2/getsockopt.2:127 msgid "" "Most socket-level options utilize an I argument for I. For " "B(), the argument should be nonzero to enable a boolean option, " "or zero if the option is to be disabled." msgstr "" "ほとんどのソケット層のオプションは I に I 引き数を利用する。 " "B() で、二値(boolean)オプションを有効(enable)にするにはゼロ以外" "を指定し、 無効(disable)にするにはゼロを指定する。" #. type: Plain text #: build/C/man2/getsockopt.2:131 msgid "" "For a description of the available socket options see B(7) and the " "appropriate protocol man pages." msgstr "" "利用可能なソケットオプションの説明に関しては、 B(7) と適切なプロトコ" "ルの man ページを参照のこと。" #. type: Plain text #: build/C/man2/getsockopt.2:152 msgid "" "The address pointed to by I is not in a valid part of the process " "address space. For B(), this error may also be returned if " "I is not in a valid part of the process address space." msgstr "" "I で指定されたアドレスがプロセスのアドレス空間の有効な部分ではない。 " "B() の場合、 I がプロセスのアドレス空間の有効な部分でな" "い場合にもこのエラーが返される。" #. type: Plain text #: build/C/man2/getsockopt.2:163 msgid "" "I invalid in B(). In some cases this error can also " "occur for an invalid value in I (e.g., for the B " "option described in B(7))." msgstr "" "B() で I