OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man7 / ipv6.7
index ce75541..eb244a9 100644 (file)
@@ -1,10 +1,89 @@
 .\" This man page is Copyright (C) 2000 Andi Kleen <ak@muc.de>.
+.\"
+.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
 .\" Permission is granted to distribute possibly modified copies
 .\" of this page provided the header is included verbatim,
 .\" and in case of nontrivial modification author and date
 .\" of the modification is added to the header.
+.\" %%%LICENSE_END
+.\"
 .\" $Id: ipv6.7,v 1.3 2000/12/20 18:10:31 ak Exp $
-.TH IPV6 7 2012-05-10 "Linux" "Linux Programmer's Manual"
+.\"
+.\" The following socket options are undocumented
+.\"    All of the folloing are from:
+.\"        commit 333fad5364d6b457c8d837f7d05802d2aaf8a961
+.\"        Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+.\"        Support several new sockopt / ancillary data in Advanced API (RFC3542).
+.\"            IPV6_2292PKTINFO (2.6.14)
+.\"                Formerly IPV6_PKTINFO
+.\"            IPV6_2292HOPOPTS (2.6.14)
+.\"                Formerly IPV6_HOPOPTS, which is documented
+.\"            IPV6_2292DSTOPTS (2.6.14)
+.\"                Formerly IPV6_DSTOPTS, which is documented
+.\"            IPV6_2292RTHDR (2.6.14)
+.\"                Formerly IPV6_RTHDR, which is documented
+.\"            IPV6_2292PKTOPTIONS (2.6.14)
+.\"                Formerly IPV6_PKTOPTIONS
+.\"            IPV6_2292HOPLIMIT (2.6.14)
+.\"                Formerly IPV6_HOPLIMIT, which is documented
+.\"
+.\"            IPV6_RECVHOPLIMIT (2.6.14)
+.\"            IPV6_RECVHOPOPTS (2.6.14)
+.\"            IPV6_RTHDRDSTOPTS (2.6.14)
+.\"            IPV6_RECVRTHDR (2.6.14)
+.\"            IPV6_RECVDSTOPTS (2.6.14)
+.\"
+.\"    IPV6_RECVPATHMTU (2.6.35, flag value added in 2.6.14)
+.\"        commit 793b14731686595a741d9f47726ad8b9a235385a
+.\"        Author: Brian Haley <brian.haley@hp.com>
+.\"    IPV6_PATHMTU (2.6.35, flag value added in 2.6.14)
+.\"        commit 793b14731686595a741d9f47726ad8b9a235385a
+.\"        Author: Brian Haley <brian.haley@hp.com>
+.\"    IPV6_DONTFRAG (2.6.35, flag value added in 2.6.14)
+.\"        commit 793b14731686595a741d9f47726ad8b9a235385a
+.\"        Author: Brian Haley <brian.haley@hp.com>
+.\"        commit 4b340ae20d0e2366792abe70f46629e576adaf5e
+.\"        Author: Brian Haley <brian.haley@hp.com>
+.\"
+.\"    IPV6_RECVTCLASS (2.6.14)
+.\"        commit 41a1f8ea4fbfcdc4232f023732584aae2220de31
+.\"        Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+.\"            Based on patch from David L Stevens <dlstevens@us.ibm.com>
+.\"
+.\"    IPV6_CHECKSUM (2.2)
+.\"    IPV6_NEXTHOP (2.2)
+.\"    IPV6_JOIN_ANYCAST (2.4.21 / 2.6)
+.\"    IPV6_LEAVE_ANYCAST (2.4.21 / 2.6)
+.\"    IPV6_FLOWLABEL_MGR (2.2.7 / 2.4)
+.\"    IPV6_FLOWINFO_SEND (2.2.7 / 2.4)
+.\"    IPV6_IPSEC_POLICY (2.6)
+.\"    IPV6_XFRM_POLICY (2.6)
+.\"    IPV6_TCLASS (2.6)
+.\"
+.\"    IPV6_ADDR_PREFERENCES (2.6.26)
+.\"        commit 7cbca67c073263c179f605bdbbdc565ab29d801d
+.\"        Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+.\"    IPV6_MINHOPCOUNT (2.6.35)
+.\"        commit e802af9cabb011f09b9c19a82faef3dd315f27eb
+.\"        Author: Stephen Hemminger <shemminger@vyatta.com>
+.\"    IPV6_ORIGDSTADDR (2.6.37)
+.\"        Actually a CMSG rather than a sockopt?
+.\"        In header file, we have IPV6_RECVORIGDSTADDR == IPV6_ORIGDSTADDR
+.\"        commit 6c46862280c5f55eda7750391bc65cd7e08c7535
+.\"        Author: Balazs Scheidler <bazsi@balabit.hu>
+.\"    IPV6_RECVORIGDSTADDR (2.6.37)
+.\"        commit 6c46862280c5f55eda7750391bc65cd7e08c7535
+.\"        Author: Balazs Scheidler <bazsi@balabit.hu>
+.\"            Support for IPV6_RECVORIGDSTADDR sockopt for UDP sockets
+.\"            were contributed by Harry Mason.
+.\"    IPV6_TRANSPARENT (2.6.37)
+.\"        commit 6c46862280c5f55eda7750391bc65cd7e08c7535
+.\"        Author: Balazs Scheidler <bazsi@balabit.hu>
+.\"    IPV6_UNICAST_IF (3.4)
+.\"        commit c4062dfc425e94290ac427a98d6b4721dd2bc91f
+.\"        Author: Erich E. Hoover <ehoover@mines.edu>
+.\"
+.TH IPV6 7 2014-08-19 "Linux" "Linux Programmer's Manual"
 .SH NAME
 ipv6 \- Linux IPv6 protocol implementation
 .SH SYNOPSIS
@@ -51,7 +130,7 @@ should be used.
 .PP
 IPv4 connections can be handled with the v6 API by using the
 v4-mapped-on-v6 address type;
-thus a program only needs to support this API type to
+thus a program needs to support only this API type to
 support both protocols.
 This is handled transparently by the address
 handling functions in the C library.
@@ -60,7 +139,7 @@ IPv4 and IPv6 share the local port space.
 When you get an IPv4 connection
 or packet to a IPv6 socket, its source address will be mapped
 to v6 and it will be mapped to v6.
-.SS "Address Format"
+.SS Address format
 .in +4n
 .nf
 struct sockaddr_in6 {
@@ -92,7 +171,7 @@ is the 128-bit IPv6 address.
 .I sin6_scope_id
 is an ID depending on the scope of the address.
 It is new in Linux 2.4.
-Linux only supports it for link-local addresses, in that case
+Linux supports it only for link-local addresses, in that case
 .I sin6_scope_id
 contains the interface index (see
 .BR netdevice (7))
@@ -110,7 +189,7 @@ Special addresses are ::1 for loopback and ::FFFF:<IPv4 address>
 for IPv4-mapped-on-IPv6.
 .PP
 The port space of IPv6 is shared with IPv4.
-.SS "Socket Options"
+.SS Socket options
 IPv6 supports some protocol-specific socket options that can be set with
 .BR setsockopt (2)
 and read with
@@ -126,7 +205,7 @@ socket into a socket of a different address family.
 Only
 .B AF_INET
 is currently supported for that.
-It is only allowed for IPv6 sockets
+It is allowed only for IPv6 sockets
 that are connected and bound to a v4-mapped-on-v6 address.
 The argument is a pointer to an integer containing
 .BR AF_INET .
@@ -136,17 +215,15 @@ programs that don't know how to deal with the IPv6 API.
 .B IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP
 Control membership in multicast groups.
 Argument is a pointer to a
-.I struct ipv6_mreq
-structure.
-.\" FIXME IPV6_CHECKSUM is not documented, and probably should be
-.\" FIXME IPV6_JOIN_ANYCAST is not documented, and probably should be
-.\" FIXME IPV6_LEAVE_ANYCAST is not documented, and probably should be
-.\" FIXME IPV6_RECVPKTINFO is not documented, and probably should be
-.\" FIXME IPV6_2292PKTINFO is not documented, and probably should be
-.\" FIXME there are probably many other IPV6_* socket options that
-.\" should be documented
+.IR "struct ipv6_mreq" .
 .TP
 .B IPV6_MTU
+.BR getsockopt ():
+Retrieve the current known path MTU of the current socket.
+Only valid when the socket has been connected.
+Returns an integer.
+
+.BR setsockopt ():
 Set the MTU to be used for the socket.
 The MTU is limited by the device
 MTU or the path MTU when path MTU discovery is enabled.
@@ -169,8 +246,7 @@ between 0 and 255.
 .TP
 .B IPV6_MULTICAST_IF
 Set the device for outgoing multicast packets on the socket.
-This is only allowed
-for
+This is allowed only for
 .B SOCK_DGRAM
 and
 .B SOCK_RAW
@@ -183,10 +259,13 @@ in an integer.
 Control whether the socket sees multicast packets that it has send itself.
 Argument is a pointer to boolean.
 .TP
-.B IPV6_PKTINFO
+.BR IPV6_RECVPKTINFO " (since Linux 2.6.14)"
 Set delivery of the
 .B IPV6_PKTINFO
 control message on incoming datagrams.
+Such control messages contain a
+.IR "struct in6_pktinfo" ,
+as per RFC 3542.
 Only allowed for
 .B SOCK_DGRAM
 or
@@ -234,7 +313,9 @@ Argument is a pointer to boolean.
 .B IPV6_ROUTER_ALERT
 Pass forwarded packets containing a router alert hop-by-hop option to
 this socket.
-Only allowed for SOCK_RAW sockets.
+Only allowed for
+.B SOCK_RAW
+sockets.
 The tapped packets are not forwarded by the kernel, it is the
 user's responsibility to send them out again.
 Argument is a pointer to an integer.
@@ -268,7 +349,6 @@ The default value for this flag is defined by the contents of the file
 The default value for that file is 0 (false).
 .\" FLOWLABEL_MGR, FLOWINFO_SEND
 .SH ERRORS
-.\" FIXME document all errors.
 .TP
 .B ENODEV
 The user tried to
@@ -280,11 +360,6 @@ in the supplied
 structure is not a valid
 interface index.
 .SH VERSIONS
-The older
-.I libinet6
-libc5 based IPv6 API implementation for Linux is not described here
-and may vary in details.
-.PP
 Linux 2.4 will break binary compatibility for the
 .I sockaddr_in6
 for 64-bit
@@ -308,7 +383,7 @@ It is transparently passed/read by the kernel
 when the passed address length contains it.
 Some programs that pass a longer address buffer and then
 check the outgoing address length may break.
-.SH "NOTES"
+.SH NOTES
 The
 .I sockaddr_in6
 structure is bigger than the generic
@@ -329,11 +404,19 @@ IPSec support for EH and AH headers is missing.
 Flow label management is not complete and not documented here.
 .PP
 This man page is not complete.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR cmsg (3),
 .BR ip (7)
 .PP
-RFC\ 2553: IPv6 BASIC API.
+RFC\ 2553: IPv6 BASIC API;
 Linux tries to be compliant to this.
-.PP
 RFC\ 2460: IPv6 specification.
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.