ip6.4 (219597) | ip6.4 (231564) |
---|---|
1.\" $KAME: ip6.4,v 1.23 2005/01/11 05:56:25 itojun Exp $ 2.\" $OpenBSD: ip6.4,v 1.21 2005/01/06 03:50:46 itojun Exp $ 3.\" 4.\" Copyright (c) 1983, 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 14 unchanged lines hidden (view full) --- 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" | 1.\" $KAME: ip6.4,v 1.23 2005/01/11 05:56:25 itojun Exp $ 2.\" $OpenBSD: ip6.4,v 1.21 2005/01/06 03:50:46 itojun Exp $ 3.\" 4.\" Copyright (c) 1983, 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 14 unchanged lines hidden (view full) --- 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" |
31.\" $FreeBSD: head/share/man/man4/ip6.4 219597 2011-03-13 11:44:16Z bz $ | 31.\" $FreeBSD: head/share/man/man4/ip6.4 231564 2012-02-12 18:29:56Z ed $ |
32.\" 33.Dd March 13, 2011 34.Dt IP6 4 35.Os 36.Sh NAME 37.Nm ip6 38.Nd Internet Protocol version 6 (IPv6) network layer 39.Sh SYNOPSIS --- 30 unchanged lines hidden (view full) --- 70.Pc 71must instead be utilized. 72.Pp 73The header has the following definition: 74.Bd -literal -offset indent 75struct ip6_hdr { 76 union { 77 struct ip6_hdrctl { | 32.\" 33.Dd March 13, 2011 34.Dt IP6 4 35.Os 36.Sh NAME 37.Nm ip6 38.Nd Internet Protocol version 6 (IPv6) network layer 39.Sh SYNOPSIS --- 30 unchanged lines hidden (view full) --- 70.Pc 71must instead be utilized. 72.Pp 73The header has the following definition: 74.Bd -literal -offset indent 75struct ip6_hdr { 76 union { 77 struct ip6_hdrctl { |
78 u_int32_t ip6_un1_flow; /* 20 bits of flow ID */ 79 u_int16_t ip6_un1_plen; /* payload length */ 80 u_int8_t ip6_un1_nxt; /* next header */ 81 u_int8_t ip6_un1_hlim; /* hop limit */ | 78 uint32_t ip6_un1_flow; /* 20 bits of flow ID */ 79 uint16_t ip6_un1_plen; /* payload length */ 80 uint8_t ip6_un1_nxt; /* next header */ 81 uint8_t ip6_un1_hlim; /* hop limit */ |
82 } ip6_un1; | 82 } ip6_un1; |
83 u_int8_t ip6_un2_vfc; /* version and class */ | 83 uint8_t ip6_un2_vfc; /* version and class */ |
84 } ip6_ctlun; 85 struct in6_addr ip6_src; /* source address */ 86 struct in6_addr ip6_dst; /* destination address */ 87} __packed; 88 89#define ip6_vfc ip6_ctlun.ip6_un2_vfc 90#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow 91#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen --- 24 unchanged lines hidden (view full) --- 116and 117.Va ip6_dst 118specify the source and destination addresses. 119.Pp 120The IPv6 header may be followed by any number of extension headers that start 121with the following generic definition: 122.Bd -literal -offset indent 123struct ip6_ext { | 84 } ip6_ctlun; 85 struct in6_addr ip6_src; /* source address */ 86 struct in6_addr ip6_dst; /* destination address */ 87} __packed; 88 89#define ip6_vfc ip6_ctlun.ip6_un2_vfc 90#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow 91#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen --- 24 unchanged lines hidden (view full) --- 116and 117.Va ip6_dst 118specify the source and destination addresses. 119.Pp 120The IPv6 header may be followed by any number of extension headers that start 121with the following generic definition: 122.Bd -literal -offset indent 123struct ip6_ext { |
124 u_int8_t ip6e_nxt; 125 u_int8_t ip6e_len; | 124 uint8_t ip6e_nxt; 125 uint8_t ip6e_len; |
126} __packed; 127.Ed 128.Ss Options 129IPv6 allows header options on packets to manipulate the behavior of the 130protocol. 131These options and other control requests are accessed with the 132.Xr getsockopt 2 133and --- 142 unchanged lines hidden (view full) --- 276Get or set whether the hop-by-hop options from subsequent packets will be 277provided as ancillary data along with the payload in subsequent 278.Xr recvmsg 2 279calls. 280The option is stored in the following structure in the ancillary data 281returned: 282.Bd -literal 283struct ip6_hbh { | 126} __packed; 127.Ed 128.Ss Options 129IPv6 allows header options on packets to manipulate the behavior of the 130protocol. 131These options and other control requests are accessed with the 132.Xr getsockopt 2 133and --- 142 unchanged lines hidden (view full) --- 276Get or set whether the hop-by-hop options from subsequent packets will be 277provided as ancillary data along with the payload in subsequent 278.Xr recvmsg 2 279calls. 280The option is stored in the following structure in the ancillary data 281returned: 282.Bd -literal 283struct ip6_hbh { |
284 u_int8_t ip6h_nxt; /* next header */ 285 u_int8_t ip6h_len; /* length in units of 8 octets */ | 284 uint8_t ip6h_nxt; /* next header */ 285 uint8_t ip6h_len; /* length in units of 8 octets */ |
286/* followed by options */ 287} __packed; 288.Ed 289.Pp 290The 291.Fn inet6_option_space 292routine and family of routines may be used to manipulate this data. 293.Pp 294This option requires superuser privileges. 295.It Dv IPV6_DSTOPTS Fa "int *" 296Get or set whether the destination options from subsequent packets will 297be provided as ancillary data along with the payload in subsequent 298.Xr recvmsg 2 299calls. 300The option is stored in the following structure in the ancillary data 301returned: 302.Bd -literal 303struct ip6_dest { | 286/* followed by options */ 287} __packed; 288.Ed 289.Pp 290The 291.Fn inet6_option_space 292routine and family of routines may be used to manipulate this data. 293.Pp 294This option requires superuser privileges. 295.It Dv IPV6_DSTOPTS Fa "int *" 296Get or set whether the destination options from subsequent packets will 297be provided as ancillary data along with the payload in subsequent 298.Xr recvmsg 2 299calls. 300The option is stored in the following structure in the ancillary data 301returned: 302.Bd -literal 303struct ip6_dest { |
304 u_int8_t ip6d_nxt; /* next header */ 305 u_int8_t ip6d_len; /* length in units of 8 octets */ | 304 uint8_t ip6d_nxt; /* next header */ 305 uint8_t ip6d_len; /* length in units of 8 octets */ |
306/* followed by options */ 307} __packed; 308.Ed 309.Pp 310The 311.Fn inet6_option_space 312routine and family of routines may be used to manipulate this data. 313.Pp --- 14 unchanged lines hidden (view full) --- 328Get or set whether the routing header from subsequent packets will be 329provided as ancillary data along with the payload in subsequent 330.Xr recvmsg 2 331calls. 332The header is stored in the following structure in the ancillary data 333returned: 334.Bd -literal 335struct ip6_rthdr { | 306/* followed by options */ 307} __packed; 308.Ed 309.Pp 310The 311.Fn inet6_option_space 312routine and family of routines may be used to manipulate this data. 313.Pp --- 14 unchanged lines hidden (view full) --- 328Get or set whether the routing header from subsequent packets will be 329provided as ancillary data along with the payload in subsequent 330.Xr recvmsg 2 331calls. 332The header is stored in the following structure in the ancillary data 333returned: 334.Bd -literal 335struct ip6_rthdr { |
336 u_int8_t ip6r_nxt; /* next header */ 337 u_int8_t ip6r_len; /* length in units of 8 octets */ 338 u_int8_t ip6r_type; /* routing type */ 339 u_int8_t ip6r_segleft; /* segments left */ | 336 uint8_t ip6r_nxt; /* next header */ 337 uint8_t ip6r_len; /* length in units of 8 octets */ 338 uint8_t ip6r_type; /* routing type */ 339 uint8_t ip6r_segleft; /* segments left */ |
340/* followed by routing-type-specific data */ 341} __packed; 342.Ed 343.Pp 344The 345.Fn inet6_option_space 346routine and family of routines may be used to manipulate this data. 347.Pp --- 354 unchanged lines hidden --- | 340/* followed by routing-type-specific data */ 341} __packed; 342.Ed 343.Pp 344The 345.Fn inet6_option_space 346routine and family of routines may be used to manipulate this data. 347.Pp --- 354 unchanged lines hidden --- |