OSDN Git Service

(split) LDP_man-pages: update original to v3.34.
[linuxjm/LDP_man-pages.git] / original / man7 / ip.7
index d8480e9..9f560df 100644 (file)
@@ -9,7 +9,7 @@
 .\"
 .\" FIXME: Document IP_MINTTL, added in Linux 2.6.34
 .\"
-.TH IP  7 2010-10-13 "Linux" "Linux Programmer's Manual"
+.TH IP  7 2011-09-22 "Linux" "Linux Programmer's Manual"
 .SH NAME
 ip \- Linux IPv4 protocol implementation
 .SH SYNOPSIS
@@ -41,7 +41,7 @@ For more information on sockets, see
 An IP socket is created by calling the
 .BR socket (2)
 function as
-.BR "socket(AF_INET, socket_type, protocol)" .
+.BI "socket(AF_INET, " socket_type ", " protocol ) \fR.
 Valid socket types are
 .B SOCK_STREAM
 to open a
@@ -151,7 +151,9 @@ member of
 .I struct in_addr
 contains the host interface address in network byte order.
 .I in_addr
-should be assigned one of the INADDR_* values (e.g.,
+should be assigned one of the
+.BR INADDR_*
+values (e.g.,
 .BR INADDR_ANY )
 or set using the
 .BR inet_aton (3),
@@ -263,6 +265,19 @@ or
 structure similar to
 .BR IP_ADD_MEMBERSHIP .
 .TP
+.BR IP_FREEBIND " (since Linux 2.4)"
+.\" Precisely: 2.4.0-test10
+If enabled, this boolean option allows binding to an IP address
+that is nonlocal or does not (yet) exist.
+This permits listening on a socket,
+without requiring the underlying network interface or the
+specified dynamic IP address to be up at the time that
+the application is trying to bind to it.
+This option is the per-socket equivalent of the
+.IR ip_nonlocal_bind
+.I /proc
+interface described below.
+.TP
 .BR IP_HDRINCL " (since Linux 2.0)"
 If enabled,
 the user supplies an IP header in front of the user data.
@@ -278,19 +293,6 @@ When this flag is enabled the values set by
 and
 .B IP_TOS
 are ignored.
-.TP
-.BR IP_FREEBIND " (since Linux 2.4)"
-.\" Precisely: 2.4.0-test10
-If enabled, this boolean option allows binding to an IP address
-that is nonlocal or does not (yet) exist.
-This permits listening on a socket,
-without requiring the underlying network interface or the
-specified dynamic IP address to be up at the time that
-the application is trying to bind to it.
-This option is the per-socket equivalent of the
-.IR ip_nonlocal_bind
-.I /proc
-interface described below.
 .\"
 .\" FIXME Document IP_IPSEC_POLICY
 .\" Since Linux 2.5.47
@@ -308,27 +310,36 @@ Only valid as a
 .\" Precisely: 2.1.124
 Set or receive the Path MTU Discovery setting for a socket.
 When enabled, Linux will perform Path MTU Discovery
-as defined in RFC\ 1191
-on this socket.
-The don't-fragment flag is set on all outgoing datagrams.
-The system-wide default is controlled by the
-.I /proc/sys/net/ipv4/ip_no_pmtu_disc
-file for
+as defined in RFC\ 1191 on
 .B SOCK_STREAM
-sockets, and disabled on all others.
+sockets.
 For
 .RB non- SOCK_STREAM
-sockets, it is the user's responsibility to packetize the data
-in MTU sized chunks and to do the retransmits if necessary.
-The kernel will reject packets that are bigger than the known
-path MTU if this flag is set (with
-.B EMSGSIZE
-).
+sockets,
+.B IP_PMTUDISC_DO
+forces the don't-fragment flag to be set on all outgoing packets.
+It is the user's responsibility to packetize the data
+in MTU-sized chunks and to do the retransmits if necessary.
+The kernel will reject (with
+.BR EMSGSIZE )
+datagrams that are bigger than the known path MTU.
+.B IP_PMTUDISC_WANT
+will fragment a datagram if needed according to the path MTU,
+or will set the don't-fragment flag otherwise.
+
+The system-wide default can be toggled between
+.B IP_PMTUDISC_WANT
+and
+.B IP_PMTUDISC_DONT
+by writing (respectively, zero and nonzero values) to the
+.I /proc/sys/net/ipv4/ip_no_pmtu_disc
+file.
+
 .TS
 tab(:);
 c l
 l l.
-Path MTU discovery flags:Meaning
+Path MTU discovery value:Meaning
 IP_PMTUDISC_WANT:Use per-route settings.
 IP_PMTUDISC_DONT:Never do Path MTU Discovery.
 IP_PMTUDISC_DO:Always do Path MTU Discovery.
@@ -341,10 +352,10 @@ When it is connected to a specific peer with
 .BR connect (2),
 the currently known path MTU can be retrieved conveniently using the
 .B IP_MTU
-socket option (e.g., after a
+socket option (e.g., after an
 .B EMSGSIZE
 error occurred).
-It may change over time.
+The path MTU may change over time.
 For connectionless sockets with many destinations,
 the new MTU for a given destination can also be accessed using the
 error queue (see
@@ -449,18 +460,6 @@ puts the current IP options used for sending into the supplied buffer.
 .\" commit 2c7946a7bf45ae86736ab3b43d0085e43947945c
 .\" Author: Catherine Zhang <cxzhang@watson.ibm.com>
 .TP
-.BR IP_RECVORIGDSTADDR " (since Linux 2.6.29)"
-.\" FIXME: Document IP_ORIGDSTADDR+IP_RECVORIGDSTADDR, added in Linux 2.6.29
-.\" commit e8b2dfe9b4501ed0047459b2756ba26e5a940a69
-This boolean option enables the
-.B IP_ORIGDSTADDR
-ancillary message in
-.BR recvmsg (2),
-in which the kernel returns the original destination address
-of the datagram being received.
-The ancillary message contains a
-.IR "struct sockaddr_in" .
-.TP
 .BR IP_PKTINFO " (since Linux 2.2)"
 .\" Precisely: 2.1.68
 Pass an
@@ -609,11 +608,13 @@ caused the error, which can be accessed with the
 macro.
 The
 .I sin_family
-field of the SO_EE_OFFENDER address is
+field of the
+.B SO_EE_OFFENDER
+address is
 .B AF_UNSPEC
 when the source was unknown.
 When the error originated from the network, all IP options
-.RI ( IP_OPTIONS ", " IP_TTL ", "
+.RB ( IP_OPTIONS ", " IP_TTL ", "
 etc.) enabled on the socket and contained in the
 error packet are passed as control messages.
 The payload of the packet causing the error is returned as normal payload.
@@ -661,6 +662,17 @@ Not supported for
 .B SOCK_STREAM
 sockets.
 .TP
+.BR IP_RECVORIGDSTADDR " (since Linux 2.6.29)"
+.\" commit e8b2dfe9b4501ed0047459b2756ba26e5a940a69
+This boolean option enables the
+.B IP_ORIGDSTADDR
+ancillary message in
+.BR recvmsg (2),
+in which the kernel returns the original destination address
+of the datagram being received.
+The ancillary message contains a
+.IR "struct sockaddr_in" .
+.TP
 .BR IP_RECVTOS " (since Linux 2.2)"
 .\" Precisely: 2.1.68
 If enabled the
@@ -733,7 +745,7 @@ socket option (see
 .\" Author: KOVACS Krisztian <hidden@sch.bme.hu>
 .\" http://lwn.net/Articles/252545/
 .TP
-.BR IP_TTL " (since Linux 2.6.24)"
+.BR IP_TRANSPARENT " (since Linux 2.6.24)"
 .\" commit f5715aea4564f233767ea1d944b2637a5fd7cd2e
 .\"     This patch introduces the IP_TRANSPARENT socket option: enabling that
 .\"     will make the IPv4 routing omit the non-local source address check on