2 .\" Don't change the line above. it tells man that tbl is needed.
3 .\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
4 .\" Permission is granted to distribute possibly modified copies
5 .\" of this page provided the header is included verbatim,
6 .\" and in case of nontrivial modification author and date
7 .\" of the modification is added to the header.
8 .\" $Id: ip.7,v 1.19 2000/12/20 18:10:31 ak Exp $
10 .\" Japanese Version Copyright (c) 1999 NAKANO Takeo all rights reserved.
11 .\" Translated 1999-12-06, NAKANO Takeo <nakano@apm.seikei.ac.jp>
12 .\" Updated 2001-02-14, Kentaro Shirakata <argrath@ub32.org>
13 .\" Updated 2001-04-04, Yuichi SATO <ysato@h4.dion.ne.jp>
14 .\" Updated & Modified 2003-10-16, Yuichi SATO <ysato444@yahoo.co.jp>
15 .\" Updated & Modified 2005-01-22, Yuichi SATO
16 .\" Updated & Modified 2005-09-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
17 .\" Updated & Modified 2005-10-06, Akihiro MOTOKI
18 .\" Updated 2007-01-05, Akihiro MOTOKI, Catch up to LDP man-pages 2.43
19 .\" Updated 2007-05-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.48
20 .\" Updated 2008-12-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.14
22 .\"WORD ancillary message 補助メッセージ
23 .\"WORD ... oriented 〜指向の
26 .\"WORD drop(ped) (パケットを) 落とす、(受動の場合) 到着しない
29 .TH IP 7 2009-02-28 "Linux" "Linux Programmer's Manual"
32 .\"O ip \- Linux IPv4 protocol implementation
33 ip \- Linux IPv4 プロトコルの実装
36 .B #include <sys/socket.h>
38 .\" .B #include <net/netinet.h> -- does not exist anymore
39 .\" .B #include <linux/errqueue.h> -- never include <linux/foo.h>
40 .B #include <netinet/in.h>
42 .\"O .B #include <netinet/ip.h> \fR/* superset of previous */
43 .B #include <netinet/ip.h> \fR/* 上記のスーパーセット */
45 .IB tcp_socket " = socket(AF_INET, SOCK_STREAM, 0);"
47 .IB udp_socket " = socket(AF_INET, SOCK_DGRAM, 0);"
49 .IB raw_socket " = socket(AF_INET, SOCK_RAW, " protocol ");"
52 .\"O Linux implements the Internet Protocol, version 4,
53 .\"O described in RFC\ 791 and RFC\ 1122.
55 .\"O contains a level 2 multicasting implementation conforming to RFC\ 1112.
56 .\"O It also contains an IP router including a packet filter.
57 Linux は RFC\ 791 と RFC\ 1122 で記述されている
58 Internet Protocol, version 4 を実装している。
60 には RFC\ 1112 に準拠した level 2 マルチキャストの実装が含まれている。
61 またパケットフィルタ機能を含む IP ルーターも実装されている。
62 .\" FIXME has someone verified that 2.1 is really 1812 compliant?
64 .\"O The programming interface is BSD-sockets compatible.
65 .\"O For more information on sockets, see
67 プログラミング・インターフェースは BSD ソケットと互換である。
72 .\"O An IP socket is created by calling the
75 .\"O .BR "socket(AF_INET, socket_type, protocol)" .
79 .B "socket(AF_INET, socket_type, protocol)"
81 .\"O Valid socket types are
93 .\"O socket to access the IP protocol directly.
107 .\"O is the IP protocol in the IP header to be received or sent.
108 .\"O The only valid values for
112 .\"O for TCP sockets, and 0 and
114 .\"O for UDP sockets.
117 .\"O you may specify a valid IANA IP protocol defined in
118 .\"O RFC\ 1700 assigned numbers.
120 は送受信される IP ヘッダに書かれる IP プロトコルである。
128 に対しては、 RFC\ 1700 で定義されている有効な IANA IP プロトコルを、
129 割り当てられている番号で指定することができる。
131 .\" FIXME ip current does an autobind in listen, but I'm not sure
132 .\" if that should be documented.
133 .\"O When a process wants to receive new incoming packets or connections, it
134 .\"O should bind a socket to a local interface address using
136 .\"O Only one IP socket may be bound to any given local (address, port) pair.
139 .\"O is specified in the bind call, the socket will be bound to
141 .\"O local interfaces.
146 .\"O are called on an unbound socket, it is automatically bound to a
147 .\"O random free port with the local address set to
148 .\"O .BR INADDR_ANY .
149 あるプロセスで、やってくるパケットを受信したり
151 そのプロセスはローカルなインターフェースアドレスに、
153 を用いてソケットをバインドしなければならない。
154 あるローカルな「アドレスとポート」のペアに対してバインドできる
159 が指定されていた場合は、ソケットはローカルなインターフェースの
164 がバインドされていないソケットでコールされると、
165 そのソケットは自動的にローカルなアドレスを
167 にセットし、空いているポートをランダムに選んでバインドする。
169 .\"O A TCP local socket address that has been bound is unavailable for
170 .\"O some time after closing, unless the
172 .\"O flag has been set.
173 .\"O Care should be taken when using this flag as it makes TCP less reliable.
176 バインドされていた TCP ローカルソケットアドレスは
177 クローズされた後しばらくの間使えなくなる。
179 フラグを使うと TCP の信頼性を低下させるので、
181 .\"O .SS Address Format
183 .\"O An IP socket address is defined as a combination of an IP interface
184 .\"O address and a 16-bit port number.
185 .\"O The basic IP protocol does not supply port numbers, they
186 .\"O are implemented by higher level protocols like
192 .\"O is set to the IP protocol.
193 IP ソケットアドレスは、 IP インターフェースアドレスと
194 16ビットのポート番号の組み合わせで定義される。
195 IP プロトコルそのものはポート番号を扱わない。
208 sa_family_t sin_family; /* address family: AF_INET */
209 in_port_t sin_port; /* port in network byte order */
210 struct in_addr sin_addr; /* internet address */
213 /* Internet address. */
215 uint32_t s_addr; /* address in network byte order */
221 .\"O is always set to
223 .\"O This is required; in Linux 2.2 most networking functions return
225 .\"O when this setting is missing.
227 .\"O contains the port in network byte order.
228 .\"O The port numbers below 1024 are called
229 .\"O .IR "privileged ports"
231 .\"O .IR "reserved ports" ).
232 .\"O Only privileged processes (i.e., those having the
233 .\"O .B CAP_NET_BIND_SERVICE
236 .\"O to these sockets.
237 .\"O Note that the raw IPv4 protocol as such has no concept of a
238 .\"O port, they are only implemented by higher protocols like
245 をセットする。これは必須である。 Linux 2.2 では、このセットを忘れると
250 にはポート番号をネットワークバイトオーダーで指定する。
252 .I "特権ポート (privileged ports)"
254 .RI ( "予約ポート (reserved ports)"
257 .RB ( CAP_NET_BIND_SERVICE
258 ケーパビリティを持つプロセス) 以外のプロセスは、これらのポートには
260 できない。 IPv4 プロトコルそのものにはポートに関する概念がない。
265 といった、上位のプロトコルにおいて実装される。
268 .\"O is the IP host address.
272 .\"O .I struct in_addr
273 .\"O contains the host interface address in network byte order.
279 メンバには、ホストのインターフェースアドレスを
282 .\"O should be assigned one of the INADDR_* values (e.g.,
283 .\"O .BR INADDR_ANY )
284 .\"O or set using the
285 .\"O .BR inet_aton (3),
286 .\"O .BR inet_addr (3),
287 .\"O .BR inet_makeaddr (3)
288 .\"O library functions or directly with the name resolver (see
289 .\"O .BR gethostbyname (3)).
297 .BR inet_makeaddr (3)
298 を用いる、あるいは名前解決機構 (name resolver)
299 を直接用いる、のどれかで設定すべきである。
300 .RB ( gethostbyname (3)
303 .\"O IPv4 addresses are divided into unicast, broadcast
304 .\"O and multicast addresses.
305 .\"O Unicast addresses specify a single interface of a host,
306 .\"O broadcast addresses specify all hosts on a network and multicast
307 .\"O addresses address all hosts in a multicast group.
308 .\"O Datagrams to broadcast addresses can be only sent or received when the
310 .\"O socket flag is set.
311 IPv4 アドレスには、ユニキャストアドレス、
312 ブロードキャストアドレス、マルチキャストアドレスがある。
313 ユニキャストアドレスは、あるホストの一つのアドレスを指定する。
314 ブロードキャストアドレスは、あるネットワーク上の全てのホストを指定する。
315 マルチキャストアドレスは、マルチキャストグループに所属する
316 全てのホストを指定する。ブロードキャストアドレスへのデータグラムは、
318 ソケットフラグがセットされていないと送信・受信できない。
319 .\"O In the current implementation, connection oriented sockets are only allowed
320 .\"O to use unicast addresses.
321 現在の実装では、接続指向のソケットにはユニキャストアドレスしか使えない。
322 .\" Leave a loophole for XTP @)
324 .\"O Note that the address and the port are always stored in
325 .\"O network byte order.
326 .\"O In particular, this means that you need to call
328 .\"O on the number that is assigned to a port.
329 .\"O All address/port manipulation
330 .\"O functions in the standard library work in network byte order.
331 アドレスとポートは常にネットワークバイトオーダーで格納されることに注意せよ。
335 標準ライブラリにあるアドレス/ポート操作関数は
336 すべてネットワークバイトオーダーで動作する。
338 .\"O There are several special addresses:
339 .\"O .B INADDR_LOOPBACK
341 .\"O always refers to the local host via the loopback device;
344 .\"O means any address for binding;
345 .\"O .B INADDR_BROADCAST
346 .\"O (255.255.255.255)
347 .\"O means any host and has the same effect on bind as
349 .\"O for historical reasons.
352 .BR INADDR_LOOPBACK (127.0.0.1)
353 loopback デバイスを通して常にローカルなホストを参照する。
355 .BR INADDR_ANY (0.0.0.0)
358 .BR INADDR_BROADCAST (255.255.255.255)
359 任意のホスト。歴史的理由から、バインドの際には
362 .\"O .SS Socket Options
364 .\"O IP supports some protocol-specific socket options that can be set with
365 .\"O .BR setsockopt (2)
367 .\"O .BR getsockopt (2).
368 .\"O The socket option level for IP is
369 .\"O .BR IPPROTO_IP .
370 .\"O .\" or SOL_IP on Linux
371 .\"O A boolean integer flag is zero when it is false, otherwise true.
372 IP にはプロトコル固有のソケットオプションがいくつか存在し、
376 で取得ができる。 IP のソケットオプションレベルは
378 .\" Linux では SOL_IP も可
380 ブール整数値のフラグでは、 0 は偽、それ以外は真を意味する。
382 .\" FIXME Document IP_FREEBIND
384 .\" Since Linux 2.4.0-test10
387 .\"O .BR IP_ADD_MEMBERSHIP " (since Linux 1.2)"
388 .BR IP_ADD_MEMBERSHIP " (Linux 1.2 以降)"
389 .\"O Join a multicast group.
401 struct in_addr imr_multiaddr; /* IP multicast group
403 struct in_addr imr_address; /* IP address of local
405 int imr_ifindex; /* interface index */
410 .\"O .I imr_multiaddr
411 .\"O contains the address of the multicast group the application
412 .\"O wants to join or leave.
413 .\"O It must be a valid multicast address
414 .\"O .\" (i.e., within the 224.0.0.0-239.255.255.255 range)
416 .\"O .BR setsockopt (2)
417 .\"O fails with the error
420 .\"O is the address of the local interface with which the system
421 .\"O should join the multicast group; if it is equal to
423 .\"O an appropriate interface is chosen by the system.
425 .\"O is the interface index of the interface that should join/leave the
426 .\"O .I imr_multiaddr
427 .\"O group, or 0 to indicate any interface.
429 には、アプリケーションが参加または撤退したい
431 指定するアドレスは有効なマルチキャストアドレスでなければならない
432 .\" (つまり、224.0.0.0-239.255.255.255 の範囲内)
439 はシステムがマルチキャストグループに参加する際に用いる
440 ローカルなインターフェースのアドレスである。
443 であった場合には、適切なインターフェースがシステムによって選択される。
447 グループに参加/撤退するインターフェースの interface index である。
448 どのインターフェースでもよい場合は 0 にする。
452 .\"O is available only since Linux 2.2.
453 .\"O For compatibility, the old
455 .\"O structure (present since Linux 1.2) is still supported.
458 .\"O only by not including the
462 .\"O .BR setsockopt (2).
464 は Linux 2.2 以降でのみ利用可能である。
467 構造体 (Linux 1.2 以降で存在する) もまだサポートされている。
476 .\"O .BR IP_DROP_MEMBERSHIP " (since Linux 1.2)"
477 .BR IP_DROP_MEMBERSHIP " (Linux 1.2 以降)"
478 .\"O Leave a multicast group.
483 .\"O structure similar to
484 .\"O .BR IP_ADD_MEMBERSHIP .
485 マルチキャストグループから抜ける。引き数は
493 .\"O .BR IP_HDRINCL " (since Linux 2.0)"
494 .BR IP_HDRINCL " (Linux 2.0 以降)"
496 .\"O the user supplies an IP header in front of the user data.
502 .\"O for more information.
503 .\"O When this flag is enabled the values set by
504 .\"O .BR IP_OPTIONS ,
509 有効になっていると、ユーザは IP ヘッダをユーザーデータの前に与える。
518 .\" FIXME Document IP_IPSEC_POLICY
519 .\" Since Linux 2.5.47
520 .\" Needs CAP_NET_ADMIN
522 .\"O .BR IP_MTU " (since Linux 2.2)"
523 .BR IP_MTU " (Linux 2.2 以降)"
524 .\" Precisely: 2.1.124
525 .\"O Retrieve the current known path MTU of the current socket.
526 .\"O Only valid when the socket has been connected.
527 .\"O Returns an integer.
529 .\"O .BR getsockopt (2).
530 ソケットの、既知の path MTU を取得する。
531 ソケットが接続している場合のみ有効である。
535 .\"O .BR IP_MTU_DISCOVER " (since Linux 2.2)"
536 .BR IP_MTU_DISCOVER " (Linux 2.2 以降)"
537 .\" Precisely: 2.1.124
538 .\"O Set or receive the Path MTU Discovery setting for a socket.
539 .\"O When enabled, Linux will perform Path MTU Discovery
540 .\"O as defined in RFC\ 1191
542 .\"O The don't-fragment flag is set on all outgoing datagrams.
543 .\"O The system-wide default is controlled by the
544 .\"O .I /proc/sys/net/ipv4/ip_no_pmtu_disc
547 .\"O sockets, and disabled on all others.
549 .\"O .RB non- SOCK_STREAM
550 .\"O sockets, it is the user's responsibility to packetize the data
551 .\"O in MTU sized chunks and to do the retransmits if necessary.
552 .\"O The kernel will reject packets that are bigger than the known
553 .\"O path MTU if this flag is set (with
556 ソケットの Path MTU Discovery の設定をセット・取得する。
557 有効になっていると、 Linux はこのソケットに対して
558 RFC\ 1191 で定義されている Path MTU Discovery を行う。
559 発信データグラムには、全て「フラグメント不許可」フラグがセットされる。
563 .I /proc/sys/net/ipv4/ip_no_pmtu_disc
568 ユーザーがデータを MTU のサイズの塊にパケット化したり、
569 必要な場合には再送したりしなければならない。
571 カーネルは既知の path MTU より大きなパケットを拒否する
578 .\"O Path MTU discovery flags:Meaning
579 .\"O IP_PMTUDISC_WANT:Use per-route settings.
580 .\"O IP_PMTUDISC_DONT:Never do Path MTU Discovery.
581 .\"O IP_PMTUDISC_DO:Always do Path MTU Discovery.
582 .\"O IP_PMTUDISC_PROBE:Set DF but ignore Path MTU.
583 Path MTU discovery フラグ:意味
584 IP_PMTUDISC_WANT:ルートごとの設定を用いる。
585 IP_PMTUDISC_DONT:Path MTU Discovery を行わない。
586 IP_PMTUDISC_DO:常に Path MTU Discovery を行う。
587 IP_PMTUDISC_PROBE:DFビットをセットするが、Path MTU を無視する。
590 .\"O When PMTU discovery is enabled, the kernel automatically keeps track of
591 .\"O the path MTU per destination host.
592 .\"O When it is connected to a specific peer with
593 .\"O .BR connect (2),
594 .\"O the currently known path MTU can be retrieved conveniently using the
596 .\"O socket option (e.g., after a
598 .\"O error occurred).
599 .\"O It may change over time.
600 .\"O For connectionless sockets with many destinations,
601 .\"O the new MTU for a given destination can also be accessed using the
602 .\"O error queue (see
603 .\"O .BR IP_RECVERR ).
604 .\"O A new error will be queued for every incoming MTU update.
605 path MTU discovery が有効になっていると、カーネルは宛先ホストごとに
606 自動的に path MTU を処理する。特定の相手に
610 ソケットオプションを用いれば、既知の path MTU の取得に便利である
613 エラーが起きた後など)。これは時間とともに変化するかもしれない。
614 宛先がたくさんあるコネクションレスなソケットでは、
615 与えられた宛先に対する新しい MTU にも、
616 エラーキューを用いてアクセスすることができる
619 MTU 更新が到着するごとに、新たなエラーがキューイングされる。
621 .\"O While MTU discovery is in progress, initial packets from datagram sockets
623 .\"O Applications using UDP should be aware of this and not
624 .\"O take it into account for their packet retransmit strategy.
625 MTU discovery の進行中には、データグラムソケットからの初期パケットは
626 到着しないかもしれない。 UDP を用いるアプリケーションでは、
628 パケットの再送アルゴリズムにこの分を除外させるべきである。
630 .\"O To bootstrap the path MTU discovery process on unconnected sockets, it
631 .\"O is possible to start with a big datagram size
632 .\"O (up to 64K-headers bytes long) and let it shrink by updates of the path MTU.
634 path MTU discovery プロセスを立ち上げるには、
635 大きなデータグラムサイズ (最大 64K ヘッダバイト長) からはじめて、
636 path MTU が更新されるまでサイズを縮めていくことも可能である。
637 .\" FIXME this is an ugly hack
639 .\"O To get an initial estimate of the
640 .\"O path MTU, connect a datagram socket to the destination address using
642 .\"O and retrieve the MTU by calling
643 .\"O .BR getsockopt (2)
647 path MTU の値をまず見積もってみるには、宛先アドレスに
653 オプションとともに呼び、 MTU を取得することである。
655 .\"O It is possible to implement RFC 4821 MTU probing with
659 .\"O sockets by setting a value of
660 .\"O .BR IP_PMTUDISC_PROBE
661 .\"O (available since Linux 2.6.22).
662 .\"O This is also particularly useful for diagnostic tools such as
663 .\"O .BR tracepath (8)
664 .\"O that wish to deliberately send probe packets larger than
665 .\"O the observed Path MTU.
667 (Linux 2.6.22 以降で利用可能) を設定することで、
671 のソケットで RFC 4821 の MTU 探索を実装することが可能である。
674 のような診断ツールで特に有用である。これらのツールでは、
675 観測された Path MTU よりも大きな探索パケットを意図的に
678 .\"O .BR IP_MULTICAST_IF " (since Linux 1.2)"
679 .BR IP_MULTICAST_IF " (Linux 1.2 以降)"
680 .\"O Set the local device for a multicast socket.
685 .\"O structure similar to
686 .\"O .BR IP_ADD_MEMBERSHIP .
687 ローカルデバイスをマルチキャストソケットとして設定する。引き数は
695 .\"O When an invalid socket option is passed,
702 .\"O .BR IP_MULTICAST_LOOP " (since Linux 1.2)"
703 .BR IP_MULTICAST_LOOP " (Linux 1.2 以降)"
704 .\"O Set or read a boolean integer argument that determines whether
705 .\"O sent multicast packets should be looped back to the local sockets.
706 マルチキャストパケットをローカルなソケットにループバックするかどうかを
707 定めるブール値の整数引き数を設定・取得する。
709 .\"O .BR IP_MULTICAST_TTL " (since Linux 1.2)"
710 .BR IP_MULTICAST_TTL " (Linux 1.2 以降)"
711 .\"O Set or read the time-to-live value of outgoing multicast packets for this
713 .\"O It is very important for multicast packets to set the smallest TTL possible.
714 .\"O The default is 1 which means that multicast packets don't leave the local
715 .\"O network unless the user program explicitly requests it.
716 .\"O Argument is an integer.
717 このソケットから発信されるマルチキャストパケットの
718 time-to-live 値を設定・取得する。
719 マルチキャストパケットに対しては、できるだけ小さな
720 TTL に設定することがとても重要である。デフォルトは 1 で、
721 ユーザープログラムが明示的に要求しない限り
722 マルチキャストパケットはローカルなネットワークから出ないことになる。
725 .\"O .BR IP_OPTIONS " (since Linux 2.0)"
726 .BR IP_OPTIONS " (Linux 2.0 以降)"
727 .\" Precisely: 1.3.30
728 .\"O Set or get the IP options to be sent with every packet from this socket.
729 .\"O The arguments are a pointer to a memory buffer containing the options
730 .\"O and the option length.
731 このソケットから送られるパケット全てに付随する IP オプションを
732 設定・取得する。オプションを保存しているメモリバッファへのポインタと
735 .\"O .BR setsockopt (2)
736 .\"O call sets the IP options associated with a socket.
737 .\"O The maximum option size for IPv4 is 40 bytes.
738 .\"O See RFC\ 791 for the allowed options.
739 .\"O When the initial connection request packet for a
741 .\"O socket contains IP options, the IP options will be set automatically
742 .\"O to the options from the initial packet with routing headers reversed.
743 .\"O Incoming packets are not allowed to change options after the connection
746 を呼び出すと、ソケットに関連づけられる IP オプションを設定できる。
747 IPv4 におけるオプションのサイズの最大値は 40 バイトである。
748 用いることのできるオプションについては RFC\ 791 を見よ。
750 ソケットに対する初期接続要求パケットに IP オプションが含まれていると、
751 ルーティングヘッダを付けて戻されてくる初期パケットの
752 IP オプションに同じオプションがセットされる。接続が確立された後、
753 やってきたパケットのオプションを変更することはできない。
754 .\"O The processing of all incoming source routing options
755 .\"O is disabled by default and can be enabled by using the
756 .\"O .I accept_source_route
759 .\"O Other options like timestamps are still handled.
760 .\"O For datagram sockets, IP options can be only set by the local user.
762 .\"O .BR getsockopt (2)
765 .\"O puts the current IP options used for sending into the supplied buffer.
766 デフォルトでは。外部から受信したパケットの全ての source routing オプション
770 .I accept_source_route
771 を使うとこれを有効にできる。これを無効にしていても timestamps など
772 の他のオプションの処理は行われる。データグラムソケットでは、
773 IP オプションはローカルユーザーしか設定できない。
777 をつけて呼ぶと、現在送信に用いられている IP オプションを
779 .\" FIXME Document IP_PASSSEC
781 .\" Since Linux 2.6.17
782 .\" commit 2c7946a7bf45ae86736ab3b43d0085e43947945c
783 .\" Author: Catherine Zhang <cxzhang@watson.ibm.com>
785 .\"O .BR IP_PKTINFO " (since Linux 2.2)"
786 .BR IP_PKTINFO " (Linux 2.2 以降)"
787 .\" Precisely: 2.1.68
790 .\"O ancillary message that contains a
792 .\"O structure that supplies some information about the incoming packet.
793 .\"O This only works for datagram oriented sockets.
795 補助メッセージを渡す。これには到着パケットに関する情報を提供する
798 データグラム指向のソケットでしか動作しない。
799 .\"O The argument is a flag that tells the socket whether the
801 .\"O message should be passed or not.
802 .\"O The message itself can only be sent/retrieved
803 .\"O as control message with a packet using
806 .\"O .BR sendmsg (2).
809 メッセージを通過させるかどうかをソケットに知らせるフラグである。
814 を用いたパケットの制御メッセージとしてのみ送受信できる。
820 unsigned int ipi_ifindex; /* Interface index */
821 struct in_addr ipi_spec_dst; /* Local address */
822 struct in_addr ipi_addr; /* Header Destination
828 .\" FIXME elaborate on that.
830 .\"O is the unique index of the interface the packet was received on.
832 はパケットが受信されたインターフェースの、他と重ならないインデックスである。
834 .\"O is the local address of the packet and
836 .\"O is the destination address in the packet header.
840 はパケットヘッダにある宛先アドレスである。
846 .\"O .\" This field is grossly misnamed
848 .\"O is not zero, then it is used as the local source address for the routing
849 .\"O table lookup and for setting up IP source route options.
854 .\" このフィールドは、名前の付け方が明らかに間違っているのだが
858 はルーティングテーブルを検索する際にローカルな送信元アドレスとして使用され、
859 IP source route オプションを設定するのにも使用される。
862 .\"O is not zero, the primary local address of the interface specified by the
863 .\"O index overwrites
865 .\"O for the routing table lookup.
867 が 0 以外の場合、このインデックスによって指定されるインターフェースの
870 を上書きし、ルーティングテーブルを検索する。
872 .\"O .BR IP_RECVERR " (since Linux 2.2)"
873 .BR IP_RECVERR " (Linux 2.2 以降)"
874 .\" Precisely: 2.1.15
875 .\"O Enable extended reliable error message passing.
876 .\"O When enabled on a datagram socket, all
877 .\"O generated errors will be queued in a per-socket error queue.
878 .\"O When the user receives an error from a socket operation,
879 .\"O the errors can be received by calling
885 .\"O .I sock_extended_err
886 .\"O structure describing the error will be passed in an ancillary message with
890 .\"O .BR IPPROTO_IP .
891 .\"O .\" or SOL_IP on Linux
892 .\"O This is useful for reliable error handling on unconnected sockets.
893 .\"O The received data portion of the error queue contains the error packet.
894 エラーメッセージの受け渡しに、信頼性の高い拡張された方法を有効にする。
895 データグラムソケットに対して有効になっていると、
896 発生したエラーは全てソケットごとのエラーキューに保存される。
897 ユーザーはソケット操作からエラーを受け取ったとき、
901 フラグとともに呼べばそのエラーを取得できる。
908 .\" Linux では SOL_IP も可
910 これは接続志向でないソケットで信頼性の高いエラー処理を行いたい場合に
911 有用である。エラーキューの受信データフラグメントには
913 .\"NAKANO portion をフラグメントって言っちゃっていいのか?
917 .\"O control message contains a
918 .\"O .I sock_extended_err
928 #define SO_EE_ORIGIN_NONE 0
929 #define SO_EE_ORIGIN_LOCAL 1
930 #define SO_EE_ORIGIN_ICMP 2
931 #define SO_EE_ORIGIN_ICMP6 3
933 struct sock_extended_err {
934 uint32_t ee_errno; /* error number */
935 uint8_t ee_origin; /* where the error originated */
936 uint8_t ee_type; /* type */
937 uint8_t ee_code; /* code */
939 uint32_t ee_info; /* additional information */
940 uint32_t ee_data; /* other data */
941 /* More data may follow */
944 struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *);
951 .\"O number of the queued error.
953 .\"O is the origin code of where the error originated.
959 にはエラーが発生した場所を示すコードが入る。
960 .\"O The other fields are protocol-specific.
962 .\"O .B SO_EE_OFFENDER
963 .\"O returns a pointer to the address of the network object
964 .\"O where the error originated from given a pointer to the ancillary message.
965 その他のフィールドはプロトコル依存である。
967 マクロは与えられた補助メッセージへのポインタから
968 エラーの発生したネットワークオブジェクトのアドレスへのポインタを返す。
969 .\"O If this address is not known, the
975 .\"O and the other fields of the
984 となり、その他のフィールド値は不定である。
987 .\"O .I sock_extended_err
988 .\"O structure as follows:
994 .\"O .B SO_EE_ORIGIN_ICMP
995 .\"O for errors received as an ICMP packet, or
996 .\"O .B SO_EE_ORIGIN_LOCAL
997 .\"O for locally generated errors.
998 .\"O Unknown values should be ignored.
1001 エラーが ICMP パケットとして受信された場合には
1002 .B SO_EE_ORIGIN_ICMP
1003 にセットされ、ローカルで起こった場合には
1004 .B SO_EE_ORIGIN_LOCAL
1010 .\"O are set from the type and code fields of the ICMP header.
1014 は ICMP ヘッダの type フィールドと code フィールドの値にセットされる。
1016 .\"O contains the discovered MTU for
1019 .\"O The message also contains the
1020 .\"O .I sockaddr_in of the node
1021 .\"O caused the error, which can be accessed with the
1022 .\"O .B SO_EE_OFFENDER
1026 .\"O field of the SO_EE_OFFENDER address is
1028 .\"O when the source was unknown.
1032 エラーに対する discover された MTU が入る。
1033 メッセージにはエラーを引き起こしたノードの
1040 SO_EE_OFFENDER アドレスの
1045 .\"O When the error originated from the network, all IP options
1046 .\"O .RI ( IP_OPTIONS ", " IP_TTL ", "
1047 .\"O etc.) enabled on the socket and contained in the
1048 .\"O error packet are passed as control messages.
1049 .\"O The payload of the packet causing the error is returned as normal payload.
1051 ソケットで有効になっていたすべての IP オプション
1052 .RB ( IP_OPTIONS ", " IP_TTL
1053 など) とエラーパケットに含まれていたすべての IP オプションとが、
1055 エラーを起こしたパケットのペイロード (payload) は
1057 .\" FIXME . is it a good idea to document that? It is a dubious feature.
1059 .\"O .\" .B SOCK_STREAM
1061 .\"O .\" .B IP_RECVERR
1062 .\"O .\" has slightly different semantics. Instead of
1063 .\"O .\" saving the errors for the next timeout, it passes all incoming
1064 .\"O .\" errors immediately to the user.
1065 .\"O .\" This might be useful for very short-lived TCP connections which
1066 .\"O .\" need fast error handling. Use this option with care:
1067 .\"O .\" it makes TCP unreliable
1068 .\"O .\" by not allowing it to recover properly from routing
1069 .\"O .\" shifts and other normal
1070 .\"O .\" conditions and breaks the protocol specification.
1074 .\" はやや異なる意味を持つ。次のタイムアウトまでデータを保持するのでなく、
1075 .\" やってきたエラーは全てただちにユーザーに渡される。これは、
1076 .\" 高速なエラー処理が必要となるような、極端に寿命の短い
1077 .\" TCP 接続に対して有用である。このオプションは注意して用いること。
1078 .\" 経路が変わったり、その他通常の状況に対して、適切な回復が不可能となり、
1079 .\" TCP の信頼性を低くしてしまう。またプロトコルの仕様に反してしまう。
1080 .\"O Note that TCP has no error queue;
1081 .\"O .B MSG_ERRQUEUE
1082 .\"O is not permitted on
1086 .\"O is valid for TCP, but all errors are returned by socket function return or
1089 TCP にはエラーキューがないことに注意してほしい。
1096 だけが有効だが、ソケット関数から返されるエラーは
1100 .\"O For raw sockets,
1102 .\"O enables passing of all received ICMP errors to the
1103 .\"O application, otherwise errors are only reported on connected sockets
1106 を指定すると、受信したすべての ICMP エラーをアプリケーションに
1108 接続済みのソケットに対するエラーだけを報告する。
1110 .\"O It sets or retrieves an integer boolean flag.
1112 .\"O defaults to off.
1113 このオプションはブール値のフラグを設定・取得する。
1117 .\"O .BR IP_RECVOPTS " (since Linux 2.2)"
1118 .BR IP_RECVOPTS " (Linux 2.2 以降)"
1119 .\" Precisely: 2.1.15
1120 .\"O Pass all incoming IP options to the user in a
1122 .\"O control message.
1123 .\"O The routing header and other options are already filled in
1124 .\"O for the local host.
1125 .\"O Not supported for
1130 コントロールメッセージに入れてユーザーに渡す。
1131 ルーティングヘッダとその他のオプションとは、
1132 ローカルホストに対してはあらかじめ記入されている。
1136 .\"O .BR IP_RECVTOS " (since Linux 2.2)"
1137 .BR IP_RECVTOS " (Linux 2.2 以降)"
1138 .\" Precisely: 2.1.68
1141 .\"O ancillary message is passed with incoming packets.
1142 .\"O It contains a byte which specifies the Type of Service/Precedence
1143 .\"O field of the packet header.
1144 .\"O Expects a boolean integer flag.
1147 補助メッセージが到着パケットとともに渡される。
1148 これにはパケットヘッダの Service/Precedence
1149 フィールドのタイプを指定するバイトデータが含まれている。
1152 .\"O .BR IP_RECVTTL " (since Linux 2.2)"
1153 .BR IP_RECVTTL " (Linux 2.2 以降)"
1154 .\" Precisely: 2.1.68
1155 .\"O When this flag is set, pass a
1157 .\"O control message with the time to live
1158 .\"O field of the received packet as a byte.
1159 .\"O Not supported for
1165 time-to-live フィールドのバイトデータとともに渡される。
1170 .\"O .BR IP_RETOPTS " (since Linux 2.2)"
1171 .BR IP_RETOPTS " (Linux 2.2 以降)"
1172 .\" Precisely: 2.1.15
1174 .\"O .BR IP_RECVOPTS ,
1175 .\"O but returns raw unprocessed options with timestamp and route record
1176 .\"O options not filled in for this hop.
1179 この hop では記入されない timestamp レコードと route レコードとともに返す。
1180 .\"NAKANO 意味不明...(^^;
1182 .\"O .BR IP_ROUTER_ALERT " (since Linux 2.2)"
1183 .BR IP_ROUTER_ALERT " (Linux 2.2 以降)"
1184 .\" Precisely: 2.1.68
1185 .\"O Pass all to-be forwarded packets with the
1186 .\"O IP Router Alert option set to this socket.
1187 .\"O Only valid for raw sockets.
1188 .\"O This is useful, for instance, for user-space RSVP daemons.
1189 .\"O The tapped packets are not forwarded by the kernel; it is
1190 .\"O the user's responsibility to send them out again.
1191 .\"O Socket binding is ignored,
1192 .\"O such packets are only filtered by protocol.
1193 .\"O Expects an integer flag.
1194 フォワードすべきパケットを IP Router Alert オプションをつけて
1196 raw ソケットに対してのみ有効である。これはたとえばユーザー空間の
1197 RSVP デーモンに対して便利である。タップされたパケットは
1198 カーネルによってはフォワードされないので、これらを再送するのは
1199 ユーザーの責任となる。ソケットのバインドは無視され、
1200 このようなパケットはプロトコルによってのみフィルタリングされる。
1202 .\"NAKANO Socket binding... の文、意味わからん。
1204 .\"O .BR IP_TOS " (since Linux 1.0)"
1205 .BR IP_TOS " (Linux 1.0 以降)"
1206 .\"O Set or receive the Type-Of-Service (TOS) field that is sent
1207 .\"O with every IP packet originating from this socket.
1208 .\"O It is used to prioritize packets on the network.
1210 .\"O There are some standard TOS flags defined:
1211 .\"O .B IPTOS_LOWDELAY
1212 .\"O to minimize delays for interactive traffic,
1213 .\"O .B IPTOS_THROUGHPUT
1214 .\"O to optimize throughput,
1215 .\"O .B IPTOS_RELIABILITY
1216 .\"O to optimize for reliability,
1217 .\"O .B IPTOS_MINCOST
1218 .\"O should be used for "filler data" where slow transmission doesn't matter.
1219 このソケットから送信されるすべての IP パケットに適用される
1220 Type-Of-Service (TOS) フィールドを設定・取得する。
1221 これはネットワーク上でのパケットの優先度を決めるために用いられる。
1222 TOS はバイトデータである。標準の TOS フラグがいくつか定義されている。
1224 はインタラクティブなトラフィックの遅延を最小にする。
1227 .B IPTOS_RELIABILITY
1230 は転送速度が遅くてもかまわないとき、「データを詰め込む」のに用いられる。
1231 .\"O At most one of these TOS values can be specified.
1232 .\"O Other bits are invalid and shall be cleared.
1233 これらのうち、 1 つまでだけを設定できる。
1237 .\"O .B IPTOS_LOWDELAY
1238 .\"O datagrams first by default,
1239 .\"O but the exact behavior depends on the configured queueing discipline.
1243 しかし、正確な振る舞いはキュー処理の設定に依存する。
1244 .\" FIXME elaborate on this
1245 .\"O Some high priority levels may require superuser privileges (the
1246 .\"O .B CAP_NET_ADMIN
1248 .\"O The priority can also be set in a protocol independent way by the
1249 .\"O .RB ( SOL_SOCKET ", " SO_PRIORITY )
1250 .\"O socket option (see
1251 .\"O .BR socket (7)).
1252 高い優先度にするにはスーパーユーザー権限
1254 ケーパビリティ) が必要となるかもしれない。
1256 .RB ( SOL_SOCKET ", " SO_PRIORITY )
1261 .\" FIXME Document IP_TRANSPARENT
1262 .\" Needs CAP_NET_ADMIN
1264 .\" Since Linux 2.6.27
1265 .\" commit f5715aea4564f233767ea1d944b2637a5fd7cd2e
1266 .\" Author: KOVACS Krisztian <hidden@sch.bme.hu>
1268 .\"O .BR IP_TTL " (since Linux 1.0)"
1269 .BR IP_TTL " (Linux 1.0 以降)"
1270 .\"O Set or retrieve the current time-to-live field that is used in every packet
1271 .\"O sent from this socket.
1272 time-to-live フィールドの値を設定または取得する。
1273 この値はこのソケットから送信されるすべてのパケットに用いられる。
1274 .\" FIXME Document IP_XFRM_POLICY
1275 .\" Since Linux 2.5.48
1276 .\" Needs CAP_NET_ADMIN
1277 .\"O .SS /proc interfaces
1279 .\"O The IP protocol
1280 .\"O supports a set of
1282 .\"O interfaces to configure some global parameters.
1283 .\"O The parameters can be accessed by reading or writing files in the directory
1284 .\"O .IR /proc/sys/net/ipv4/ .
1285 IP プロトコルでは、いくつかのグローバルパラメータを設定するための
1289 .I /proc/sys/net/ipv4/
1290 ディレクトリ内のファイルの読み書きでアクセスできる。
1291 .\" FIXME As at 2.6.12, 14 Jun 2005, the following are undocumented:
1293 .\" ip_conntrack_max
1294 .\"O Interfaces described as
1296 .\"O take an integer value, with a nonzero value ("true") meaning that
1297 .\"O the corresponding option is enabled, and a zero value ("false")
1298 .\"O meaning that the option is disabled.
1300 と書かれたインタフェースは整数値をとり、
1301 0 以外の値 ("true") は対応するオプションが有効、
1302 0 値 ("false") は無効、であることを意味する。
1305 .\"O .IR ip_always_defrag " (Boolean; since Linux 2.2.13)"
1306 .IR ip_always_defrag " (Boolean; Linux 2.2.13 以降)"
1307 .\"O [New with kernel 2.2.13; in earlier kernel versions this feature
1308 .\"O was controlled at compile time by the
1309 .\"O .B CONFIG_IP_ALWAYS_DEFRAG
1310 .\"O option; this option is not present in 2.4.x and later]
1311 [2.2.13 で新規登場。以前のバージョンのカーネルでは、この機能は
1313 .B CONFIG_IP_ALWAYS_DEFRAG
1315 このファイルは 2.4.x 以降では存在しない]
1317 .\"O When this boolean flag is enabled (not equal 0), incoming fragments
1318 .\"O (parts of IP packets
1319 .\"O that arose when some host between origin and destination decided
1320 .\"O that the packets were too large and cut them into pieces) will be
1321 .\"O reassembled (defragmented) before being processed, even if they are
1322 .\"O about to be forwarded.
1323 このブール値のフラグが有効になっている (0 以外になっている) と、
1324 到着したフラグメント (IP パケットの一部で、
1325 発信元と発信先の間のどこかのホストで、そのパケットが
1326 大きすぎると判断され、分割された場合に生じる)
1327 は、たとえフォワードされる場合であっても
1328 処理前に再構築 (デフラグメント) される。
1330 .\"O Only enable if running either a firewall that is the sole link
1331 .\"O to your network or a transparent proxy; never ever use it for a
1332 .\"O normal router or host.
1333 .\"O Otherwise fragmented communication can be disturbed
1334 .\"O if the fragments travel over different links.
1335 .\"O Defragmentation also has a large memory and CPU time cost.
1336 ファイアウォールがローカル側のネットワークに唯一のリンクを持っている
1337 場合や、透過プロクシの場合に限って有効にすべきである。
1338 通常のルーターやホストでは決して使用することのないように。
1339 さもないとフラグメントが別のリンクを経由して伝わる場合に、
1340 通信のフラグメント化ができなくなってしまう。
1341 またフラグメント再構築処理はメモリと CPU 時間のコストが非常に大きい。
1343 .\"O This is automagically turned on when masquerading or transparent
1344 .\"O proxying are configured.
1345 これはマスカレードや透過プロクシが設定されると、
1346 不思議な仕組みによって自動的に有効になる。
1349 .\"O .IR ip_autoconfig " (since Linux 2.2 to 2.6.17)"
1350 .IR ip_autoconfig " (Linux 2.2 以降 2.6.17 まで)"
1351 .\" Precisely: since 2.1.68
1352 .\" FIXME document ip_autoconfig
1353 .\"O Not documented.
1357 .\"O .IR ip_default_ttl " (integer; default: 64; since Linux 2.2)"
1358 .IR ip_default_ttl " (integer; default: 64; Linux 2.2 以降)"
1359 .\" Precisely: 2.1.15
1360 .\"O Set the default time-to-live value of outgoing packets.
1361 .\"O This can be changed per socket with the
1364 送出されるパケットの time-to-live 値のデフォルトをセットする。
1367 オプションを用いれば、パケットごとに変えることもできる。
1370 .\"O .IR ip_dynaddr " (Boolean; default: disabled; since Linux 2.0.31)"
1371 .IR ip_dynaddr " (Boolean; default: disabled; Linux 2.0.31 以降)"
1372 .\"O Enable dynamic socket address and masquerading entry rewriting on interface
1373 .\"O address change.
1374 .\"O This is useful for dialup interface with changing IP addresses.
1375 .\"O 0 means no rewriting, 1 turns it on and 2 enables verbose mode.
1376 動的ソケットアドレスと、インターフェースアドレスが変更された際の
1377 マスカレードエントリの再書き込みを有効にする。
1379 IP アドレスが変更される場合に便利である。
1382 .\"O .IR ip_forward " (Boolean; default: disabled; since Linux 1.2)"
1383 .IR ip_forward " (Boolean; default: disabled; Linux 1.2 以降)"
1384 .\"O Enable IP forwarding with a boolean flag.
1385 .\"O IP forwarding can be also set on a per-interface basis.
1386 IP forwarding を有効にするかどうかのブール値フラグ。
1387 IP forwarding するかどうかはインターフェースごとにも設定できる。
1390 .\"O .IR ip_local_port_range " (since Linux 2.2)"
1391 .IR ip_local_port_range " (Linux 2.2 以降)"
1392 .\" Precisely: since 2.1.68
1393 .\"O Contains two integers that define the default local port range
1394 .\"O allocated to sockets.
1395 .\"O Allocation starts with the first number and ends with the second number.
1396 .\"O Note that these should not conflict with the ports used by masquerading
1397 .\"O (although the case is handled).
1398 .\"O Also arbitrary choices may cause problems with some firewall packet
1399 .\"O filters that make assumptions about the local ports in use.
1400 .\"O First number should be at least greater than 1024,
1401 .\"O or better greater than 4096, to avoid clashes
1402 .\"O with well known ports and to minimize firewall problems.
1403 ソケットに割り当てられているデフォルトのローカルポートの範囲を定める
1404 二つの整数を与える。割り当ては 1 番目の番号から始まり、 2 番目の番号で終わる。
1405 これらはマスカレードで用いられているポートと重なってはならない
1407 ファイアウォールのパケットフィルターが「利用中のローカルポート」
1408 について何らかの仮定をしている場合には、
1409 番号を勝手に決めてしまうと問題が起きるかもしれない。
1410 1 番目の番号は少なくとも 1024 より大きくすべきである。
1411 良く使われるポートとの衝突を避けたり、ファイアウォールの問題を
1412 回避したければ、 4096 よりも大きくするほうが良いだろう。
1415 .\"O .IR ip_no_pmtu_disc " (Boolean; default: disabled; since Linux 2.2)"
1416 .IR ip_no_pmtu_disc " (Boolean; default: disabled; Linux 2.2 以降)"
1417 .\" Precisely: 2.1.15
1418 .\"O If enabled, don't do Path MTU Discovery for TCP sockets by default.
1419 .\"O Path MTU discovery may fail if misconfigured firewalls (that drop
1420 .\"O all ICMP packets) or misconfigured interfaces (e.g., a point-to-point
1421 .\"O link where the both ends don't agree on the MTU) are on the path.
1422 .\"O It is better to fix the broken routers on the path than to turn off
1423 .\"O Path MTU Discovery globally, because not doing it incurs a high cost
1424 .\"O to the network.
1425 有効になっていると、デフォルトで TCP ソケットに対する
1426 Path MTU Discoverty を行わない。
1427 Path MTU Discovery は、
1428 正しく設定されていない (ICMP パケットを全てドロップする) ファイアウォールや、
1429 (point-to-point リンクで双方の MTU が一致していない場合など)
1430 正しく設定されていないインターフェースが経路上に存在すると失敗してしまう。
1431 Path MTU Discovery をグローバルに無効にするよりは、
1433 Path MTU Discovery を無効にするとネットワークのコストが
1436 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
1438 .\"O .IR ip_nonlocal_bind " (Boolean; default: disabled; since Linux 2.4)"
1439 .IR ip_nonlocal_bind " (Boolean; default: disabled; Linux 2.4 以降)"
1440 .\" Precisely: patch-2.4.0-test10
1441 .\"O If set, allows processes to
1443 .\"O to nonlocal IP addresses,
1444 .\"O which can be quite useful, but may break some applications.
1445 セットされていれば、プロセスが自分以外の IP アドレスを
1447 できるようになる。これはかなり便利だが、うまく動かないアプリケーションもある。
1449 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
1451 .IR ip6frag_time " (integer; default 30)"
1452 .\"O Time in seconds to keep an IPv6 fragment in memory.
1453 IPv6 フラグメントをメモリに保持しておく時間 (秒単位)。
1455 .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
1457 .IR ip6frag_secret_interval " (integer; default 600)"
1458 .\"O Regeneration interval (in seconds) of the hash secret (or lifetime
1459 .\"O for the hash secret) for IPv6 fragments.
1460 IPv6 フラグメントの hash secret の生成間隔 (hash secret の寿命)
1463 .IR ipfrag_high_thresh " (integer), " ipfrag_low_thresh " (integer)"
1464 .\"O If the amount of queued IP fragments reaches
1465 .\"O .IR ipfrag_high_thresh ,
1466 .\"O the queue is pruned down to
1467 .\"O .IR ipfrag_low_thresh .
1468 .\"O Contains an integer with the number of bytes.
1469 キューイングされている IP フラグメントの量が
1470 .I ipfrag_high_thresh
1472 .I ipfrag_low_thresh
1473 にまで切り捨てられる。それぞれの大きさを
1481 .\" FIXME Document the conf/*/* interfaces
1482 .\" FIXME Document the route/* interfaces
1483 .\" FIXME document them all
1486 .\"O All ioctls described in
1491 に記述されている ioctl は、すべて
1495 .\" commented out the following because ipchains is obsolete
1497 .\"O .\" The ioctls to configure firewalling are documented in
1498 .\"O .\" .BR ipfw (4)
1500 .\"O .\" .B ipchains
1502 .\" ファイアウォール関係の設定に関する ioctl については
1508 .\"O Ioctls to configure generic device parameters are described in
1509 .\"O .BR netdevice (7).
1510 ジェネリックデバイスのパラメータを設定する ioctl については
1513 .\" FIXME Add a discussion of multicasting
1516 .\" FIXME document all errors.
1517 .\" We should really fix the kernels to give more uniform
1518 .\" error returns (ENOMEM vs ENOBUFS, EPERM vs EACCES etc.)
1521 .\"O The user tried to execute an operation without the necessary permissions.
1523 .\"O sending a packet to a broadcast address without having the
1524 .\"O .B SO_BROADCAST
1526 .\"O sending a packet via a
1529 .\"O modifying firewall settings without superuser privileges (the
1530 .\"O .B CAP_NET_ADMIN
1532 .\"O binding to a privileged port without superuser privileges (the
1533 .\"O .B CAP_NET_BIND_SERVICE
1535 必要な権限のないユーザーが操作を実行しようとした。
1538 フラグを設定していない状態でブロードキャストアドレスに
1541 なルートを通してパケットを送ろうとした。
1544 ケーパビリティ) なしでファイアウォールの設定を変更しようとした。
1546 .RB ( CAP_NET_BIND_SERVICE
1547 ケーパビリティ) なしで特権ポートにバインドしようとした。
1550 .\"O Tried to bind to an address already in use.
1551 既に使われているアドレスにバインドしようとした。
1554 .\"O A nonexistent interface was requested or the requested source
1555 .\"O address was not local.
1556 存在しないソケットが要求された。または要求された
1560 .\"O Operation on a nonblocking socket would block.
1561 非ブロッキングソケットに対してブロックする操作を行った。
1564 .\"O An connection operation on a nonblocking socket is already in progress.
1565 非ブロッキングソケットに対する接続操作が既に実行中である。
1568 .\"O A connection was closed during an
1569 .\"O .BR accept (2).
1574 .\"O No valid routing table entry matches the destination address.
1575 .\"O This error can be caused by a ICMP message from a remote router or
1576 .\"O for the local routing table.
1577 宛先アドレスにマッチする有効なエントリがルーティングテーブルに
1578 存在しない。このエラーはリモートルータからの、
1579 あるいはローカルルーティングテーブルへの
1580 ICMP メッセージによって引き起こされることがある。
1583 .\"O Invalid argument passed.
1584 .\"O For send operations this can be caused by sending to a
1587 不正な引き数が渡された。送信操作において、
1589 ルートに送信しようとするとこのエラーが起こることがある。
1592 .\"O .BR connect (2)
1593 .\"O was called on an already connected socket.
1595 が、既に接続済みのソケットに対して呼ばれた。
1598 .\"O Datagram is bigger than an MTU on the path and it cannot be fragmented.
1599 データグラムが path MTU よりも大きく、フラグメント化もできない。
1601 .BR ENOBUFS ", " ENOMEM
1602 .\"O Not enough free memory.
1603 .\"O This often means that the memory allocation is limited by the socket
1604 .\"O buffer limits, not by the system memory, but this is not 100% consistent.
1606 このエラーは、メモリアロケーションがソケットバッファの
1607 大きさによって制限されていることを意味しているのが通常であるが、
1612 .\"O was called on a socket where no packet arrived.
1613 パケットが全く到着していないソケットに対して
1618 .\"O A kernel subsystem was not configured.
1619 カーネルサブシステムが設定されていない。
1621 .\"O .BR ENOPROTOOPT " and " EOPNOTSUPP
1622 .BR ENOPROTOOPT " と " EOPNOTSUPP
1623 .\"O Invalid socket option passed.
1627 .\"O The operation is only defined on a connected socket, but the socket wasn't
1630 接続状態でしか定義されていない操作を行おうとした。
1633 .\"O User doesn't have permission to set high priority, change configuration,
1634 .\"O or send signals to the requested process or group.
1635 高い優先度を設定したり、設定を変更したり、要求されたプロセスや
1636 プロセスグループにシグナルを送ったりするのに必要な権限を、
1640 .\"O The connection was unexpectedly closed or shut down by the other end.
1641 接続が先方から期待していなかったやり方で
1645 .\"O The socket is not configured or an unknown socket type was requested.
1646 ソケットが未設定であるか、知らないソケットタイプが要求された。
1648 .\"O Other errors may be generated by the overlaying protocols; see
1649 他のエラーが上層のプロトコルによって生じるかもしれない。
1654 .\"O .BR socket (7).
1663 .\"O .BR IP_MTU_DISCOVER ,
1664 .\"O .BR IP_PKTINFO ,
1667 .\"O .B IP_ROUTER_ALERT
1669 .BR IP_MTU_DISCOVER ,
1673 .\"O are Linux-specific and should not be used in
1674 .\"O programs intended to be portable.
1675 は Linux 固有であり、移植性を考慮したプログラムでは
1677 .\" IP_PASSSEC is Linux-specific
1678 .\" IP_TRANSPARENT is Linux-specific
1679 .\" IP_FREEBIND is Linux-specific
1680 .\" IP_XFRM_POLICY is Linux-specific
1681 .\" IP_IPSEC_POLICY is a nonstandard extension, also present on some BSDs
1682 .\"O Be very careful with the
1683 .\"O .B SO_BROADCAST
1684 .\"O option \- it is not privileged in Linux.
1685 .\"O It is easy to overload the network
1686 .\"O with careless broadcasts.
1687 .\"O For new application protocols
1688 .\"O it is better to use a multicast group instead of broadcasting.
1689 .\"O Broadcasting is discouraged.
1691 オプションの利用には、くれぐれも注意すること。
1692 これは Linux では特権操作ではない。
1693 不注意なブロードキャストを行うと、ネットワークは簡単に過負荷状態になる。
1694 新しいアプリケーションプロトコルには、ブロードキャストではなく
1695 マルチキャストグループを用いるほうがよい。
1698 .\"O Some other BSD sockets implementations provide
1699 .\"O .B IP_RCVDSTADDR
1702 .\"O socket options to get the destination address and the interface of
1703 .\"O received datagrams.
1704 .\"O Linux has the more general
1706 .\"O for the same task.
1711 といったソケットオプションがサポートされており、
1712 宛先アドレスや受信データグラムのインターフェースが取得できるように
1714 Linux で同じことをやらせるには、より一般的な
1718 .\"O Some BSD sockets implementations also provide an
1720 .\"O option, but an ancillary message with type
1722 .\"O is passed with the incoming packet.
1723 .\"O This is different from the
1725 .\"O option used in Linux.
1730 の補助メッセージは受信パケットとともに渡される。
1737 .\"O socket options level isn't portable, BSD-based stacks use
1741 ソケットオプションレベルは移植性がない。
1745 .\"O .SS Compatibility
1747 .\"O For compatibility with Linux 2.0, the obsolete
1748 .\"O .BI "socket(AF_INET, SOCK_PACKET, " protocol )
1749 .\"O syntax is still supported to open a
1752 .\"O This is deprecated and should be replaced by
1753 .\"O .BI "socket(AF_PACKET, SOCK_RAW, " protocol )
1755 .\"O The main difference is the
1758 .\"O address structure for generic link layer information instead of the old
1759 .\"O .BR sockaddr_pkt .
1760 Linux 2.0 との互換性のために、 obsolete な
1761 .BI "socket(AF_INET, SOCK_PACKET, " protocol )
1764 をオープンできるようになっているが、これはお勧めできない。今後は
1765 .BI "socket(AF_PACKET, SOCK_RAW, " protocol )
1766 を代わりに用いるべきである。主な違いは、ジェネリックなリンク層用の
1770 に変わって用いられるようになったことである。
1773 .\"O There are too many inconsistent error values.
1776 .\"O The ioctls to configure IP-specific interface options and ARP tables are
1778 IP 固有のインターフェースオプションを指定するための ioctl と
1779 ARP テーブルのことが記述されていない。
1781 .\"O Some versions of glibc forget to declare
1782 .\"O .IR in_pktinfo .
1783 .\"O Workaround currently is to copy it into your program from this man page.
1787 現時点でのとりあえずの対策としては、この man ページにある定義をプログラム中に
1790 .\"O Receiving the original destination address with
1791 .\"O .B MSG_ERRQUEUE
1795 .\"O .BR recvmsg (2)
1796 .\"O does not work in some 2.2 kernels.
1802 を指定して、受信パケットに入っていた宛先アドレスを取得する方法は
1803 2.2 カーネルの一部でうまく動かない。
1804 .\"O .\" .SH AUTHORS
1806 .\"O .\" This man page was written by Andi Kleen.
1807 .\" この man ページは Andi Kleen が書いた。
1814 .BR capabilities (7),
1821 .\"O RFC\ 791 for the original IP specification.
1825 .\"O RFC\ 1122 for the IPv4 host requirements.
1829 .\"O RFC\ 1812 for the IPv4 router requirements.
1832 .\" FIXME autobind INADDR REUSEADDR