1 .\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
2 .\" Permission is granted to distribute possibly modified copies
3 .\" of this page provided the header is included verbatim,
4 .\" and in case of nontrivial modification author and date
5 .\" of the modification is added to the header.
7 .\" 2.4 Updates by Nivedita Singhvi 4/20/02 <nivedita@us.ibm.com>.
8 .\" Modified, 2004-11-11, Michael Kerrisk and Andries Brouwer
9 .\" Updated details of interaction of TCP_CORK and TCP_NODELAY.
11 .\" 2008-11-21, mtk, many, many updates.
12 .\" The descriptions of /proc files and socket options should now
13 .\" be more or less up to date and complete as at Linux 2.6.27
14 .\" (other than the remaining FIXMEs in the page source below).
16 .\" Japanese Version Copyright (c) 1999 NAKANO Takeo all rights reserved.
17 .\" Translated 1999-12-06, NAKANO Takeo <nakano@apm.seikei.ac.jp>
18 .\" Updated 2002-11-15, NAKANO Takeo
19 .\" Updated 2005-02-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
20 .\" Updated 2005-09-07, Akihiro MOTOKI
21 .\" Updated 2005-12-26, Akihiro MOTOKI
22 .\" Updated 2006-07-19, Akihiro MOTOKI, LDP v2.36
23 .\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
24 .\" Updated 2008-12-31, Akihiro MOTOKI, LDP v3.15
25 .\" Updated 2009-03-01, Akihiro MOTOKI, LDP v3.19
27 .\"WORD full duplex connection 全二重通信
28 .\"WORD listening state 接続待ち受け状態
29 .\"WORD denial of service attack DoS 攻撃
30 .\"WORD urgent data 緊急データ
32 .TH TCP 7 2009-09-30 "Linux" "Linux Programmer's Manual"
34 .\"O tcp \- TCP protocol
39 .B #include <sys/socket.h>
41 .B #include <netinet/in.h>
43 .B #include <netinet/tcp.h>
45 .B tcp_socket = socket(AF_INET, SOCK_STREAM, 0);
48 .\"O This is an implementation of the TCP protocol defined in
49 .\"O RFC\ 793, RFC\ 1122 and RFC\ 2001 with the NewReno and SACK
51 .\"O It provides a reliable, stream-oriented,
52 .\"O full-duplex connection between two sockets on top of
54 .\"O for both v4 and v6 versions.
55 .\"O TCP guarantees that the data arrives in order and
56 .\"O retransmits lost packets.
57 .\"O It generates and checks a per-packet checksum to catch
58 .\"O transmission errors.
59 .\"O TCP does not preserve record boundaries.
60 これは RFC\ 793, RFC\ 1122, RFC\ 2001 で定義されている TCP プロトコルを
61 NewReno 拡張と SACK 拡張を含めて実装したものである。
64 上の二つのソケット間に、信頼性の高い、ストリーム指向の全二重
65 (full-duplex) 通信を提供する。
69 TCP は、データが順序を守って到着すること、途中で失われたパケットが
70 再送されることを保証する。また、パケット単位にチェックサムを
71 生成、検査することで、転送エラーを検知する。
72 TCP はレコード境界 (record boundary) を保存しない。
74 .\"O A newly created TCP socket has no remote or local address and is not
76 .\"O To create an outgoing TCP connection use
78 .\"O to establish a connection to another TCP socket.
79 .\"O To receive new incoming connections, first
81 .\"O the socket to a local address and port and then call
83 .\"O to put the socket into the listening state.
84 .\"O After that a new socket for each incoming connection can be accepted using
86 .\"O A socket which has had
90 .\"O successfully called on it is fully specified and may transmit data.
91 .\"O Data cannot be transmitted on listening or not yet connected sockets.
92 新しく生成されたばかりの TCP ソケットは、
94 したがって詳細が完全に指定された状態ではない。
97 を用いてもう一方の TCP ソケットへの接続を確立する。
100 でソケットをローカルなアドレスとポートに結びつけ、次に
102 を呼んでソケットを接続待ち受け状態にする。
109 のコールが成功したソケットは、詳細が完全に指定された状態となり、
110 データのやりとりが可能となる。接続待ち受け状態の (listening) ソケットや、
111 接続 (connect) されていないソケットを通してデータをやりとりすることはできない。
113 .\"O Linux supports RFC\ 1323 TCP high performance
115 .\"O These include Protection Against Wrapped
116 .\"O Sequence Numbers (PAWS), Window Scaling and Timestamps.
117 .\"O Window scaling allows the use
118 .\"O of large (> 64K) TCP windows in order to support links with high
119 .\"O latency or bandwidth.
120 .\"O To make use of them, the send and receive buffer sizes must be increased.
121 .\"O They can be set globally with the
122 .\"O .I /proc/sys/net/ipv4/tcp_wmem
124 .\"O .I /proc/sys/net/ipv4/tcp_rmem
125 .\"O files, or on individual sockets by using the
129 .\"O socket options with the
130 .\"O .BR setsockopt (2)
132 Linux は RFC\ 1323 の TCP high performance 拡張をサポートしている。
133 これには、Protection Against Wrapped Sequence Numbers (PAWS)、
134 ウィンドウスケーリング、タイムスタンプなどが含まれている。
135 ウィンドウスケーリングを利用すると、遅延または帯域の大きな接続で、
136 (64K 以上の) 巨大な TCP ウィンドウを用いることが可能となる。
137 これを用いるには、送受信のバッファサイズを大きくしなければならない。
138 システム全体に対するバッファサイズの変更は、ファイル
139 .I /proc/sys/net/ipv4/tcp_wmem
141 .I /proc/sys/net/ipv4/tcp_rmem
143 また、個々のソケットのみを大きくしたい場合には、
151 .\"O The maximum sizes for socket buffers declared via the
155 .\"O mechanisms are limited by the values in the
156 .\"O .I /proc/sys/net/core/rmem_max
158 .\"O .I /proc/sys/net/core/wmem_max
163 のメカニズムで宣言されるソケットバッファの最大サイズは、ファイル
164 .I /proc/sys/net/core/rmem_max
166 .I /proc/sys/net/core/wmem_max
167 で指定されたシステムとしての制限値を超えることはできない。
168 .\"O Note that TCP actually allocates twice the size of
169 .\"O the buffer requested in the
170 .\"O .BR setsockopt (2)
171 .\"O call, and so a succeeding
172 .\"O .BR getsockopt (2)
173 .\"O call will not return the same size of buffer as requested in the
174 .\"O .BR setsockopt (2)
178 コールが要求したバッファサイズの二倍を割り当てる。
183 で要求したバッファサイズとは異なる値が返る。
184 .\"O TCP uses the extra space for administrative purposes and internal
185 .\"O kernel structures, and the
187 .\"O file values reflect the
188 .\"O larger sizes compared to the actual TCP windows.
189 TCP はこの余分な空間を、管理目的やカーネル内部の構造体に用いている。
191 ファイルの値は、これらを反映し、実際の TCP ウィンドウよりも大きな値となる。
192 .\"O On individual connections, the socket buffer size must be set prior to the
196 .\"O calls in order to have it take effect.
199 .\"O for more information.
200 各接続におけるソケットのバッファサイズ変更を有効にするには、
209 .\"O TCP supports urgent data.
210 .\"O Urgent data is used to signal the
211 .\"O receiver that some important message is part of the data
212 .\"O stream and that it should be processed as soon as possible.
213 .\"O To send urgent data specify the
217 TCP は緊急データ (urgent data) をサポートしている。緊急データは
218 何らかの重要なメッセージがデータストリームに含まれていること、
219 そのデータをできるだけ早く処理すべきこと、を受信者に伝えるために用いられる。
225 .\"O When urgent data is received, the kernel sends a
227 .\"O signal to the process or process group that has been set as the
228 .\"O socket "owner" using the
232 .\"O ioctls (or the POSIX.1-2001-specified
238 .\"O socket option is enabled, urgent data is put into the normal
239 .\"O data stream (a program can test for its location using the
241 .\"O ioctl described below),
242 .\"O otherwise it can be only received when the
247 .\"O .BR recvmsg (2).
254 ioctl (や POSIX.1-2001 で規定されている
257 操作) を用いてそのソケットの「所有者」として設定された
260 ソケットオプションが有効になっていると、緊急データは
261 通常のデータストリームの中に混ぜて送られる (プログラムは下記の
263 ioctl を使って緊急データの場所を調べることができる)。
270 フラグがセットされているときにのみ、緊急データを受信できる。
272 .\"O Linux 2.4 introduced a number of changes for improved
273 .\"O throughput and scaling, as well as enhanced functionality.
274 .\"O Some of these features include support for zero-copy
275 .\"O .BR sendfile (2),
276 .\"O Explicit Congestion Notification, new
277 .\"O management of TIME_WAIT sockets, keep-alive socket options
278 .\"O and support for Duplicate SACK extensions.
279 Linux 2.4 では多くの変更がなされ、
280 スループットとスケーリングが向上し、機能も高まった。
283 Explicit Congestion Notification、
284 TIME_WAIT ソケットの新しい管理法、
285 keep-alive ソケットオプション、
286 Duplicate SACK 拡張のサポートなどがある。
287 .\"O .SS Address Formats
289 .\"O TCP is built on top of IP (see
291 .\"O The address formats defined by
294 .\"O TCP only supports point-to-point
295 .\"O communication; broadcasting and multicasting are not
301 に定義されているアドレスフォーマットは TCP にも適用される。
302 TCP は point-to-point の通信だけをサポートする。
303 ブロードキャストやマルチキャストはサポートしない。
304 .\"O .SS /proc interfaces
306 .\"O System-wide TCP parameter settings can be accessed by files in the directory
307 .\"O .IR /proc/sys/net/ipv4/ .
308 .\"O In addition, most IP
310 .\"O interfaces also apply to TCP; see
312 システム全体に対する TCP パラメータの設定には、
313 .I /proc/sys/net/ipv4/
314 ディレクトリ内のファイルによりアクセスできる。
317 インタフェースのほとんどは TCP についても適用される。
321 .\"O take an integer value, with a nonzero value ("true") meaning that
322 .\"O the corresponding option is enabled, and a zero value ("false")
323 .\"O meaning that the option is disabled.
326 0 以外の値 ("true") は対応するオプションが有効、
327 0 値 ("false") は無効、であることを意味する。
329 .\"O .IR tcp_abc " (Integer; default: 0; since Linux 2.6.15)"
330 .IR tcp_abc " (Integer; default: 0; Linux 2.6.15 以降)"
331 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
332 .\"O Control the Appropriate Byte Count (ABC), defined in RFC 3465.
333 .\"O ABC is a way of increasing the congestion window
335 .\"O more slowly in response to partial acknowledgments.
336 RFC 3465 で定義されている Appropriate Byte Count (ABC) を制御する。
337 ABC は、部分的な ACK に応じた輻輳ウィンドウ
340 .\"O Possible values are:
346 .\"O once per acknowledgment (no ABC)
353 .\"O once per acknowledgment of full sized segment
354 フルサイズのセグメントの ACK を受信する毎に
360 .\"O by two if acknowledgment is
361 .\"O of two segments to compensate for delayed acknowledgments.
362 ACK が遅延 ACK (delayed acknowledgment) を相殺するための 2 セグメントに
368 .\"O .IR tcp_abort_on_overflow " (Boolean; default: disabled; since Linux 2.4)"
369 .IR tcp_abort_on_overflow " (Boolean; default: disabled; Linux 2.4 以降)"
371 .\"O Enable resetting connections if the listening service is too
372 .\"O slow and unable to keep up and accept them.
373 .\"O It means that if overflow occurred due
374 .\"O to a burst, the connection will recover.
375 .\"O Enable this option
377 .\"O if you are really sure that the listening daemon
378 .\"O cannot be tuned to accept connections faster.
379 .\"O Enabling this option can harm the clients of your server.
380 接続を待ち受けているサービスが遅すぎて、受信についていけない場合に、
382 これを用いると、バーストによってオーバーフローが起こったときに、
383 接続を回復できるようになる。このオプションを用いるのは、
384 受信デーモンを高速化できない場合に「限定する」こと。
385 このオプションを用いると、そのサーバに接続しているクライアント
388 .\"O .IR tcp_adv_win_scale " (integer; default: 2; since Linux 2.4)"
389 .IR tcp_adv_win_scale " (integer; default: 2; Linux 2.4 以降)"
390 .\" Since 2.4.0-test7
391 .\"O Count buffering overhead as
392 .\"O .IR "bytes/2^tcp_adv_win_scale" ,
394 .\"O .I tcp_adv_win_scale
395 .\"O is greater than 0; or
396 .\"O .IR "bytes-bytes/2^(\-tcp_adv_win_scale)" ,
398 .\"O .I tcp_adv_win_scale
399 .\"O is less than or equal to zero.
400 バッファリングのオーバーヘッドの計算方法を、
403 .I "bytes/2^tcp_adv_win_scale"
407 .I "bytes-bytes/2^(\-tcp_adv_win_scale)"
410 .\"O The socket receive buffer space is shared between the
411 .\"O application and kernel.
412 .\"O TCP maintains part of the buffer as
413 .\"O the TCP window, this is the size of the receive window
414 .\"O advertised to the other end.
415 .\"O The rest of the space is used
416 .\"O as the "application" buffer, used to isolate the network
417 .\"O from scheduling and application latencies.
419 .\"O .I tcp_adv_win_scale
420 .\"O default value of 2 implies that the space
421 .\"O used for the application buffer is one fourth that of the total.
422 ソケットの受信バッファ空間はアプリケーションとカーネルで共有される。
423 TCP はバッファの一部を TCP ウィンドウとして管理し、
424 これを受信ウィンドウとして接続の他端に通知する。
425 空間の残りは「アプリケーション」バッファとして用いられ、
426 スケジューリングやアプリケーションの遅延からネットワークを隔離する。
429 この場合アプリケーションバッファは全体の 1/4 になる。
431 .\"O .IR tcp_allowed_congestion_control " (String; default: see text; since Linux 2.4.20)"
432 .IR tcp_allowed_congestion_control " (String; default: see text; Linux 2.4.20 以降)"
433 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
434 .\"O Show/set the congestion control algorithm choices available to unprivileged
435 .\"O processes (see the description of the
436 .\"O .B TCP_CONGESTION
438 .\"O The list is a subset of those listed in
439 .\"O .IR tcp_available_congestion_control .
440 非特権プロセスで利用できる輻輳制御アルゴリズムの選択肢を表示/設定する
444 .I tcp_available_congestion_control
446 .\" FIXME How are the items in this delimited? Null bytes, spaces, commas?
447 .\"O The default value for this list is "reno" plus the default setting of
448 .\"O .IR tcp_congestion_control .
449 このリストのデフォルト値は、"reno" と
450 .I tcp_congestion_control
453 .\"O .IR tcp_available_congestion_control " (String; read-only; since Linux 2.4.20)"
454 .IR tcp_available_congestion_control " (String; read-only; Linux 2.4.20 以降)"
455 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
456 .\"O Show a list of the congestion-control algorithms
457 .\"O that are registered.
458 登録されている輻輳制御アルゴリズムのリストを表示する。
459 .\" FIXME How are the items in this delimited? Null bytes, spaces, commas?
460 .\"O This list is a limiting set for the list in
461 .\"O .IR tcp_allowed_congestion_control .
462 .\"O More congestion-control algorithms may be available as modules,
465 .I tcp_allowed_congestion_control
467 他の輻輳制御アルゴリズムがモジュールとして利用可能だが、
468 モジュールがロードされていないこともある。
470 .\"O .IR tcp_app_win " (integer; default: 31; since Linux 2.4)"
471 .IR tcp_app_win " (integer; default: 31; Linux 2.4 以降)"
472 .\" Since 2.4.0-test7
473 .\"O This variable defines how many
474 .\"O bytes of the TCP window are reserved for buffering overhead.
475 この変数は、TCP ウィンドウの何バイト分を
476 バッファリングのオーバーヘッド用に予約するかを指定する。
478 .\"O A maximum of (\fIwindow/2^tcp_app_win\fP, mss) bytes in the window
479 .\"O are reserved for the application buffer.
480 .\"O A value of 0 implies that no amount is reserved.
481 そのウィンドウの \fIwindow/2^tcp_app_win\fP と mss の大きいほう (バイト単位)
482 がアプリケーションバッファとして予約される。
485 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
487 .\"O .IR tcp_base_mss " (Integer; default: 512; since Linux 2.6.17)"
488 .IR tcp_base_mss " (Integer; default: 512; Linux 2.6.17 以降)"
489 .\"O The initial value of
491 .\"O to be used by the packetization layer Path MTU discovery (MTU probing).
492 .\"O If MTU probing is enabled,
493 .\"O this is the initial MSS used by the connection.
494 パケット化レイヤの Path MTU discovery (MTU probing) で、
497 MTU probing が有効な場合、この値はその接続の MSS の初期値となる。
499 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
501 .\"O .IR tcp_bic " (Boolean; default: disabled; Linux 2.4.27/2.6.6 to 2.6.13)"
502 .IR tcp_bic " (Boolean; default: disabled; Linux 2.4.27/2.6.6 から 2.6.13 まで)"
503 .\"O Enable BIC TCP congestion control algorithm.
504 .\"O BIC-TCP is a sender-side only change that ensures a linear RTT
505 .\"O fairness under large windows while offering both scalability and
506 .\"O bounded TCP-friendliness.
507 .\"O The protocol combines two schemes
508 .\"O called additive increase and binary search increase.
509 .\"O When the congestion window is large, additive increase with a large
510 .\"O increment ensures linear RTT fairness as well as good scalability.
511 .\"O Under small congestion windows, binary search
512 .\"O increase provides TCP friendliness.
513 BIC TCP 輻輳制御アルゴリズムを有効にする。
515 スケーラビリティと TCP 親和性 (friendliness) の両方を提供しつつ、
516 大きなウィンドウの下での線形な RTT 公平性を保証するものである。
517 このプロトコルでは additive increase (追加的な増加) と
518 binary search increase (二分探索増加) といわれる二つの仕組みを
519 組み合わせている。輻輳ウィンドウが大きいときは、増分の大きい
520 additive increase により、スケーラビリティを確保しながら
522 輻輳ウィンドウが小さいときには binary search increase により
525 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
527 .\"O .IR tcp_bic_low_window " (integer; default: 14; Linux 2.4.27/2.6.6 to 2.6.13)"
528 .IR tcp_bic_low_window " (integer; default: 14; Linux 2.4.27/2.6.6 以降 2.6.13 まで)"
529 .\"O Set the threshold window (in packets) where BIC TCP starts to
530 .\"O adjust the congestion window.
531 .\"O Below this threshold BIC TCP behaves the same as the default TCP Reno.
532 BIC TCP が輻輳ウィンドウの調整を開始する閾値ウィンドウ (パケット単位)
533 を設定する。この閾値を下回る場合、BIC TCP はデフォルトの TCP Reno と
536 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
538 .\"O .IR tcp_bic_fast_convergence " (Boolean; default: enabled; Linux 2.4.27/2.6.6 to 2.6.13)"
539 .IR tcp_bic_fast_convergence " (Boolean; default: enabled; Linux 2.4.27/2.6.6 以降 2.6.13 まで)"
540 .\"O Force BIC TCP to more quickly respond to changes in congestion window.
541 .\"O Allows two flows sharing the same connection to converge more rapidly.
542 BIC TCP が輻輳ウィンドウの変化により速く反応するようにする。
543 同じコネクションを共有する二つのフローが一つにまとまるのを
546 .\"O .IR tcp_congestion_control " (String; default: see text; since Linux 2.4.13)"
547 .IR tcp_congestion_control " (String; default: 説明参照; Linux 2.4.13 以降)"
548 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
549 .\"O Set the default congestion-control algorithm to be used for new connections.
550 .\"O The algorithm "reno" is always available,
551 .\"O but additional choices may be available depending on kernel configuration.
552 .\"O The default value for this file is set as part of kernel configuration.
553 新規の接続で使用されるデフォルトの輻輳制御アルゴリズムを設定する。
554 "reno" アルゴリズムは常に利用可能だが、
555 カーネル設定次第では別の選択肢が利用できることもある。
556 このファイルのデフォルト値はカーネル設定の一つとして設定される。
558 .\"O .IR tcp_dma_copybreak " (integer; default: 4096; since Linux 2.6.24)"
559 .IR tcp_dma_copybreak " (integer; default: 4096; Linux 2.6.24 以降)"
560 .\"O Lower limit, in bytes, of the size of socket reads that will be
561 .\"O offloaded to a DMA copy engine, if one is present in the system
562 .\"O and the kernel was configured with the
563 .\"O .B CONFIG_NET_DMA
565 システムに DMA コピーエンジンが存在し、カーネルで
568 DMA コピーエンジンにオフロードされるソケットの読み込みサイズの下限値
571 .\"O .IR tcp_dsack " (Boolean; default: enabled; since Linux 2.4)"
572 .IR tcp_dsack " (Boolean; default: enabled; Linux 2.4 以降)"
573 .\" Since 2.4.0-test7
574 .\"O Enable RFC\ 2883 TCP Duplicate SACK support.
575 RFC\ 2883 の TCP Duplicate SACK のサポートを有効にする。
577 .\"O .IR tcp_ecn " (Boolean; default: disabled; since Linux 2.4)"
578 .IR tcp_ecn " (Boolean; default: disabled; Linux 2.4 以降)"
579 .\" Since 2.4.0-test7
580 .\"O Enable RFC\ 2884 Explicit Congestion Notification.
581 .\"O When enabled, connectivity to some
582 .\"O destinations could be affected due to older, misbehaving
583 .\"O routers along the path causing connections to be dropped.
584 RFC\ 2884 の Explicit Congestion Notification を有効にする。
585 これを有効にすると、間違った振舞いをする古いルータが
586 経路の途中にあるような接続先に対して影響が生じ、
589 .\"O .IR tcp_fack " (Boolean; default: enabled; since Linux 2.2)"
590 .IR tcp_fack " (Boolean; default: enabled; Linux 2.2 以降)"
592 .\"O Enable TCP Forward Acknowledgement support.
593 TCP Forward Acknowledgement のサポートを有効にする。
595 .\"O .IR tcp_fin_timeout " (integer; default: 60; since Linux 2.2)"
596 .IR tcp_fin_timeout " (integer; default: 60; Linux 2.2 以降)"
598 .\"O This specifies how many seconds to wait for a final FIN packet before the
599 .\"O socket is forcibly closed.
600 .\"O This is strictly a violation of the TCP specification,
601 .\"O but required to prevent denial-of-service attacks.
602 .\"O In Linux 2.2, the default value was 180.
604 最後の FIN パケットを待つ時間を秒単位で指定する。
605 これは厳密には TCP の仕様を満たしていないが、
606 DoS 攻撃 (denial of service attack) から身を守るために必要である。
607 Linux 2.2 ではデフォルト値は 180 であった。
609 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
611 .\"O .IR tcp_frto " (integer; default: 0; since Linux 2.4.21/2.6)"
612 .IR tcp_frto " (integer; default: 0; Linux 2.4.21/2.6 以降)"
613 .\" Since 2.4.21/2.5.43
614 .\"O Enable F-RTO, an enhanced recovery algorithm for TCP retransmission
615 .\"O timeouts (RTOs).
616 .\"O It is particularly beneficial in wireless environments
617 .\"O where packet loss is typically due to random radio interference
618 .\"O rather than intermediate router congestion.
619 .\"O See RFC 4138 for more details.
620 F-RTO を有効にする。F-RTO は TCP 再送タイムアウト (RTO) からの
623 無線環境では、通常は、中間ルータの輻輳ではなくランダムな無線の干渉
627 .\"O This file can have one of the following values:
628 このファイルは以下のいずれかの値を取ることができる。
634 .\"O The basic version F-RTO algorithm is enabled.
635 基本版の F-RTO アルゴリズムを有効にする。
637 .\"O Enable SACK-enhanced F-RTO if flow uses SACK.
638 .\"O The basic version can be used also when
639 .\"O SACK is in use though in that case scenario(s) exists where F-RTO
640 .\"O interacts badly with the packet counting of the SACK-enabled TCP flow.
641 そのフローで SACK を使用する場合、SACK 拡張版の F-RTO を有効にする。
642 基本版の F-RTO も SACK が使用されている場合にも使用できるが、
643 基本版の場合には F-RTO が SACK が有効になった TCP フローでの
644 パケット数計測と、相性が悪く相互干渉が起こる場面が存在する。
647 .\"O Before Linux 2.6.22, this parameter was a Boolean value,
648 .\"O supporting just values 0 and 1 above.
649 Linu 2.6.22 より前では、このパラメータはブール値であり、
650 上記の 0 と 1 のみをサポートしていた。
652 .\"O .IR tcp_frto_response " (integer; default: 0; since Linux 2.6.22)"
653 .IR tcp_frto_response " (integer; default: 0; Linux 2.6.22 以降)"
654 .\"O When F-RTO has detected that a TCP retransmission timeout was spurious
655 .\"O (i.e, the timeout would have been avoided had TCP set a
656 .\"O longer retransmission timeout),
657 .\"O TCP has several options concerning what to do next.
658 .\"O Possible values are:
659 F-RTO が TCP 再送タイムアウトが偽物だと検出した場合
660 (つまり、TCP がもっと長い再送タイムアウトを設定していれば
662 次にどうするかに関して選択肢がいくつかある。
666 .\"O Rate halving based; a smooth and conservative response,
667 .\"O results in halved congestion window
669 .\"O and slow-start threshold
670 .\"O .RI ( ssthresh )
673 滑らかで、保守的な反応を行い、RTT 1回分の時間後に
680 .\"O Very conservative response; not recommended because even
681 .\"O though being valid, it interacts poorly with the rest of Linux TCP; halves
686 非常に保守的な反応。このオプションの使用は推奨されない。
687 反応が正しかった場合であっても、Linux TCP の他の部分と
694 .\"O Aggressive response; undoes congestion-control measures
695 .\"O that are now known to be unnecessary
696 .\"O (ignoring the possibility of a lost retransmission that would require
697 .\"O TCP to be more cautious);
701 .\"O are restored to the values prior to timeout.
702 .\"O motoki: 括弧内 (ignoring 〜) の部分の意味を今一つ理解できていません。
704 不要と判明した輻輳制御の測定情報を取り消す
705 (TCP がもっと注意深く扱うべき再送が失われる可能性を無視する)。
713 .\"O .IR tcp_keepalive_intvl " (integer; default: 75; since Linux 2.4)"
714 .IR tcp_keepalive_intvl " (integer; default: 75; Linux 2.4 以降)"
716 .\"O The number of seconds between TCP keep-alive probes.
717 TCP keep-alive のプローブを送る間隔 (秒単位)。
719 .\"O .IR tcp_keepalive_probes " (integer; default: 9; since Linux 2.2)"
720 .IR tcp_keepalive_probes " (integer; default: 9; Linux 2.2 以降)"
722 .\"O The maximum number of TCP keep-alive probes to send
723 .\"O before giving up and killing the connection if
724 .\"O no response is obtained from the other end.
725 TCP keep-alive プローブの最大回数。
726 この回数だけ試しても接続先から反応が得られない場合は、
729 .\"O .IR tcp_keepalive_time " (integer; default: 7200; since Linux 2.2)"
730 .IR tcp_keepalive_time " (integer; default: 7200; Linux 2.2 以降)"
732 .\"O The number of seconds a connection needs to be idle
733 .\"O before TCP begins sending out keep-alive probes.
734 .\"O Keep-alives are only sent when the
736 .\"O socket option is enabled.
737 .\"O The default value is 7200 seconds (2 hours).
738 .\"O An idle connection is terminated after
739 .\"O approximately an additional 11 minutes (9 probes an interval
740 .\"O of 75 seconds apart) when keep-alive is enabled.
741 接続がアイドル状態になってから、keep-alive
742 プローブを送信するまでの時間を秒単位で指定する。
746 デフォルト値は 7200 秒 (2 時間)。
747 keep-alive が有効になっている場合、
748 さらにおよそ 11 分 (75 秒間隔の 9 プローブ分)
749 経過するとアイドル状態の接続は終了させられる。
751 .\"O Note that underlying connection tracking mechanisms and
752 .\"O application timeouts may be much shorter.
753 下層にある接続追跡機構やアプリケーションでのタイムアウトは、
756 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
758 .\"O .IR tcp_low_latency " (Boolean; default: disabled; since Linux 2.4.21/2.6)"
759 .IR tcp_low_latency " (Boolean; default: disabled; Linux 2.4.21/2.6 以降)"
760 .\" Since 2.4.21/2.5.60
761 .\"O If enabled, the TCP stack makes decisions that prefer lower
762 .\"O latency as opposed to higher throughput.
763 .\"O It this option is disabled, then higher throughput is preferred.
764 .\"O An example of an application where this default should be
765 .\"O changed would be a Beowulf compute cluster.
766 有効にすると、TCP スタックはスループットを高くするよりも
767 遅延を少なくすることを優先して判断を行う。
768 このオプションを無効にすると、スループットを高くすることが優先される。
769 このデフォルト値を変更した方がよいアプリケーションの例としては
770 Beowulf コンピュータクラスタが挙げられるだろう。
772 .\"O .IR tcp_max_orphans " (integer; default: see below; since Linux 2.4)"
773 .IR tcp_max_orphans " (integer; default: see below; Linux 2.4 以降)"
775 .\"O The maximum number of orphaned (not attached to any user file
776 .\"O handle) TCP sockets allowed in the system.
777 .\"O When this number is exceeded,
778 .\"O the orphaned connection is reset and a warning is printed.
779 .\"O This limit exists only to prevent simple denial-of-service attacks.
780 .\"O Lowering this limit is not recommended.
781 .\"O Network conditions might require you to increase the number of
782 .\"O orphans allowed, but note that each orphan can eat up to ~64K
783 .\"O of unswappable memory.
784 .\"O The default initial value is set equal to the kernel parameter NR_FILE.
785 .\"O This initial default is adjusted depending on the memory in the system.
787 orphan な (どのユーザファイルハンドルにもアタッチされていない)
789 この数を越えると、orphan な接続はリセットされ、警告が表示される。
790 この制限が存在するのは、単純な使用不能 (denial-of-service) 攻撃を
791 防ぐために過ぎない。この値を小さくすることは推奨しない。
792 ネットワークの条件によっては、この数値を大きくしないといけないかもしれないが、
794 64K 程度のスワップ不可能なメモリを消費することも注意せよ。
795 デフォルトの初期値はカーネルパラメータの NR_FILE と等しい。
796 この初期デフォルト値はシステムのメモリに応じて調整される。
798 .\"O .IR tcp_max_syn_backlog " (integer; default: see below; since Linux 2.2)"
799 .IR tcp_max_syn_backlog " (integer; default: 下記参照; Linux 2.2 以降)"
801 .\"O The maximum number of queued connection requests which have
802 .\"O still not received an acknowledgement from the connecting client.
803 .\"O If this number is exceeded, the kernel will begin
804 .\"O dropping requests.
805 .\"O The default value of 256 is increased to
806 .\"O 1024 when the memory present in the system is adequate or
807 .\"O greater (>= 128Mb), and reduced to 128 for those systems with
808 .\"O very low memory (<= 32Mb).
809 .\"O It is recommended that if this
810 .\"O needs to be increased above 1024, TCP_SYNQ_HSIZE in
811 .\"O .I include/net/tcp.h
812 .\"O be modified to keep
813 .\"O TCP_SYNQ_HSIZE*16<=tcp_max_syn_backlog, and the kernel be
816 ack を受信していない状態の接続リクエストをキューに置ける最大数。
817 この数値を越えると、カーネルはリクエストを捨て始める。
819 システムに充分なメモリがある (128Mb 以上) 場合は 1024 になり、
820 メモリが非常に少ない場合 (32 Mb 以下) は 128 になる。
821 この数値を 1024 以上に増やしたい場合は、
824 TCP_SYNQ_HSIZE*16<=tcp_max_syn_backlog のように修正し、
827 .\"O .IR tcp_max_tw_buckets " (integer; default: see below; since Linux 2.4)"
828 .IR tcp_max_tw_buckets " (integer; default: 下記参照; Linux 2.4 以降)"
830 .\"O The maximum number of sockets in TIME_WAIT state allowed in
832 .\"O This limit exists only to prevent simple denial-of-service attacks.
833 .\"O The default value of NR_FILE*2 is adjusted
834 .\"O depending on the memory in the system.
835 .\"O If this number is
836 .\"O exceeded, the socket is closed and a warning is printed.
837 システムが許容する TIME_WAIT 状態にあるソケットの最大数。
839 単純な使用不能 (denial-of-service) 攻撃を防ぐために過ぎない。
840 デフォルト値は NR_FILE*2 で、システムのメモリに応じて調整される。
841 この数値を越えると、そのようなソケットはクローズされ、警告が表示される。
843 .\"O .IR tcp_moderate_rcvbuf " (Boolean; default: enabled; since Linux 2.4.17/2.6.7)"
844 .IR tcp_moderate_rcvbuf " (Boolean; default: enabled; Linux 2.4.17/2.6.7 以降)"
845 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
846 .\"O If enabled, TCP performs receive buffer auto-tuning,
847 .\"O attempting to automatically size the buffer (no greater than
848 .\"O .IR tcp_rmem[2] )
849 .\"O to match the size required by the path for full throughput.
850 有効にすると、TCP は受信バッファの自動調整を行う。
853 を超えない範囲で) バッファの大きさを自動的に変化させ、
854 その経路で最大のスループットを達成するのに必要な大きさに合わせようとする。
856 .\"O .IR tcp_mem " (since Linux 2.4)"
857 .IR tcp_mem " (Linux 2.4 以降)"
858 .\" Since 2.4.0-test7
859 .\"O This is a vector of 3 integers: [low, pressure, high].
860 .\"O These bounds, measured in units of the system page size,
861 .\"O are used by TCP to track its memory usage.
862 .\"O The defaults are calculated at boot time from the amount of
863 .\"O available memory.
864 .\"O (TCP can only use
866 .\"O for this, which is limited to around 900 megabytes on 32-bit systems.
867 .\"O 64-bit systems do not suffer this limitation.)
868 これは 3 つの整数 [low, pressure, high] からなるベクトル値である。
869 これらは TCP がメモリ使用量を追跡するために用いられる
870 (使用量はシステムのページサイズ単位で計測される)。
871 デフォルトはブート時に利用できるメモリの量から計算される。
874 のみを使用する。値は 32ビットシステムでは約 900 メガバイトに制限される。
875 64 ビットシステムではこの制限はない。)
879 .\"O TCP doesn't regulate its memory allocation when the number
880 .\"O of pages it has allocated globally is below this number.
881 TCP は、グローバルにアロケートしたページがこの数値以下の場合は、
885 .\"O When the amount of memory allocated by TCP
886 .\"O exceeds this number of pages, TCP moderates its memory consumption.
887 .\"O This memory pressure state is exited
888 .\"O once the number of pages allocated falls below
892 TCP がアロケートしたメモリがこの数値分のページ数を越えると、
896 以下になると、このメモリ圧迫状態から脱する。
899 .\"O The maximum number of pages, globally, that TCP will allocate.
900 .\"O This value overrides any other limits imposed by the kernel.
901 TCP がグローバルに割り当てるページ数の最大値。
902 この値はカーネルによって課されるあらゆる制限よりも優先される。
905 .\"O .IR tcp_mtu_probing " (integer; default: 0; since Linux 2.6.17)"
906 .IR tcp_mtu_probing " (integer; default: 0; Linux 2.6.17 以降)"
907 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
908 .\"O This parameter controls TCP Packetization-Layer Path MTU Discovery.
909 .\"O The following values may be assigned to the file:
910 このパラメータは、TCP のパケット化レイヤの Path MTU discovery を制御する。
917 .\"O Disabled by default, enabled when an ICMP black hole detected
918 デフォルトでは無効だが、ICMP ブラックホールが検出された場合は有効にする。
920 .\"O Always enabled, use initial MSS of
921 .\"O .IR tcp_base_mss .
928 .\"O .IR tcp_no_metrics_save " (Boolean; default: disabled; since Linux 2.6.6)"
929 .IR tcp_no_metrics_save " (Boolean; default: disabled; Linux 2.6.6 以降)"
930 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
931 .\"O By default, TCP saves various connection metrics in the route cache
932 .\"O when the connection closes, so that connections established in the
933 .\"O near future can use these to set initial conditions.
934 .\"O Usually, this increases overall performance,
935 .\"O but it may sometimes cause performance degradation.
937 .\"O .I tcp_no_metrics_save
938 .\"O is enabled, TCP will not cache metrics on closing connections.
939 デフォルトでは、TCP は接続クローズ時に各種の接続パラメータを
940 ルートキャッシュ (route cache) に保存し、近い将来に接続が確立された際に
941 これらの情報を初期状態として使用できるようになっている。
942 通常は、これにより全体として性能が向上するが、
943 時として性能の劣化を引き起こすこともある。
944 .I tcp_no_metrics_save
945 を有効にすると、TCP は接続クローズ時に接続パラメータをキャッシュ
948 .\"O .IR tcp_orphan_retries " (integer; default: 8; since Linux 2.4)"
949 .IR tcp_orphan_retries " (integer; default: 8; Linux 2.4 以降)"
951 .\"O The maximum number of attempts made to probe the other
952 .\"O end of a connection which has been closed by our end.
956 .\"O .IR tcp_reordering " (integer; default: 3; since Linux 2.4)"
957 .IR tcp_reordering " (integer; default: 3; Linux 2.4 以降)"
958 .\" Since 2.4.0-test7
959 .\"O The maximum a packet can be reordered in a TCP packet stream
960 .\"O without TCP assuming packet loss and going into slow start.
961 .\"O It is not advisable to change this number.
962 .\"O This is a packet reordering detection metric designed to
963 .\"O minimize unnecessary back off and retransmits provoked by
964 .\"O reordering of packets on a connection.
965 TCP パケットストリームでパケット順序の逆転が発生しただけであり、
966 パケットロスが起こったとはみなさない、パケット数の最大値。
967 この値を超えてパケットの順序逆転が起こると、パケットロスが生じたと
970 これは、接続中のパケットの並び替えによって生じる
971 不必要な速度低下や再送を最小化するように設計された、
972 パケット並び替え (packet reordering) の検知メトリックなのである。
974 .\"O .IR tcp_retrans_collapse " (Boolean; default: enabled; since Linux 2.2)"
975 .IR tcp_retrans_collapse " (Boolean; default: enabled; Linux 2.2 以降)"
977 .\"O Try to send full-sized packets during retransmit.
978 再送の際にフルサイズのパケットを送ろうとする。
980 .\"O .IR tcp_retries1 " (integer; default: 3; since Linux 2.2)"
981 .IR tcp_retries1 " (integer; default: 3; Linux 2.2 以降)"
983 .\"O The number of times TCP will attempt to retransmit a
984 .\"O packet on an established connection normally,
985 .\"O without the extra effort of getting the network layers involved.
986 .\"O Once we exceed this number of
987 .\"O retransmits, we first have the network layer
988 .\"O update the route if possible before each new retransmit.
989 .\"O The default is the RFC specified minimum of 3.
991 TCP がネットワーク層を巻き込まずに再送を試みる回数。
993 新しい再送を送る前に可能ならネットワーク層に経路を更新させる。
994 デフォルトは RFC が指定している最少数である 3。
996 .\"O .IR tcp_retries2 " (integer; default: 15; since Linux 2.2)"
997 .IR tcp_retries2 " (integer; default: 15; Linux 2.2 以降)"
999 .\"O The maximum number of times a TCP packet is retransmitted
1000 .\"O in established state before giving up.
1001 .\"O The default value is 15, which corresponds to a duration of
1002 .\"O approximately between 13 to 30 minutes, depending
1003 .\"O on the retransmission timeout.
1004 .\"O The RFC\ 1122 specified
1005 .\"O minimum limit of 100 seconds is typically deemed too short.
1006 確立状態の接続に、この回数 TCP パケットの再送信を
1008 デフォルト値は 15 で、これは (再送のタイムアウトに依存するが)
1009 およそ 13〜30 分程度の期間に対応する。
1010 RFC\ 1122 は最小の限界を 100 秒と置いているが、
1011 これはたいていの場合には短すぎると思われる。
1013 .\"O .IR tcp_rfc1337 " (Boolean; default: disabled; since Linux 2.2)"
1014 .IR tcp_rfc1337 " (Boolean; default: disabled; Linux 2.2 以降)"
1016 .\"O Enable TCP behavior conformant with RFC\ 1337.
1018 .\"O if a RST is received in TIME_WAIT state, we close
1019 .\"O the socket immediately without waiting for the end
1020 .\"O of the TIME_WAIT period.
1021 TCP の動作を RFC\ 1337 に準拠させる。
1022 無効にすると、TIME_WAIT 状態のときに RST が受信された場合、
1023 TIME_WAIT 期間の終了を待たずにそのソケットを直ちにクローズする。
1025 .\"O .IR tcp_rmem " (since Linux 2.4)"
1026 .IR tcp_rmem " (Linux 2.4 以降)"
1027 .\" Since 2.4.0-test7
1028 .\"O This is a vector of 3 integers: [min, default, max].
1029 .\"O These parameters are used by TCP to regulate receive buffer sizes.
1030 .\"O TCP dynamically adjusts the size of the
1031 .\"O receive buffer from the defaults listed below, in the range
1032 .\"O of these values, depending on memory available in the system.
1033 これは 3 つの整数 [min, default, max] からなるベクトル値である。
1034 これらは TCP が受信バッファサイズを調整するために用いられる。
1035 TCP は、システムで利用できるメモリに応じて、
1036 受信バッファのサイズをこれらの変数の範囲で
1037 以下に示すデフォルトから動的に調整する。
1041 .\"O minimum size of the receive buffer used by each TCP socket.
1042 .\"O The default value is the system page size.
1043 .\"O (On Linux 2.4, the default value is 4K, lowered to
1045 .\"O bytes in low-memory systems.)
1047 .\"O is used to ensure that in memory pressure mode,
1048 .\"O allocations below this size will still succeed.
1050 .\"O used to bound the size of the receive buffer declared
1054 各 TCP ソケットが用いる受信バッファの最小サイズ。
1055 デフォルト値はシステムのページサイズである
1056 (Linux 2.4 では、デフォルト値は 4K バイトで、
1061 このサイズの割り当てが成功することを保証するために用いられる。
1064 を用いてソケットの最低受信バッファサイズを宣言する際には用いられない。
1065 .\"nakano Documentation/networking/ip-sysctls.txt
1066 .\"nakano をみる限りではこういう内容のような。
1069 .\"O the default size of the receive buffer for a TCP socket.
1070 .\"O This value overwrites the initial default buffer size from
1071 .\"O the generic global
1072 .\"O .I net.core.rmem_default
1073 .\"O defined for all protocols.
1074 .\"O The default value is 87380 bytes.
1075 .\"O (On Linux 2.4, this will be lowered to 43689 in low-memory systems.)
1076 .\"O If larger receive buffer sizes are desired, this value should
1077 .\"O be increased (to affect all sockets).
1078 .\"O To employ large TCP windows, the
1079 .\"O .I net.ipv4.tcp_window_scaling
1080 .\"O must be enabled (default).
1081 TCP ソケットの受信バッファのデフォルトサイズ。
1082 この値は、すべてのプロトコルに対して定義されている、
1083 ジェネリックなグローバルのデフォルトバッファサイズ
1084 .I net.core.rmem_default
1086 デフォルト値は 87380 バイトである
1087 (Linux 2.4 では、メモリの少ないシステムの場合
1089 大きな受信バッファサイズが必要な場合は、
1090 この値を増やすべきである (すべてのソケットに影響する)。
1091 大きな TCP ウィンドウを用いるには、
1092 .I net.ipv4.tcp_window_scaling
1093 を有効にしておかなければならない (デフォルトは有効)。
1096 .\"O the maximum size of the receive buffer used by each TCP socket.
1097 .\"O This value does not override the global
1098 .\"O .IR net.core.rmem_max .
1099 .\"O This is not used to limit the size of the receive buffer declared using
1102 .\"O The default value is calculated using the formula
1104 .\"O max(87380, min(4MB, \fItcp_mem\fP[1]*PAGE_SIZE/128))
1106 .\"O (On Linux 2.4, the default is 87380*2 bytes,
1107 .\"O lowered to 87380 in low-memory systems).
1108 各 TCP ソケットで用いる受信バッファの最大サイズ。
1110 .I net.core.rmem_max
1114 を用いてソケットの受信バッファサイズ制限を宣言する際には用いられない。
1118 max(87380, min(4MB, \fItcp_mem\fP[1]*PAGE_SIZE/128))
1120 (Linux 2.4 では、デフォルト値は 87380*2 バイトで、
1121 メモリの少ないシステムでは 87380 まで減らされる。)
1124 .\"O .IR tcp_sack " (Boolean; default: enabled; since Linux 2.2)"
1125 .IR tcp_sack " (Boolean; default: enabled; Linux 2.2 以降)"
1127 .\"O Enable RFC\ 2018 TCP Selective Acknowledgements.
1128 RFC\ 2018 の TCP Selective Acknowledgements を有効にする。
1130 .\"O .IR tcp_slow_start_after_idle " (Boolean; default: enabled; since Linux 2.6.18)"
1131 .IR tcp_slow_start_after_idle " (Boolean; default: enabled; Linux 2.6.18 以降)"
1132 .\" The following is from 2.6.28-rc4: Documentation/networking/ip-sysctl.txt
1133 .\"O If enabled, provide RFC 2861 behavior and time out the congestion
1134 .\"O window after an idle period.
1135 .\"O An idle period is defined as the current RTO (retransmission timeout).
1136 .\"O If disabled, the congestion window will not
1137 .\"O be timed out after an idle period.
1138 有効にすると、RFC 2861 の動作が行われ、
1139 アイドル時間経過後に輻輳ウィンドウをタイムアウトさせる。
1140 アイドル時間は現在の RTO (再送タイムアウト) で定義される。
1141 無効にすると、輻輳ウィンドウはアイドル時間経過後もタイムアウトされない。
1143 .\"O .IR tcp_stdurg " (Boolean; default: disabled; since Linux 2.2)"
1144 .IR tcp_stdurg " (Boolean; default: disabled; Linux 2.2 以降)"
1146 .\"O If this option is enabled, then use the RFC\ 1122 interpretation
1147 .\"O of the TCP urgent-pointer field.
1148 .\"O .\" RFC\ 793 was ambiguous in its specification of the meaning of the
1149 .\"O .\" urgent pointer. RFC\ 1122 (and RFC\ 961) fixed on a particular
1150 .\"O .\" resolution of this ambiguity (unfortunately the "wrong" one).
1151 .\"O According to this interpretation, the urgent pointer points
1152 .\"O to the last byte of urgent data.
1153 .\"O If this option is disabled, then use the BSD-compatible interpretation of
1154 .\"O the urgent pointer:
1155 .\"O the urgent pointer points to the first byte after the urgent data.
1156 .\"O Enabling this option may lead to interoperability problems.
1157 このオプションを有効にすると、 TCP 緊急ポインタ (urgent-pointer)
1158 フィールドを RFC\ 1122 に従った解釈を行う。
1159 .\" RFC\ 793 は緊急ポインタの意味の規定が曖昧であった。
1160 .\" RFC\ 1122 (と RFC\ 961) ではこの曖昧さに一つの解決策を定めた
1161 .\" (残念ながら "間違った" 解決策であったが)。
1162 この解釈に従うと、緊急ポインタは緊急データの最後のバイトを指す。
1163 このオプションを無効にすると、緊急ポインタの解釈が BSD 互換の方法で
1164 行われる: 緊急ポインタは緊急データの後の最初のバイトを指す。
1165 このオプションを有効にすると、相互運用性に問題が生じるかもしれない。
1167 .\"O .IR tcp_syn_retries " (integer; default: 5; since Linux 2.2)"
1168 .IR tcp_syn_retries " (integer; default: 5; Linux 2.2 以降)"
1170 .\"O The maximum number of times initial SYNs for an active TCP
1171 .\"O connection attempt will be retransmitted.
1172 .\"O This value should not be higher than 255.
1173 .\"O The default value is 5, which corresponds to approximately 180 seconds.
1174 アクティブな TCP 接続に初期 SYN の再送を試みる最大回数。
1175 この数値は 255 よりも大きくすべきではない。
1176 デフォルトの値は 5 で、およそ 180 秒に対応する。
1178 .\"O .IR tcp_synack_retries " (integer; default: 5; since Linux 2.2)"
1179 .IR tcp_synack_retries " (integer; default: 5; Linux 2.2 以降)"
1181 .\"O The maximum number of times a SYN/ACK segment
1182 .\"O for a passive TCP connection will be retransmitted.
1183 .\"O This number should not be higher than 255.
1184 passive な TCP 接続の SYN/ACK セグメントで再送を試みる最大数。
1185 この数値は 255 よりも大きくすべきではない。
1187 .\"O .IR tcp_syncookies " (Boolean; since Linux 2.2)"
1188 .IR tcp_syncookies " (Boolean; Linux 2.2 以降)"
1190 .\"O Enable TCP syncookies.
1191 .\"O The kernel must be compiled with
1192 .\"O .BR CONFIG_SYN_COOKIES .
1193 .TCP syncookies を有効にする。カーネルは
1194 .B CONFIG_SYNCOOKIES
1195 をつけてコンパイルしておかなければならない。
1196 .\"O Send out syncookies when the syn backlog queue of a socket overflows.
1197 .\"O The syncookies feature attempts to protect a
1198 .\"O socket from a SYN flood attack.
1199 .\"O This should be used as a last resort, if at all.
1200 .\"O This is a violation of the TCP protocol,
1201 .\"O and conflicts with other areas of TCP such as TCP extensions.
1202 .\"O It can cause problems for clients and relays.
1203 .\"O It is not recommended as a tuning mechanism for heavily
1204 .\"O loaded servers to help with overloaded or misconfigured conditions.
1205 .\"O For recommended alternatives see
1206 .\"O .IR tcp_max_syn_backlog ,
1207 .\"O .IR tcp_synack_retries ,
1209 .\"O .IR tcp_abort_on_overflow .
1210 ソケットのバックログキューがオーバーフローすると、
1212 syncookies 機能は、SYN flood 攻撃からソケットを守ろうとする。
1213 これはいずれにしても、最終手段として用いるべきである。
1214 これは TCP プロトコルに違反しており、
1215 TCP 拡張のような、TCP の他の部分と衝突してしまう。
1216 クライアントやリレーで問題が起こることもある。
1217 過負荷や設定間違いによって負荷の大きな状態にあるサーバを調整して救うための
1220 .IR tcp_max_syn_backlog ,
1221 .IR tcp_synack_retries ,
1222 .I tcp_abort_on_overflow
1225 .\"O .IR tcp_timestamps " (Boolean; default: enabled; since Linux 2.2)"
1226 .IR tcp_timestamps " (Boolean; default: enabled; Linux 2.2 以降)"
1228 .\"O Enable RFC\ 1323 TCP timestamps.
1229 RFC\ 1323 の TCP timestamps を有効にする。
1231 .\"O .IR tcp_tso_win_divisor " (integer; default: 3; since Linux 2.6.9)"
1232 .IR tcp_tso_win_divisor " (integer; default: 3; Linux 2.6.9 以降)"
1233 .\"O This parameter controls what percentage of the congestion window
1234 .\"O can be consumed by a single TCP Segmentation Offload (TSO) frame.
1235 .\"O The setting of this parameter is a tradeoff between burstiness and
1236 .\"O building larger TSO frames.
1237 このパラメータは、一つの TCP Segmentation Offload (TSO) フレームで
1238 消費できる輻輳ウィンドウの割合 (パーセント) を制御する。
1239 バースト性と、どれだけ大きな TSO フレームを構築するかのはトレードオフであり、
1242 .\"O .IR tcp_tw_recycle " (Boolean; default: disabled; since Linux 2.4)"
1243 .IR tcp_tw_recycle " (Boolean; default: disabled; Linux 2.4 以降)"
1245 .\"O Enable fast recycling of TIME_WAIT sockets.
1246 .\"O Enabling this option is not
1247 .\"O recommended since this causes problems when working
1248 .\"O with NAT (Network Address Translation).
1249 TIME_WAIT ソケットの素早い再利用を有効にする。
1251 NAT (ネットワークアドレス変換) を用いていると問題が生じるので、
1254 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
1256 .\"O .IR tcp_tw_reuse " (Boolean; default: disabled; since Linux 2.4.19/2.6)"
1257 .IR tcp_tw_reuse " (Boolean; default: disabled; Linux 2.4.19/2.6 以降)"
1258 .\" Since 2.4.19/2.5.43
1259 .\"O Allow to reuse TIME_WAIT sockets for new connections when it is
1260 .\"O safe from protocol viewpoint.
1261 .\"O It should not be changed without advice/request of technical experts.
1262 プロトコルの面から見て問題ない場合に新規コネクションに TIME_WAIT
1263 状態のソケットを再利用することを許可する。技術的に詳しい人の助言や
1264 要請なしにこのオプションを変更すべきではない。
1266 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
1268 .\"O .IR tcp_vegas_cong_avoid " (Boolean; default: disabled; Linux 2.2 to 2.6.13)"
1269 .IR tcp_vegas_cong_avoid " (Boolean; default: disabled; Linux 2.2 から 2.6.13 まで)"
1270 .\" Since 2.1.8; removed in 2.6.13
1271 .\"O Enable TCP Vegas congestion avoidance algorithm.
1272 .\"O TCP Vegas is a sender-side only change to TCP that anticipates
1273 .\"O the onset of congestion by estimating the bandwidth.
1274 .\"O TCP Vegas adjusts the sending rate by modifying the congestion window.
1275 .\"O TCP Vegas should provide less packet loss, but it is
1276 .\"O not as aggressive as TCP Reno.
1277 TCP Vegas 輻輳制御アルゴリズムを有効にする。
1278 TCP Vegas は帯域を推測することで輻輳の起こり始めを予想するように
1279 TCP の送信側のみに変更を加えたものである。
1280 TCP Vegas は輻輳ウィンドウを修正することで、送信レートを調整する。
1281 TCP Vegas は TCP Reno と比べてパケットロスは少ないが、
1282 TCP Reno ほど積極的な挙動はしない。
1284 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
1286 .\"O .IR tcp_westwood " (Boolean; default: disabled; Linux 2.4.26/2.6.3 to 2.6.13)"
1287 .IR tcp_westwood " (Boolean; default: disabled; Linux 2.4.26/2.6.3 から 2.6.13 まで)"
1288 .\"O Enable TCP Westwood+ congestion control algorithm.
1289 .\"O TCP Westwood+ is a sender-side only modification of the TCP Reno
1290 .\"O protocol stack that optimizes the performance of TCP congestion control.
1291 .\"O It is based on end-to-end bandwidth estimation to set
1292 .\"O congestion window and slow start threshold after a congestion episode.
1293 .\"O Using this estimation, TCP Westwood+ adaptively sets a
1294 .\"O slow start threshold and a congestion window which takes into
1295 .\"O account the bandwidth used at the time congestion is experienced.
1296 .\"O TCP Westwood+ significantly increases fairness with respect to
1297 .\"O TCP Reno in wired networks and throughput over wireless links.
1298 TCP Westwood+ 輻輳制御アルゴリズムを有効にする。
1299 TCP Westwood+ は TCP 輻輳制御の性能を最適化するように TCP Reno の
1300 プロトコルスタックの送信側のみに修正を加えたものである。
1301 輻輳が起こった後で、輻輳ウィンドウや slow start の閾値を
1302 通信両端間の帯域の推測に基づいて設定する。
1303 この推測を使って、TCP Westwood+ は輻輳が発生した時に使っていた
1304 帯域を考慮に入れた slow start の閾値と輻輳ウィンドウを設定する。
1305 TCP Westwood+ は、有線ネットワークにおける TCP Reno の公平性
1306 (fairness) と、無線リンクでのスループットを大きく向上する。
1308 .\"O .IR tcp_window_scaling " (Boolean; default: enabled; since Linux 2.2)"
1309 .IR tcp_window_scaling " (Boolean; default: enabled; Linux 2.2 以降)"
1311 .\"O Enable RFC\ 1323 TCP window scaling.
1312 .\"O This feature allows the use of a large window
1313 .\"O (> 64K) on a TCP connection, should the other end support it.
1314 .\"O Normally, the 16 bit window length field in the TCP header
1315 .\"O limits the window size to less than 64K bytes.
1316 .\"O If larger windows are desired, applications can increase the size of
1317 .\"O their socket buffers and the window scaling option will be employed.
1319 .\"O .I tcp_window_scaling
1320 .\"O is disabled, TCP will not negotiate the use of window
1321 .\"O scaling with the other end during connection setup.
1322 RFC\ 1323 の TCP ウィンドウスケーリングを有効にする。
1323 この機能を用いると、接続先が対応していれば、
1324 TCP 接続で大きな (64K 以上の) ウィンドウが使えるようになる。
1325 通常は TCP ヘッダのウインドウ長フィールドは 16 ビットなので、
1326 ウィンドウサイズは 64K バイト以下に限られる。
1327 もっと大きなウィンドウを使いたい場合は、
1328 アプリケーションはソケットバッファのサイズを増やして、
1329 ウィンドウスケーリングのオプションを利用すればよい。
1330 .I tcp_window_scaling
1333 ウィンドウスケーリングのネゴシエーションを行なわない。
1335 .\"O .IR tcp_wmem " (since Linux 2.4)"
1336 .IR tcp_wmem " (Linux 2.4 以降)"
1337 .\" Since 2.4.0-test7
1338 .\"O This is a vector of 3 integers: [min, default, max].
1339 .\"O These parameters are used by TCP to regulate send buffer sizes.
1340 .\"O TCP dynamically adjusts the size of the send buffer from the
1341 .\"O default values listed below, in the range of these values,
1342 .\"O depending on memory available.
1343 これは 3 つの整数 [min, default, max] からなるベクトル値である。
1344 これらは TCP が送信バッファサイズを調整するために用いられる。
1345 TCP は、システムで利用できるメモリに応じて、送信バッファのサイズを
1346 これらの変数の範囲で以下に示すデフォルトから動的に調整する。
1350 .\"O Minimum size of the send buffer used by each TCP socket.
1351 .\"O The default value is the system page size.
1352 .\"O (On Linux 2.4, the default value is 4K bytes.)
1353 .\"O This value is used to ensure that in memory pressure mode,
1354 .\"O allocations below this size will still succeed.
1355 .\"O This is not used to bound the size of the send buffer declared using
1358 各 TCP ソケットが用いる送信バッファの最小サイズ。
1359 デフォルト値はシステムのページサイズである
1360 (Linux 2.4 では、デフォルト値は 4K である)。
1362 このサイズ以下の割り当てが成功することを保証するために用いられる。
1365 を用いてソケットの最低送信バッファサイズを宣言する際には用いられない。
1368 .\"O The default size of the send buffer for a TCP socket.
1369 .\"O This value overwrites the initial default buffer size from
1370 .\"O the generic global
1371 .\"O .I /proc/sys/net/core/wmem_default
1372 .\"O defined for all protocols.
1373 .\"O The default value is 16K bytes.
1374 .\"O .\" True in Linux 2.4 and 2.6
1375 .\"O If larger send buffer sizes are desired, this value
1376 .\"O should be increased (to affect all sockets).
1377 .\"O To employ large TCP windows, the
1378 .\"O .I /proc/sys/net/ipv4/tcp_window_scaling
1379 .\"O must be set to a nonzero value (default).
1380 TCP ソケットの送信バッファのデフォルトサイズ。
1381 この値は、すべてのプロトコルに対して定義されている、
1382 ジェネリックなグローバルのデフォルトバッファサイズ
1383 .I /proc/sys/net/core/wmem_default
1386 .\" Linux 2.4 と 2.6 では正しい。
1387 大きな送信バッファサイズが必要な場合は、
1388 この値を増やすべきである (すべてのソケットに影響する)。
1389 大きな TCP ウィンドウを用いるには、
1390 .I /proc/sys/net/ipv4/tcp_window_scaling
1391 を 0 以外の値 (デフォルト値) にしておかなければならない。
1394 .\"O The maximum size of the send buffer used by each TCP socket.
1395 .\"O This value does not override the value in
1396 .\"O .IR /proc/sys/net/core/wmem_max .
1397 .\"O This is not used to limit the size of the send buffer declared using
1400 .\"O The default value is calculated using the formula
1402 .\"O max(65536, min(4MB, \fItcp_mem\fP[1]*PAGE_SIZE/128))
1404 .\"O (On Linux 2.4, the default value is 128K bytes,
1405 .\"O lowered 64K depending on low-memory systems.)
1406 各 TCP ソケットで用いる送信バッファの最大サイズ。
1408 .IR /proc/sys/net/core/wmem_max
1412 を用いてソケットの送信バッファサイズ制限を宣言する際には用いられない。
1415 max(65536, min(4MB, \fItcp_mem\fP[1]*PAGE_SIZE/128))
1417 (Linux 2.4 では、デフォルト値は 128K バイトで、
1418 メモリの少ないシステムでは 64K にまで減らされる。)
1421 .\"O .IR tcp_workaround_signed_windows " (Boolean; default: disabled; since Linux 2.6.26)"
1422 .IR tcp_workaround_signed_windows " (Boolean; default: disabled; Linux 2.6.26 以降)"
1423 .\"O If enabled, assume that no receipt of a window-scaling option means that the
1424 .\"O remote TCP is broken and treats the window as a signed quantity.
1425 .\"O If disabled, assume that the remote TCP is not broken even if we do
1426 .\"O not receive a window scaling option from it.
1427 有効にすると、ウィンドウスケーリングオプションを受信しないのは、
1428 接続相手の TCP が壊れていると考え、ウィンドウを符号付きの量とみなす。
1429 無効にすると、接続相手からウィンドウスケーリングオプションを受信しなかった
1430 場合であっても、接続相手の TCP が壊れているとはみなさない。
1431 .\"O .SS Socket Options
1433 .\"O To set or get a TCP socket option, call
1434 .\"O .BR getsockopt (2)
1436 .\"O .BR setsockopt (2)
1437 .\"O to write the option with the option level argument set to
1438 .\"O .BR IPPROTO_TCP .
1450 .\"O socket options are valid on TCP sockets.
1451 .\"O For more information see
1455 ソケットオプションも TCP ソケットに対して有効である。詳細は
1458 .\" FIXME Document TCP_CONGESTION (new in 2.6.13)
1460 .\"O .BR TCP_CORK " (since Linux 2.2)"
1461 .BR TCP_CORK " (Linux 2.2 以降)"
1462 .\" precisely: since 2.1.127
1463 .\"O If set, don't send out partial frames.
1464 .\"O All queued partial frames are sent when the option is cleared again.
1465 .\"O This is useful for prepending headers before calling
1466 .\"O .BR sendfile (2),
1467 .\"O or for throughput optimization.
1468 .\"O As currently implemented, there is a 200 millisecond ceiling on the time
1469 .\"O for which output is corked by
1471 .\"O If this ceiling is reached, then queued data is automatically transmitted.
1472 .\"O This option can be combined with
1474 .\"O only since Linux 2.5.71.
1475 .\"O This option should not be used in code intended to be portable.
1476 セットされると、 partial フレームを送信しない。
1478 キューイングされた partial フレームが送られる。これは
1481 スループットを最適化したい場合に便利である。
1484 で出力を抑えることができる時間の上限は 200 ミリ秒である。
1485 この上限に達すると、キューイングされたデータは自動的に送信される。
1486 Linux 2.5.71 以降においてのみ、このオプションを
1489 移植性の必要なプログラムではこのオプションを用いるべきではない。
1491 .\"O .BR TCP_DEFER_ACCEPT " (since Linux 2.4)"
1492 .BR TCP_DEFER_ACCEPT " (Linux 2.4 以降)"
1493 .\" Precisely: since 2.3.38
1494 .\"O Allow a listener to be awakened only when data arrives on the socket.
1495 .\"O Takes an integer value (seconds), this can
1496 .\"O bound the maximum number of attempts TCP will make to
1497 .\"O complete the connection.
1498 .\"O This option should not be used in code intended to be portable.
1499 これを用いると、リスナはデータがソケットに到着した時のみ目覚めるようになる。
1501 TCP が接続を完了しようと試みる回数を制限できる。
1502 移植性の必要なプログラムではこのオプションを用いるべきではない。
1504 .\"O .BR TCP_INFO " (since Linux 2.4)"
1505 .BR TCP_INFO " (Linux 2.4 以降)"
1506 .\"O Used to collect information about this socket.
1507 .\"O The kernel returns a \fIstruct tcp_info\fP as defined in the file
1508 .\"O .IR /usr/include/linux/tcp.h .
1509 .\"O This option should not be used in
1510 .\"O code intended to be portable.
1511 このソケットの情報を収集するのに用いる。
1513 .I /usr/include/linux/tcp.h
1515 \fIstruct tcp_info\fP を返す。
1516 移植性の必要なプログラムではこのオプションを用いるべきではない。
1518 .\"O .BR TCP_KEEPCNT " (since Linux 2.4)"
1519 .BR TCP_KEEPCNT " (Linux 2.4 以降)"
1520 .\" Precisely: since 2.3.18
1521 .\"O The maximum number of keepalive probes TCP should send
1522 .\"O before dropping the connection.
1523 .\"O This option should not be
1524 .\"O used in code intended to be portable.
1525 接続を落とす前に TCP が試みる keepalive プローブの最大回数。
1526 移植性の必要なプログラムではこのオプションを用いるべきではない。
1528 .\"O .BR TCP_KEEPIDLE " (since Linux 2.4)"
1529 .BR TCP_KEEPIDLE " (Linux 2.4 以降)"
1530 .\" Precisely: since 2.3.18
1531 .\"O The time (in seconds) the connection needs to remain idle
1532 .\"O before TCP starts sending keepalive probes, if the socket
1534 .\"O .B SO_KEEPALIVE
1535 .\"O has been set on this socket.
1536 .\"O This option should not be used in code intended to be portable.
1537 この時間 (秒単位) を越えて接続がアイドル状態に留まっていると、
1540 ソケットオプションが設定されている場合、
1541 TCP は keepalive プローブを送りはじめる。
1542 移植性の必要なプログラムではこのオプションを用いるべきではない。
1544 .\"O .BR TCP_KEEPINTVL " (since Linux 2.4)"
1545 .BR TCP_KEEPINTVL " (Linux 2.4 以降)"
1546 .\" Precisely: since 2.3.18
1547 .\"O The time (in seconds) between individual keepalive probes.
1548 .\"O This option should not be used in code intended to be portable.
1549 各 keepalive プローブの間隔 (秒単位)。
1550 移植性の必要なプログラムではこのオプションを用いるべきではない。
1552 .\"O .BR TCP_LINGER2 " (since Linux 2.4)"
1553 .BR TCP_LINGER2 " (Linux 2.4 以降)"
1554 .\" Precisely: since 2.3.41
1555 .\"O The lifetime of orphaned FIN_WAIT2 state sockets.
1556 .\"O This option can be used to override the system-wide setting in the file
1557 .\"O .I /proc/sys/net/ipv4/tcp_fin_timeout
1558 .\"O for this socket.
1559 .\"O This is not to be confused with the
1562 .\"O .BR SO_LINGER .
1563 .\"O This option should not be used in code intended to be portable.
1564 orphan された FIN_WAIT2 状態のソケットの寿命。
1565 このオプションを用いると、システム全体に適用されるファイル
1566 .I /proc/sys/net/ipv4/tcp_fin_timeout
1567 の値を、このソケットに対してのみ変更できる。
1572 移植性の必要なプログラムではこのオプションを用いるべきではない。
1575 .\" Present in Linux 1.0
1576 .\"O The maximum segment size for outgoing TCP packets.
1577 .\"O If this option is set before connection establishment, it also
1578 .\"O changes the MSS value announced to the other end in the initial packet.
1579 .\"O Values greater than the (eventual) interface MTU have no effect.
1580 .\"O TCP will also impose
1581 .\"O its minimum and maximum bounds over the value provided.
1582 送出 TCP パケットの最大セグメントサイズ。
1583 このオプションを接続確立の前に設定すると、
1584 初期パケットで他端にアナウンスする MSS の値も変化する。
1585 インターフェースの MTU よりも大きな (あるいは大きくなってしまった)
1587 また TCP は、この値よりも最小・最大の制限の方を優先する。
1589 .\" Document TCP_MD5SIG, added in Linux 2.6.20,
1590 .\" Needs CONFIG_TCP_MD5SIG
1591 .\" From net/inet/Kconfig
1592 .\" bool "TCP: MD5 Signature Option support (RFC2385) (EXPERIMENTAL)"
1593 .\" RFC2385 specifies a method of giving MD5 protection to TCP sessions.
1594 .\" Its main (only?) use is to protect BGP sessions between core routers
1595 .\" on the Internet.
1597 .\" There is a TCP_MD5SIG option documented in FreeBSD's tcp(4),
1598 .\" but probably many details are different on Linux
1599 .\" Authors were yoshfuji@linux-ipv6.org and Dave Muller
1600 .\" http://thread.gmane.org/gmane.linux.network/47490
1601 .\" http://www.daemon-systems.org/man/tcp.4.html
1602 .\" http://article.gmane.org/gmane.os.netbsd.devel.network/3767/match=tcp_md5sig+freebsd
1605 .\" Present in Linux 1.0
1606 .\"O If set, disable the Nagle algorithm.
1607 .\"O This means that segments
1608 .\"O are always sent as soon as possible, even if there is only a
1609 .\"O small amount of data.
1610 .\"O When not set, data is buffered until there
1611 .\"O is a sufficient amount to send out, thereby avoiding the
1612 .\"O frequent sending of small packets, which results in poor
1613 .\"O utilization of the network.
1614 .\"O This option is overridden by
1616 .\"O however, setting this option forces an explicit flush of
1617 .\"O pending output, even if
1619 .\"O is currently set.
1620 設定すると Nagle アルゴリズムを無効にする。
1622 各セグメントは可能な限り早く送信される。
1624 送信する分だけ溜まるまでデータはバッファされ、
1631 が設定されている場合であっても、このオプションを設定すると、
1632 送信待ちの出力を明示的に掃き出す (flush) ことになる。
1634 .\"O .BR TCP_QUICKACK " (since Linux 2.4.4)"
1635 .BR TCP_QUICKACK " (Linux 2.4.4 以降)"
1636 .\"O Enable quickack mode if set or disable quickack
1637 .\"O mode if cleared.
1638 .\"O In quickack mode, acks are sent
1639 .\"O immediately, rather than delayed if needed in accordance
1640 .\"O to normal TCP operation.
1641 .\"O This flag is not permanent,
1642 .\"O it only enables a switch to or from quickack mode.
1643 .\"O Subsequent operation of the TCP protocol will
1644 .\"O once again enter/leave quickack mode depending on
1645 .\"O internal protocol processing and factors such as
1646 .\"O delayed ack timeouts occurring and data transfer.
1647 .\"O This option should not be used in code intended to be
1649 設定されていると quickack モードを有効にし、クリアされると無効にする。
1650 通常の TCP 動作では ack は必要に応じて遅延されるのに対し、
1651 quickack モードでは ack はすぐに送信される。
1653 quickack モードから/モードへ切り替えるためのものである。
1654 これ以降の TCP プロトコルの動作によっては、
1655 内部のプロトコル処理や、遅延 ack タイムアウトの発生、
1657 再び quickack から出たり入ったりする。
1658 移植性の必要なプログラムではこのオプションを用いるべきではない。
1660 .\"O .BR TCP_SYNCNT " (since Linux 2.4)"
1661 .BR TCP_SYNCNT " (Linux 2.4 以降)"
1662 .\" Precisely: since 2.3.18
1663 .\"O Set the number of SYN retransmits that TCP should send before
1664 .\"O aborting the attempt to connect.
1665 .\"O It cannot exceed 255.
1666 .\"O This option should not be used in code intended to be portable.
1667 接続の試行を中止させる前に TCP が送る SYN 再送数を設定する。
1669 移植性の必要なプログラムではこのオプションを用いるべきではない。
1671 .\"O .BR TCP_WINDOW_CLAMP " (since Linux 2.4)"
1672 .BR TCP_WINDOW_CLAMP " (Linux 2.4 以降)"
1673 .\" Precisely: since 2.3.41
1674 .\"O Bound the size of the advertised window to this value.
1675 .\"O The kernel imposes a minimum size of SOCK_MIN_RCVBUF/2.
1676 .\"O This option should not be used in code intended to be
1678 広報するウィンドウのサイズをこの値に固定する。
1679 カーネルによって最小サイズは SOCK_MIN_RCVBUF/2 に制限されている。
1680 このオプションは移植性の必要なコードでは用いるべきでない。
1681 .\"O .SS Sockets API
1683 .\"O TCP provides limited support for out-of-band data,
1684 .\"O in the form of (a single byte of) urgent data.
1685 .\"O In Linux this means if the other end sends newer out-of-band
1686 .\"O data the older urgent data is inserted as normal data into
1687 .\"O the stream (even when
1688 .\"O .B SO_OOBINLINE
1690 .\"O This differs from BSD-based stacks.
1691 TCP は帯域外データ (out-of-band data) を限定的にサポートしており、
1692 (1 バイトの) 緊急データという形である。
1694 接続先が (新しいやり方の) 帯域外データを送ってきた場合、
1696 緊急データは通常のデータとしてストリームに挿入されることになる (これは
1698 がセットされている場合でも同様である)。
1699 これは BSD ベースのスタックとは異なる。
1701 .\"O Linux uses the BSD compatible interpretation of the urgent
1702 .\"O pointer field by default.
1703 .\"O This violates RFC\ 1122, but is
1704 .\"O required for interoperability with other stacks.
1705 .\"O It can be changed via
1706 .\"O .IR /proc/sys/net/ipv4/tcp_stdurg .
1707 Linux は、デフォルトでは urgent ポインタフィールドの解釈に
1708 BSD 互換の方法を用いる。これは RFC\ 1122 に反しているが、
1709 他のスタックと同時に動作させるにはやむを得ない。これは
1710 .I /proc/sys/net/ipv4/tcp_stdurg
1713 .\"O It is possible to peek at out-of-band data using the
1720 フラグを使うと、帯域外データを覗き見することができる。
1722 .\"O Since version 2.4, Linux supports the use of
1729 .\"O .BR recvmsg (2)).
1739 .\"O This flag causes the received bytes of data to be discarded,
1740 .\"O rather than passed back in a caller-supplied buffer.
1741 .\"O Since Linux 2.4.4,
1743 .\"O also has this effect when used in conjunction with
1745 .\"O to receive out-of-band data.
1746 このフラグを指定すると、受信データは、呼び出し元から渡されたバッファ
1747 にコピーされて返されるのではなく、廃棄されるようになる。
1752 と組み合わせて使った場合にも、これと同じ効果を持つようになっている。
1755 .\"O These following
1757 .\"O calls return information in
1759 .\"O The correct syntax is:
1770 .IB error " = ioctl(" tcp_socket ", " ioctl_type ", &" value ");"
1775 .\"O is one of the following:
1780 .\"O Returns the amount of queued unread data in the receive buffer.
1781 .\"O The socket must not be in LISTEN state, otherwise an error
1784 受信バッファのキューにある、まだ読んでいないデータの量を返す。
1785 ソケットは LISTEN 状態にあってはならず、
1791 .\"O Returns true (i.e.,
1793 .\"O is nonzero) if the inbound data stream is at the urgent mark.
1794 受信データストリームが緊急マークの位置であれば、真を返す (つまり
1799 .\"O .B SO_OOBINLINE
1800 .\"O socket option is set, and
1802 .\"O returns true, then the
1803 .\"O next read from the socket will return the urgent data.
1805 .\"O .B SO_OOBINLINE
1806 .\"O socket option is not set, and
1808 .\"O returns true, then the
1809 .\"O next read from the socket will return the bytes following
1810 .\"O the urgent data (to actually read the urgent data requires the
1811 .\"O .B recv(MSG_OOB)
1816 が真を返した場合、次のソケットからの読み込みでは緊急データが
1821 が真を返した場合、次のソケットからの読み込みでは緊急データに
1822 続くデータが返される (実際に緊急データを読み込むには
1826 .\"O Note that a read never reads across the urgent mark.
1827 .\"O If an application is informed of the presence of urgent data via
1831 .\"O argument) or through delivery of a
1834 .\"O then it can advance up to the mark using a loop which repeatedly tests
1836 .\"O and performs a read (requesting any number of bytes) as long as
1839 データの一回の読み込みでは緊急マークを跨がっての読み込みは行われない。
1848 のチェックと読み込み (何バイト読み込み要求をしてもよい) を
1850 が偽を返さなくなるまで繰り返し行うことで、緊急マークの位置まで
1854 .\"O Returns the amount of unsent data in the socket send queue.
1855 .\"O The socket must not be in LISTEN state, otherwise an error
1858 ソケットの送信キューに残っている未送信データの量を返す。
1859 ソケットは LISTEN 状態にあってはならない。
1863 .\"O .SS Error Handling
1865 .\"O When a network error occurs, TCP tries to resend the packet.
1866 .\"O If it doesn't succeed after some time, either
1868 .\"O or the last received error on this connection is reported.
1869 ネットワークエラーが起こると、 TCP はパケットの再送を試みる。
1870 何回かやっても成功しなければ、この接続に対して
1872 エラーか最後に受信したエラーが返される。
1874 .\"O Some applications require a quicker error notification.
1875 .\"O This can be enabled with the
1880 .\"O When this option is enabled, all incoming
1881 .\"O errors are immediately passed to the user program.
1882 .\"O Use this option with care \(em it makes TCP less tolerant to routing
1883 .\"O changes and other normal network conditions.
1884 アプリケーションによっては、もっと早くエラーを知らせてほしい場合がある。
1889 ソケットオプションを用いると良い。このオプションが有効になっていると、
1890 到着したエラーはすべてただちにユーザープログラムに渡される。
1891 このオプションは慎重に用いること \(em ルーティングの変更など、
1892 通常ありうるネットワーク状態に対して TCP をより脆弱にしてしまう。
1897 .\"O Passed socket address type in
1907 .\"O The other end closed the socket unexpectedly or a read is
1908 .\"O executed on a shut down socket.
1909 接続先が予期しなかったかたちでソケットをクローズした。
1910 またはシャットダウンされたソケットに読み込みが実行された。
1913 .\"O The other end didn't acknowledge retransmitted data after some time.
1914 接続先が、何回かデータを再送しても反応しない。
1916 .\"O Any errors defined for
1918 .\"O or the generic socket layer may also be returned for TCP.
1920 で定義されているエラーや、ジェネリックなソケット層におけるエラーも
1924 .\"O Support for Explicit Congestion Notification, zero-copy
1925 .\"O .BR sendfile (2),
1926 .\"O reordering support and some SACK extensions
1927 .\"O (DSACK) were introduced in 2.4.
1928 .\"O Support for forward acknowledgement (FACK), TIME_WAIT recycling,
1929 .\"O and per-connection keepalive socket options were introduced in 2.3.
1930 Explicit Congestion Notification、zero-copy の
1932 並び替えのサポート、SACK 拡張 (DSACK) などのサポートは
1934 フォワード確認 (FACK)、TIME_WAIT リサイクル、接続ごとの keepalive
1935 に対するソケットオプションは 2.3 で導入された。
1938 .\"O Not all errors are documented.
1941 .\"O IPv6 is not described.
1943 .\" Only a single Linux kernel version is described
1944 .\" Info for 2.2 was lost. Should be added again,
1945 .\" or put into a separate page.
1946 .\"O .SH .\" AUTHORS
1948 .\"O .\" This man page was originally written by Andi Kleen.
1949 .\"O .\" It was updated for 2.4 by Nivedita Singhvi with input from
1950 .\"O .\" Alexey Kuznetsov's Documentation/networking/ip-sysctl.txt
1952 .\" この man ページは最初 Andi Kleen によって書かれた。
1953 .\" Alexey Kuznetsov の文書 Documentation/networking/ip-sysctl.txt
1954 .\" の情報を元に、Nivedita Singhvi が 2.4 向けに更新した。
1969 .\"O RFC\ 793 for the TCP specification.
1972 .\"O RFC\ 1122 for the TCP requirements and a description of the Nagle algorithm.
1973 RFC\ 1122: TCP の要求事項と Nagle アルゴリズムの記述。
1975 .\"O RFC\ 1323 for TCP timestamp and window scaling options.
1976 RFC\ 1323: TCP のタイムスタンプ・ウィンドウスケーリング各オプション。
1978 .\"O RFC\ 1644 for a description of TIME_WAIT assassination hazards.
1979 RFC\ 1644: TIME_WAIT assassination hazard に関する記述。
1981 .\"O RFC\ 3168 for a description of Explicit Congestion Notification.
1982 RFC\ 3168: Explicit Congestion Notification に関する記述。
1984 .\"O RFC\ 2581 for TCP congestion control algorithms.
1985 RFC\ 2581: TCP 輻輳制御アルゴリズム。
1987 .\"O RFC\ 2018 and RFC\ 2883 for SACK and extensions to SACK.
1988 RFC\ 2018 と RFC\ 2883: SACK とその拡張。