2 .\" Don't change the first line, it tells man that we need tbl.
3 .\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
4 .\" and copyright (c) 1999 Matthew Wilcox.
5 .\" Permission is granted to distribute possibly modified copies
6 .\" of this page provided the header is included verbatim,
7 .\" and in case of nontrivial modification author and date
8 .\" of the modification is added to the header.
10 .\" 2002-10-30, Michael Kerrisk, <mtk.manpages@gmail.com>
11 .\" Added description of SO_ACCEPTCONN
12 .\" 2004-05-20, aeb, added SO_RCVTIMEO/SO_SNDTIMEO text.
13 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
14 .\" Added notes on capability requirements
15 .\" A few small grammar fixes
17 .\" The following are not yet documented:
22 .\" SO_PROTOCOL (2.6.32)
23 .\" SO_DOMAIN (2.6.32)
24 .\" SO_RXQ_OVFL (2.6.33)
26 .\" Japanese Version Copyright (c) 1999 NAKANO Takeo all rights reserved.
27 .\" Translated 1999-12-06, NAKANO Takeo <nakano@apm.seikei.ac.jp>
28 .\" Updated 2003-01-20, Akihiro Motoki <amotoki@dd.iij4u.or.jp>
29 .\" Updated 2005-02-23, Akihiro MOTOKI
30 .\" Updated 2005-10-05, Akihiro MOTOKI
31 .\" Updated 2005-12-05, Akihiro MOTOKI, Catch up to LDP man-pages 2.16
32 .\" Updated 2005-12-26, Akihiro MOTOKI, Catch up to LDP man-pages 2.18
33 .\" Updated 2006-04-15, Akihiro MOTOKI, Catch up to LDP man-pages 2.29
34 .\" Updated 2007-01-05, Akihiro MOTOKI, Catch up to LDP man-pages 2.43
36 .\"WORD protocol family プロトコルファミリー
37 .\"WORD socket type ソケットタイプ
38 .\"WORD file descriptor ファイルディスクリプタ
39 .\"WORD anonymous socket 名前無しソケット
40 .\"WORD asynchronous 非同期 (的)
41 .\"WORD credential 信任状
43 .\"WORD ancillary data 補助データ
45 .TH SOCKET 7 2008-12-03 Linux "Linux Programmer's Manual"
48 .\"O socket \- Linux socket interface
49 socket \- Linux のソケットインターフェース
52 .B #include <sys/socket.h>
54 .IB sockfd " = socket(int " socket_family ", int " socket_type ", int " protocol );
57 .\"O This manual page describes the Linux networking socket layer user
59 .\"O The BSD compatible sockets
60 .\"O are the uniform interface
61 .\"O between the user process and the network protocol stacks in the kernel.
62 .\"O The protocol modules are grouped into
63 .\"O .I protocol families
65 .\"O .BR AF_INET ", " AF_IPX ", " AF_PACKET
74 .\"O for more information on families and types.
75 このマニュアルページは Linux ネットワークのソケット層に対する
76 ユーザインターフェースを記述するものである。
77 BSD 互換ソケットは、ユーザプロセスとカーネル内部の
79 統一的なインターフェースを提供するものである。
81 .I "プロトコルファミリー (protocol familiy)"
83 .BR AF_INET ", " AF_IPX ", " AF_PACKET )
85 .I "ソケットタイプ (socket types)"
87 .BR SOCK_STREAM ", " SOCK_DGRAM )
92 .\"O .SS Socket Layer Functions
94 .\"O These functions are used by the user process to send or receive packets
95 .\"O and to do other socket operations.
96 .\"O For more information see their respective manual pages.
97 これらの関数はユーザプロセスがパケットを送受信したり、その他のソケット操作を
98 行ったりするために用いられる。詳細はそれぞれのマニュアルページを
102 .\"O creates a socket,
104 .\"O connects a socket to a remote socket address,
107 .\"O function binds a socket to a local socket address,
109 .\"O tells the socket that new connections shall be accepted, and
111 .\"O is used to get a new socket with a new incoming connection.
112 .\"O .BR socketpair (2)
113 .\"O returns two connected anonymous sockets (only implemented for a few
114 .\"O local families like
119 はソケットをリモートのソケットアドレスに接続する。
121 はソケットをローカルのソケットアドレスにバインドする。
123 はソケットに新しい接続が来たら受信するように伝え、
125 は外部からやってきた接続に対して新しいソケットを得るために用いられる。
127 は互いに接続された二つの名前無しソケット (anonymous socket) を返す
129 のような、いくつかのローカルなファミリーでしか実装されていない)。
135 .\"O send data over a socket, and
137 .\"O .BR recvfrom (2),
139 .\"O receive data from a socket.
143 .\"O wait for arriving data or a readiness to send data.
144 .\"O In addition, the standard I/O operations like
147 .\"O .BR sendfile (2),
151 .\"O can be used to read and write data.
163 はデータの到着を待ったり、データ送信の準備ができるまで待ったりする。
170 のような標準的な I/O 操作もデータの読み書きに用いることができる。
172 .\"O .BR getsockname (2)
173 .\"O returns the local socket address and
174 .\"O .BR getpeername (2)
175 .\"O returns the remote socket address.
176 .\"O .BR getsockopt (2)
178 .\"O .BR setsockopt (2)
179 .\"O are used to set or get socket layer or protocol options.
181 .\"O can be used to set or read some other options.
182 .BR getsockbyname (2)
189 はソケット層のオプションやプロトコルオプションの取得・設定に用いられる。
195 .\"O is used to close a socket.
196 .\"O .BR shutdown (2)
197 .\"O closes parts of a full-duplex socket connection.
201 は全二重なソケット接続を部分的にクローズする。
203 .\"O Seeking, or calling
207 .\"O with a nonzero position is not supported on sockets.
214 .\"O It is possible to do nonblocking I/O on sockets by setting the
216 .\"O flag on a socket file descriptor using
218 .\"O Then all operations that would block will (usually)
221 .\"O (operation should be retried later);
222 非ブロッキングな I/O をソケットで行うことは可能で、
224 を使ってソケットのファイルディスクリプタに
227 こうするとブロックされる操作は、 (通常)
230 (後で処理が再試行されることが期待されている)。
239 .\"O The user can then wait for various events via
254 .\"O Event:Poll flag:Occurrence
257 .\"O New data arrived.
263 .\"O A connection setup has been completed
264 .\"O (for connection-oriented sockets)
271 .\"O A disconnection request has been initiated by the other end.
277 .\"O A connection is broken (only for connection-oriented protocols).
278 .\"O When the socket is written
283 接続が壊れた (接続志向のプロトコルのみ)。
288 .\"O Write:POLLOUT:T{
289 .\"O Socket has enough send buffer space for writing new data.
313 .\"O Read/Write:POLLERR:An asynchronous error occurred.
314 Read/Write:POLLERR:T{
315 非同期的 (asynchronous) なエラーが起こった。
317 .\"O Read/Write:POLLHUP:The other end has shut down one direction.
318 Read/Write:POLLHUP:接続先が片方向を切断した。
319 .\"O Exception:POLLPRI:T{
320 .\"O Urgent data arrived.
325 緊急データ (urgent data) が到着した。
330 .\" FIXME . The following is not true currently:
331 .\" It is no I/O event when the connection
332 .\" is broken from the local end using
339 .\"O An alternative to
343 .\"O is to let the kernel inform the application about events
349 .\"O flag must be set on a socket file descriptor via
351 .\"O and a valid signal handler for
353 .\"O must be installed via
354 .\"O .BR sigaction (2).
357 .\"O discussion below.
361 を使う代わりに、カーネルからアプリケーションに
367 を用いてソケットのファイルディスクリプタに
377 .\"O .SS Socket Options
379 .\"O These socket options can be set by using
380 .\"O .BR setsockopt (2)
382 .\"O .BR getsockopt (2)
383 .\"O with the socket level set to
385 .\"O for all sockets:
395 .\"O .\" SO_ACCEPTCONN is in POSIX.1-2001, and its origin is explained in
396 .\"O .\" W R Stevens, UNPv1
397 .\" SO_ACCEPTCONN は POSIX.1-2001 で定義されており、元は
398 .\" W R Stevens の UNPv1 に書かれていた。
401 .\"O Returns a value indicating whether or not this socket has been marked
402 .\"O to accept connections with
404 .\"O The value 0 indicates that this is not a listening socket,
405 .\"O the value 1 indicates that this is a listening socket.
406 .\"O Can only be read
408 .\"O .BR getsockopt (2).
411 によって接続待ち受け状態に設定されているかどうかを示す値を返す。
412 値 0 は listen 状態のソケットでないことを、
413 値 1 は listen 状態のソケットであることを示す。
418 .\"O Bind this socket to a particular device like \(lqeth0\(rq,
419 .\"O as specified in the passed interface name.
421 .\"O name is an empty string or the option length is zero, the socket device
422 .\"O binding is removed.
423 .\"O The passed option is a variable-length null-terminated
424 .\"O interface name string with the maximum size of
426 このソケットを、引き数で渡したインターフェース名で指定される
427 (\(lqeth0\(rq のような) 特定のデバイスにバインドする。
428 名前が空文字列だったり、オプションの長さ (optlen) が 0 の場合には、
429 ソケットのバインドが削除される。渡すオプションは、インターフェース名が
430 入ったヌル文字で終端された可変長の文字列である。
434 .\"O If a socket is bound to an interface,
435 .\"O only packets received from that particular interface are processed by the
437 .\"O Note that this only works for some socket types, particularly
440 .\"O It is not supported for packet sockets (use normal
443 ソケットがインターフェースにバインドされると、
444 その特定のインターフェースから受信されたパケットだけを処理する。
445 このオプションはいくつかのソケットタイプ、特に
448 パケットソケットではサポートされていない (通常の
453 .\"O Set or get the broadcast flag.
454 .\"O When enabled, datagram sockets
455 .\"O receive packets sent to a broadcast address and they are allowed to send
456 .\"O packets to a broadcast address.
457 .\"O This option has no effect on stream-oriented sockets.
458 ブロードキャストフラグを設定・取得する。有効になっていると、
459 データグラムソケットはブロードキャストアドレスに送られたパケットを受信したり、
460 ブロードキャストアドレスにパケットを送信したりできるようになる。
461 ストリーム指向のソケットには何の効果もない。
464 .\"O Enable BSD bug-to-bug compatibility.
465 .\"O This is used by the UDP protocol module in Linux 2.0 and 2.2.
466 .\"O If enabled ICMP errors received for a UDP socket will not be passed
467 .\"O to the user program.
468 .\"O In later kernel versions, support for this option has been phased out:
469 .\"O Linux 2.4 silently ignores it, and Linux 2.6 generates a kernel warning
470 .\"O (printk()) if a program uses this option.
471 .\"O Linux 2.0 also enabled BSD bug-to-bug compatibility
472 .\"O options (random header changing, skipping of the broadcast flag) for raw
473 .\"O sockets with this option, but that was removed in Linux 2.2.
474 BSD のバグに対して互換性を取るための機能を有効にする。
475 この機能は Linux 2.0 と 2.2 の UDP プロトコルモジュールで使用されている。
476 有効になっていると、 UDP ソケットで受信された ICMP エラーは
478 これ以降のバージョンのカーネルでは、このオプションのサポートは
480 Linux 2.4 ではこのオプションは黙って無視され、
481 Linux 2.6 ではプログラムがこのオプションを使用すると (printk() を使って)
483 Linux 2.0 では、このオプションを指定すると、
484 raw ソケットにおいても BSD のバグ (ランダムヘッダ変更、
487 しかし、こちらは Linux 2.2 で削除された。
490 .\"O Enable socket debugging.
491 .\"O Only allowed for processes with the
492 .\"O .B CAP_NET_ADMIN
493 .\"O capability or an effective user ID of 0.
496 権限を持つプロセスか、実効ユーザ ID が 0 のプロセスでしか
500 .\"O Get and clear the pending socket error.
502 .\"O .BR getsockopt (2).
503 .\"O Expects an integer.
504 保留になっていたソケットエラーを取得してクリアする。
510 .\"O Don't send via a gateway, only send to directly connected hosts.
511 .\"O The same effect can be achieved by setting the
512 .\"O .B MSG_DONTROUTE
513 .\"O flag on a socket
516 .\"O Expects an integer boolean flag.
517 ゲートウェイを経由せず、直接接続されているホストに送信する。
521 フラグをセットした場合も同じ効果が得られる。
525 .\"O Enable sending of keep-alive messages on connection-oriented sockets.
526 .\"O Expects an integer boolean flag.
527 接続志向のソケットに対する keep-alive メッセージの送信を有効にする。
531 .\"O Sets or gets the
534 .\"O The argument is a
545 int l_onoff; /* linger active */
546 int l_linger; /* how many seconds to linger for */
554 .\"O .BR shutdown (2)
555 .\"O will not return until all queued messages for the socket have been
556 .\"O successfully sent or the linger timeout has been reached.
558 .\"O the call returns immediately and the closing is done in the background.
559 .\"O When the socket is closed as part of
561 .\"O it always lingers in the background.
566 は、そのソケットにキューイングされたメッセージがすべて送信完了するか、
567 linger (居残り) タイムアウトになるまで返らない。無効になっていると、
568 これらのコールはただちに戻り、クローズ動作はバックグラウンドで行われる。
571 の一部として行った場合には、残っているソケットの
572 クローズ動作は必ずバックグラウンドに送られる。
575 .\"O If this option is enabled,
576 .\"O out-of-band data is directly placed into the receive data stream.
577 .\"O Otherwise out-of-band data is only passed when the
579 .\"O flag is set during receiving.
580 このオプションを有効にすると、帯域外データ (out-of-band data) は
581 受信データストリーム中に置かれる。有効にしなければ、
584 フラグがセットされている場合に限って渡される。
585 .\"O .\" don't document it because it can do too much harm.
586 .\"O .\".B SO_NO_CHECK
587 .\" あまりに危険なことができるので、このオプションについては記載しないこと。
591 .\"O Enable or disable the receiving of the
592 .\"O .B SCM_CREDENTIALS
593 .\"O control message.
594 .\"O For more information see
597 制御メッセージの受信を有効/無効にする。詳細は
600 .\" FIXME Document SO_PASSSEC, added in 2.6.18; there is some info
601 .\" in the 2.6.18 ChangeLog
604 .\"O Return the credentials of the foreign process connected to this socket.
605 .\"O This is only possible for connected
607 .\"O stream sockets and
609 .\"O stream and datagram socket pairs created using
610 .\"O .BR socketpair (2);
613 このソケットに接続してきた外部プロセスの信任状 (credential) を返す。
621 のストリームソケットとデータグラムソケットのペアだけである。
624 .\"O The returned credentials are those that were in effect at the time
628 .\"O .BR socketpair (2).
633 .\"O .BR getsockopt (2).
637 が呼ばれた時に有効であった信任状が返される。
645 .\"O Set the protocol-defined priority for all packets to be sent on
647 .\"O Linux uses this value to order the networking queues:
648 .\"O packets with a higher priority may be processed first depending
649 .\"O on the selected device queueing discipline.
652 .\"O this also sets the IP type-of-service (TOS) field for outgoing packets.
653 .\"O Setting a priority outside the range 0 to 6 requires the
654 .\"O .B CAP_NET_ADMIN
656 プロトコルで定義された優先度を、このソケットから
657 送信される全てのパケットにセットする。 Linux はネットワークキュー内部の
658 整列にこの値を用いる。高い優先度を持っているパケットは先に処理される。
659 ただしそのデバイスのキュー処理のやり方に依存する。
661 では、外向けパケットの IP type-of-service (TOS) フィールドにもこの値が設定される。
662 0 から 6 以外の優先度をセットするには
667 .\"O Sets or gets the maximum socket receive buffer in bytes.
668 .\"O The kernel doubles this value (to allow space for bookkeeping overhead)
669 .\"O when it is set using
670 .\"O .\" Most (all?) other implementations do not do this -- MTK, Dec 05
671 .\"O .BR setsockopt (2),
672 .\"O and this doubled value is returned by
673 .\"O .BR getsockopt (2).
674 .\"O The default value is set by the
675 .\"O .I /proc/sys/net/core/rmem_default
676 .\"O file, and the maximum allowed value is set by the
677 .\"O .I /proc/sys/net/core/rmem_max
679 .\"O The minimum (doubled) value for this option is 256.
680 ソケットの受信バッファの最大サイズを設定・取得する (バイト単位)。
682 を使って値が設定されたときに (管理オーバヘッド用の領域を確保するために)
684 .\" 他のほとんどの (全ての?) 実装ではこんなことは行っていない -- MTK, Dec 05
688 .I /proc/sys/net/core/rmem_default
690 .I /proc/sys/net/core/rmem_max
692 このオプションの最小値は (2倍した値で) 256 である。
694 .\"O .BR SO_RCVBUFFORCE " (since Linux 2.6.14)"
695 .BR SO_RCVBUFFORCE " (Linux 2.6.14 以降)"
696 .\"O Using this socket option, a privileged
697 .\"O .RB ( CAP_NET_ADMIN )
698 .\"O process can perform the same task as
702 .\"O limit can be overridden.
703 このソケットオプションを使うと、特権プロセス
712 .\"O .BR SO_RCVLOWAT " and " SO_SNDLOWAT
713 .BR SO_RCVLOWAT " と " SO_SNDLOWAT
714 .\"O Specify the minimum number of bytes in the buffer until the socket layer
715 .\"O will pass the data to the protocol
716 .\"O .RB ( SO_SNDLOWAT )
717 .\"O or the user on receiving
718 .\"O .RB ( SO_RCVLOWAT ).
719 .\"O These two values are initialized to 1.
721 .\"O is not changeable on Linux
722 .\"O .RB ( setsockopt (2)
723 .\"O fails with the error
724 .\"O .BR ENOPROTOOPT ).
727 .\"O only since Linux 2.4.
728 バッファ中に溜めることのできるデータの最小値を指定する。
729 このサイズを越えると、ソケット層はそのデータをプロトコルに渡し
741 は Linux 2.4 以降でのみ変更可能である。
746 .\"O system calls currently do not respect the
748 .\"O setting on Linux,
749 .\"O and mark a socket readable when even a single byte of data is available.
750 .\"O A subsequent read from the socket will block until
752 .\"O bytes are available.
753 .\"O .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=111049368106984&w=2
754 .\"O .\" Tested on kernel 2.6.14 -- mtk, 30 Nov 05
762 データが1バイト利用可能になっただけでも、
763 ソケットは読み出し可能とのマークをつける。
764 一方、それに続けて行うソケットからの read は
766 バイトのデータが利用可能になるまで停止してしまう。
767 .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=111049368106984&w=2
768 .\" Tested on kernel 2.6.14 -- mtk, 30 Nov 05
770 .\"O .BR SO_RCVTIMEO " and " SO_SNDTIMEO
771 .BR SO_RCVTIMEO " と " SO_SNDTIMEO
772 .\"O .\" Not implemented in 2.0.
773 .\"O .\" Implemented in 2.1.11 for getsockopt: always return a zero struct.
774 .\"O .\" Implemented in 2.3.41 for setsockopt, and actually used.
776 .\" getsockopt については 2.1.11 で実装された。常に 0 の構造体を返す。
777 .\" setsockopt については 2.3.41 で実装され、実際に使われている。
778 .\"O Specify the receiving or sending timeouts until reporting an error.
779 .\"O The argument is a
780 .\"O .IR "struct timeval" .
781 .\"O If an input or output function blocks for this period of time, and
782 .\"O data has been sent or received, the return value of that function
783 .\"O will be the amount of data transferred; if no data has been transferred
784 .\"O and the timeout has been reached then \-1 is returned with
790 .\"O .\" in fact to EAGAIN
791 .\"O just as if the socket was specified to be nonblocking.
792 .\"O If the timeout is set to zero (the default)
793 .\"O then the operation will never timeout.
794 送信・受信のタイムアウトを指定する。これを越えるとエラーを報告する。
798 入出力関数がタイムアウト時間の間ブロックされ、かつデータの送信または
799 受信が行われていた場合は、転送されたデータ量が関数の返り値となる。
800 何もデータが転送されずにタイムアウトに達した場合は、
808 .\" 実際には EAGAIN が設定される
809 あたかもソケットに非ブロッキングが指定されたように見える。
810 タイムアウト値に (デフォルト値である) 0 に設定すると、
812 .\"O Timeouts only have effect for system calls that perform socket I/O (e.g.,
814 .\"O .BR recvmsg (2),
816 .\"O .BR sendmsg (2));
817 .\"O timeouts have no effect for
820 .\"O .BR epoll_wait (2),
823 ソケット I/O を実行するシステムコールだけ
836 .\"O Indicates that the rules used in validating addresses supplied in a
838 .\"O call should allow reuse of local addresses.
842 .\"O means that a socket may bind, except when there
843 .\"O is an active listening socket bound to the address.
844 .\"O When the listening socket is bound to
846 .\"O with a specific port then it is not possible
847 .\"O to bind to this port for any local address.
848 .\"O Argument is an integer boolean flag.
850 コールに与えられたアドレスが正しいかを判断するルールで、
854 ソケットなら、そのアドレスにバインドされたアクティブな listen
855 状態のソケットが存在しない限り、バインドが行える。
858 で特定のポートにバインドされている場合には、
859 このポートに対しては、どんなローカルアドレスでもバインドできない。
863 .\"O Sets or gets the maximum socket send buffer in bytes.
864 .\"O The kernel doubles this value (to allow space for bookkeeping overhead)
865 .\"O when it is set using
866 .\"O .\" Most (all?) other implementations do not do this -- MTK, Dec 05
867 .\"O .BR setsockopt (2),
868 .\"O and this doubled value is returned by
869 .\"O .BR getsockopt (2).
870 .\"O The default value is set by the
871 .\"O .I /proc/sys/net/core/wmem_default
872 .\"O file and the maximum allowed value is set by the
873 .\"O .I /proc/sys/net/core/wmem_max
875 .\"O The minimum (doubled) value for this option is 2048.
876 ソケットの送信バッファの最大サイズを設定・取得する (バイト単位)。
878 を使って値が設定されたときに (管理オーバヘッド用の領域を確保するために)
880 .\" 他のほとんどの (全ての?) 実装ではこんなことは行っていない -- MTK, Dec 05
884 .I /proc/sys/net/core/wmem_default
886 .I /proc/sys/net/core/wmem_max
888 このオプションの最小値は (2倍した値で) 2048 である。
890 .\"O .BR SO_SNDBUFFORCE " (since Linux 2.6.14)"
891 .BR SO_SNDBUFFORCE " (Linux 2.6.14 以降)"
892 .\"O Using this socket option, a privileged
893 .\"O .RB ( CAP_NET_ADMIN )
894 .\"O process can perform the same task as
898 .\"O limit can be overridden.
899 このソケットオプションを使うと、特権プロセス
909 .\"O Enable or disable the receiving of the
911 .\"O control message.
912 .\"O The timestamp control message is sent with level
917 .\"O .I "struct timeval"
919 .\"O reception time of the last packet passed to the user in this call.
922 .\"O for details on control messages.
929 フィールドはこのシステムコールでユーザに渡した
938 .\"O Gets the socket type as an integer (like
939 .\"O .BR SOCK_STREAM ).
940 .\"O Can only be read
942 .\"O .BR getsockopt (2).
949 .\"O When writing onto a connection-oriented socket that has been shut down
950 .\"O (by the local or the remote end)
952 .\"O is sent to the writing process and
955 .\"O The signal is not sent when the write call
959 (ローカルもしくはリモート側で) 切断された
960 接続指向 (connection-oriented) のソケットに対して
961 書き込みを行うと、その書き込みを行ったプロセスに
967 フラグを指定していた場合はシグナルは送られない。
969 .\"O When requested with the
976 .\"O is sent when an I/O event occurs.
977 .\"O It is possible to use
981 .\"O in the signal handler to find out which socket the event occurred on.
987 をプロセスまたはプロセスグループに指定しておくと、
994 をシグナルハンドラ内で用いれば、どのソケットでイベントが起こったかを
996 .\"O An alternative (in Linux 2.2) is to set a real-time signal using the
999 .\"O the handler of the real time signal will be called with
1000 .\"O the file descriptor in the
1003 .\"O .IR siginfo_t .
1006 .\"O for more information.
1007 (Linux 2.2 における) 別の方法としては、
1010 を用いてリアルタイムシグナルを設定するやり方もある。
1015 フィールドにファイルディスクリプタが入った状態で呼び出される。
1020 .\"O Under some circumstances (e.g., multiple processes accessing a
1021 .\"O single socket), the condition that caused the
1023 .\"O may have already disappeared when the process reacts to the signal.
1024 .\"O If this happens, the process should wait again because Linux
1025 .\"O will resend the signal later.
1026 状況によっては (例えば複数のプロセスが一つのソケットにアクセスしているなど)、
1028 の原因となった状態は、プロセスがそのシグナルへの対応を行ったときには
1030 この場合は、プロセスは再び待つようにすべきである。
1031 Linux は同じシグナルを後で再送するからである。
1032 .\" .SS Ancillary Messages
1033 .\"O .SS /proc interfaces
1035 .\"O The core socket networking parameters can be accessed
1036 .\"O via files in the directory
1037 .\"O .IR /proc/sys/net/core/ .
1038 core のソケットのネットワーキングパラメータには、
1039 .I /proc/sys/net/core/
1040 ディレクトリ内のファイルを通してアクセスできる。
1043 .\"O contains the default setting in bytes of the socket receive buffer.
1044 ソケットの受信バッファサイズのデフォルト値 (バイト単位)。
1047 .\"O contains the maximum socket receive buffer size in bytes which a user may
1048 .\"O set by using the
1052 ソケットオプションを用いてユーザが設定できる
1053 ソケットの受信バッファサイズの最大値 (バイト単位)。
1056 .\"O contains the default setting in bytes of the socket send buffer.
1057 ソケットの送信バッファサイズのデフォルト値 (バイト単位)。
1060 .\"O contains the maximum socket send buffer size in bytes which a user may
1061 .\"O set by using the
1065 ソケットオプションを用いてユーザが設定できる
1066 ソケットの送信バッファサイズの最大値 (バイト単位)。
1068 .\"O .IR message_cost " and " message_burst
1069 .IR message_cost " と " message_burst
1070 .\"O configure the token bucket filter used to load limit warning messages
1071 .\"O caused by external network events.
1072 トークン・バケット・フィルターを設定する。
1073 これは外部のネットワークイベントによって引き起こされた
1075 .\"NAKANO "load limit" だと思うんだけど...
1077 .I netdev_max_backlog
1078 .\"O Maximum number of packets in the global input queue.
1079 グローバルな入力キューにおける最大のパケット数。
1082 .\"O Maximum length of ancillary data and user control data like the iovecs
1084 ソケットあたりの、補助データ (ancillary data) とユーザ制御データ
1085 (iovecs のようなもの) との和の最大長。
1086 .\" netdev_fastroute is not documented because it is experimental
1089 .\"O These operations can be accessed using
1097 .IB error " = ioctl(" ip_socket ", " ioctl_type ", " &value_result ");"
1103 .\"O .I struct timeval
1104 .\"O with the receive timestamp of the last packet passed to the user.
1105 .\"O This is useful for accurate round trip time measurements.
1107 .\"O .BR setitimer (2)
1108 .\"O for a description of
1109 .\"O .IR "struct timeval" .
1110 最後にユーザに渡されたパケットの受信タイムスタンプを
1113 これは round trip 時間を正確に測りたいときに便利である。
1119 .\"O This ioctl should only be used if the socket option
1120 .\"O .B SO_TIMESTAMP
1121 .\"O is not set on the socket.
1122 .\"O Otherwise, it returns the timestamp of the
1123 .\"O last packet that was received while
1124 .\"O .B SO_TIMESTAMP
1125 .\"O was not set, or it fails if no such packet has been received,
1128 .\"O returns \-1 with
1132 この ioctl は、ソケットオプション
1134 がソケットにセットされていない場合にのみ使用すべきである。
1137 がセットされていなかった間に受信した最後のパケットの時刻を返すか、
1138 そのようなパケットを受信していない場合には失敗する
1148 .\"O Set the process or process group to send
1154 .\"O asynchronous I/O operation has finished or urgent data is available.
1155 .\"O The argument is a pointer to a
1157 .\"O If the argument is positive, send the signals to that process.
1159 .\"O argument is negative, send the signals to the process group with the ID
1160 .\"O of the absolute value of the argument.
1161 .\"O The process may only choose itself or its own process group to receive
1162 .\"O signals unless it has the
1164 .\"O capability or an effective UID of 0.
1165 非同期 I/O 操作の終了時や緊急データの受信時に
1169 シグナル群を送るプロセスやプロセスグループを設定する。
1173 引き数が正だと、そのプロセスにシグナルが送られる。負だと、
1174 引き数の絶対値を ID に持つプロセスグループにシグナルが送られる。
1175 シグナル受信先には、自分自身のプロセス / 自分の所属するプロセスグループ
1178 ケーパビリティを持っている場合、及び実効ユーザ ID が 0 のプロセスの場合は
1184 .\"O flag to enable or disable asynchronous I/O mode of the socket.
1185 .\"O Asynchronous I/O mode means that the
1187 .\"O signal or the signal set with
1189 .\"O is raised when a new I/O event occurs.
1191 フラグを変更し、ソケットの非同期 (asynchronous) I/O モードを
1192 有効/無効にする。非同期 I/O モードでは、
1193 新しい I/O イベントが起きたときに、
1197 で設定されたシグナル・セットが発行される。
1199 .\"O Argument is an integer boolean flag.
1201 .\"O (This operation is synonymous with the use of
1210 フラグをセットするのと同じ意味である。)
1214 .\"O Get the current process or process group that receives
1220 .\"O when none is set.
1224 を受信したカレントプロセス・プロセスグループを取得する。
1235 .\"O The same as the
1243 .\"O The same as the
1251 .\"O .B SO_BINDTODEVICE
1252 .\"O was introduced in Linux 2.0.30.
1254 .\"O is new in Linux 2.2.
1257 .\"O interfaces was introduced in Linux 2.2.
1259 は Linux 2.0.30 で導入された。
1263 インタフェースは Linux 2.2 で導入された。
1267 .\"O are supported since Linux 2.3.41.
1268 .\"O Earlier, timeouts were fixed to
1269 .\"O a protocol-specific setting, and could not be read or written.
1273 は Linux 2.3.41 以降でサポートされている。
1274 それ以前は、タイムアウトはプロトコル固有の固定の設定値で、
1278 .\"O Linux assumes that half of the send/receive buffer is used for internal
1279 .\"O kernel structures; thus the values in the corresponding
1281 .\"O files are twice what can be observed on the wire.
1282 Linux は、送受信バッファの半分を内部のカーネル構造体で用いると仮定している。
1285 ファイルはネットワーク回線上での大きさの 2 倍になる。
1287 .\"O Linux will only allow port reuse with the
1288 .\"O .B SO_REUSEADDR
1290 .\"O when this option was set both in the previous program that performed a
1292 .\"O to the port and in the program that wants to reuse the port.
1293 .\"O This differs from some implementations (e.g., FreeBSD)
1294 .\"O where only the later program needs to set the
1295 .\"O .B SO_REUSEADDR
1297 .\"O Typically this difference is invisible, since, for example, a server
1298 .\"O program is designed to always set this option.
1301 オプションでポートの再利用が許可されるのは、
1304 を前に実行したプログラムとそのポートを再利用
1308 この動作は (FreeBSD などの) いくつかの実装とは異なる。これらでは、
1309 後でポートを再利用しようとするプログラムで
1312 たいていはこの違いは見えない。なぜなら、例えばサーバプログラムは
1313 常にこのオプションをセットするように設計されるからである。
1317 .\"O .B CONFIG_FILTER
1319 .\"O .B SO_ATTACH_FILTER
1321 .\"O .B SO_DETACH_FILTER
1322 .\" FIXME Document SO_ATTACH_FILTER and SO_DETACH_FILTER
1323 .\"O are not documented.
1324 .\"O The suggested interface to use them is via the libpcap
1331 について記載されていない。これらは libpcap ライブラリを通して
1333 .\"O .\" .SH AUTHORS
1335 .\"O .\" This man page was written by Andi Kleen.
1336 .\" この man ページは Andi Kleen が書いた。
1342 .BR capabilities (7),