]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man7/ipv6.7
epoll.7: wfix
[thirdparty/man-pages.git] / man7 / ipv6.7
index 6224c6e67ec119e21974756b0f2c2ce0a806e665..9692ec1ece03e2a4fcb7a4adfbcb1315ca6cf86b 100644 (file)
@@ -10,7 +10,7 @@
 .\" $Id: ipv6.7,v 1.3 2000/12/20 18:10:31 ak Exp $
 .\"
 .\" The following socket options are undocumented
-.\"    All of the folloing are from:
+.\"    All of the following are from:
 .\"        commit 333fad5364d6b457c8d837f7d05802d2aaf8a961
 .\"        Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
 .\"        Support several new sockopt / ancillary data in Advanced API (RFC3542).
 .\"        commit c4062dfc425e94290ac427a98d6b4721dd2bc91f
 .\"        Author: Erich E. Hoover <ehoover@mines.edu>
 .\"
-.TH IPV6 7 2014-08-19 "Linux" "Linux Programmer's Manual"
+.TH IPV6 7 2017-09-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 ipv6 \- Linux IPv6 protocol implementation
 .SH SYNOPSIS
 .B #include <sys/socket.h>
 .br
 .B #include <netinet/in.h>
-.sp
+.PP
 .IB tcp6_socket " = socket(AF_INET6, SOCK_STREAM, 0);"
 .br
 .IB raw6_socket " = socket(AF_INET6, SOCK_RAW, " protocol ");"
@@ -130,18 +130,18 @@ 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.
 .PP
 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
+or packet to an IPv6 socket, its source address will be mapped
 to v6 and it will be mapped to v6.
 .SS Address format
 .in +4n
-.nf
+.EX
 struct sockaddr_in6 {
     sa_family_t     sin6_family;   /* AF_INET6 */
     in_port_t       sin6_port;     /* port number */
@@ -153,9 +153,9 @@ struct sockaddr_in6 {
 struct in6_addr {
     unsigned char   s6_addr[16];   /* IPv6 address */
 };
-.fi
+.EE
 .in
-.sp
+.PP
 .I sin6_family
 is always set to
 .BR AF_INET6 ;
@@ -180,7 +180,7 @@ IPv6 supports several address types: unicast to address a single
 host, multicast to address a group of hosts,
 anycast to address the nearest member of a group of hosts
 (not implemented in Linux), IPv4-on-IPv6 to
-address a IPv4 host, and other reserved address types.
+address an IPv4 host, and other reserved address types.
 .PP
 The address notation for IPv6 is a group of 8 4-digit hexadecimal
 numbers, separated with a \(aq:\(aq.
@@ -220,9 +220,9 @@ Argument is a pointer to a
 .B IPV6_MTU
 .BR getsockopt ():
 Retrieve the current known path MTU of the current socket.
-Only valid when the socket has been connected.
+Valid only when the socket has been connected.
 Returns an integer.
-
+.IP
 .BR setsockopt ():
 Set the MTU to be used for the socket.
 The MTU is limited by the device
@@ -266,7 +266,7 @@ control message on incoming datagrams.
 Such control messages contain a
 .IR "struct in6_pktinfo" ,
 as per RFC 3542.
-Only allowed for
+Allowed only for
 .B SOCK_DGRAM
 or
 .B SOCK_RAW
@@ -294,7 +294,7 @@ The control messages have the same type as the socket option.
 All these header options can also be set for outgoing packets
 by putting the appropriate control message into the control buffer of
 .BR sendmsg (2).
-Only allowed for
+Allowed only for
 .B SOCK_DGRAM
 or
 .B SOCK_RAW
@@ -313,7 +313,7 @@ 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
+Allowed only for
 .B SOCK_RAW
 sockets.
 The tapped packets are not forwarded by the kernel, it is the
@@ -337,13 +337,13 @@ If this flag is set to true (nonzero), then the socket is restricted
 to sending and receiving IPv6 packets only.
 In this case, an IPv4 and an IPv6 application can bind
 to a single port at the same time.
-
+.IP
 If this flag is set to false (zero),
 then the socket can be used to send and receive packets
 to and from an IPv6 address or an IPv4-mapped IPv6 address.
-
+.IP
 The argument is a pointer to a boolean value in an integer.
-
+.IP
 The default value for this flag is defined by the contents of the file
 .IR /proc/sys/net/ipv6/bindv6only .
 The default value for that file is 0 (false).
@@ -393,6 +393,16 @@ Programs that assume that all address types can be stored safely in a
 need to be changed to use
 .I struct sockaddr_storage
 for that instead.
+.PP
+.BR SOL_IP ,
+.BR SOL_IPV6 ,
+.B SOL_ICMPV6
+and other
+.BR SOL_ *
+socket options are nonportable variants of
+.BR IPPROTO_ * .
+See also
+.BR ip (7).
 .SH BUGS
 The IPv6 extended API as in RFC\ 2292 is currently only partly
 implemented;