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.\" $FreeBSD: src/share/man/man4/ip6.4,v 1.18 2005/01/23 16:02:48 gnn Exp $ 4.\" $DragonFly: src/share/man/man4/ip6.4,v 1.3 2005/01/23 17:03:13 hrs Exp $ 5.\" 6.\" Copyright (c) 1983, 1991, 1993 7.\" The Regents of the University of California. All rights reserved. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.Dd December 29, 2004 33.Dt IP6 4 34.Os 35.Sh NAME 36.Nm ip6 37.Nd Internet Protocol version 6 (IPv6) network layer 38.Sh SYNOPSIS 39.In sys/socket.h 40.In netinet/in.h 41.Ft int 42.Fn socket AF_INET6 SOCK_RAW proto 43.Sh DESCRIPTION 44The IPv6 network layer is used by the IPv6 protocol family for 45transporting data. 46IPv6 packets contain an IPv6 header that is not provided as part of the 47payload contents when passed to an application. 48IPv6 header options affect the behavior of this protocol and may be used 49by high-level protocols (such as the 50.Xr tcp 4 51and 52.Xr udp 4 53protocols) as well as directly by 54.Dq raw sockets , 55which process IPv6 messages at a lower-level and may be useful for 56developing new protocols and special-purpose applications. 57.Ss Header 58All IPv6 packets begin with an IPv6 header. 59When data received by the kernel are passed to the application, this 60header is not included in buffer, even when raw sockets are being used. 61Likewise, when data are sent to the kernel for transmit from the 62application, the buffer is not examined for an IPv6 header: 63the kernel always constructs the header. 64To directly access IPv6 headers from received packets and specify them 65as part of the buffer passed to the kernel, link-level access 66.Po 67.Xr bpf 4 , 68for example 69.Pc 70must instead be utilized. 71.Pp 72The header has the following definition: 73.Bd -literal -offset indent 74struct ip6_hdr { 75 union { 76 struct ip6_hdrctl { 77 u_int32_t ip6_un1_flow; /* 20 bits of flow ID */ 78 u_int16_t ip6_un1_plen; /* payload length */ 79 u_int8_t ip6_un1_nxt; /* next header */ 80 u_int8_t ip6_un1_hlim; /* hop limit */ 81 } ip6_un1; 82 u_int8_t ip6_un2_vfc; /* version and class */ 83 } ip6_ctlun; 84 struct in6_addr ip6_src; /* source address */ 85 struct in6_addr ip6_dst; /* destination address */ 86} __packed; 87 88#define ip6_vfc ip6_ctlun.ip6_un2_vfc 89#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow 90#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen 91#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt 92#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim 93#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim 94.Ed 95.Pp 96All fields are in network-byte order. 97Any options specified (see 98.Sx Options 99below) must also be specified in network-byte order. 100.Pp 101.Va ip6_flow 102specifies the flow ID. 103.Va ip6_plen 104specifies the payload length. 105.Va ip6_nxt 106specifies the type of the next header. 107.Va ip6_hlim 108specifies the hop limit. 109.Pp 110The top 4 bits of 111.Va ip6_vfc 112specify the class and the bottom 4 bits specify the version. 113.Pp 114.Va ip6_src 115and 116.Va ip6_dst 117specify the source and destination addresses. 118.Pp 119The IPv6 header may be followed by any number of extension headers that start 120with the following generic definition: 121.Bd -literal -offset indent 122struct ip6_ext { 123 u_int8_t ip6e_nxt; 124 u_int8_t ip6e_len; 125} __packed; 126.Ed 127.Ss Options 128IPv6 allows header options on packets to manipulate the behavior of the 129protocol. 130These options and other control requests are accessed with the 131.Xr getsockopt 2 132and 133.Xr setsockopt 2 134system calls at level 135.Dv IPPROTO_IPV6 136and by using ancillary data in 137.Xr recvmsg 2 138and 139.Xr sendmsg 2 . 140They can be used to access most of the fields in the IPv6 header and 141extension headers. 142.Pp 143The following socket options are supported: 144.Bl -tag -width Ds 145.\" .It Dv IPV6_OPTIONS 146.It Dv IPV6_UNICAST_HOPS Fa "int *" 147Get or set the default hop limit header field for outgoing unicast 148datagrams sent on this socket. 149A value of \-1 resets to the default value. 150.\" .It Dv IPV6_RECVOPTS Fa "int *" 151.\" Get or set the status of whether all header options will be 152.\" delivered along with the datagram when it is received. 153.\" .It Dv IPV6_RECVRETOPTS Fa "int *" 154.\" Get or set the status of whether header options will be delivered 155.\" for reply. 156.\" .It Dv IPV6_RECVDSTADDR Fa "int *" 157.\" Get or set the status of whether datagrams are received with 158.\" destination addresses. 159.\" .It Dv IPV6_RETOPTS 160.\" Get or set IPv6 options. 161.It Dv IPV6_MULTICAST_IF Fa "u_int *" 162Get or set the interface from which multicast packets will be sent. 163For hosts with multiple interfaces, each multicast transmission is sent 164from the primary network interface. 165The interface is specified as its index as provided by 166.Xr if_nametoindex 3 . 167A value of zero specifies the default interface. 168.It Dv IPV6_MULTICAST_HOPS Fa "int *" 169Get or set the default hop limit header field for outgoing multicast 170datagrams sent on this socket. 171This option controls the scope of multicast datagram transmissions. 172.Pp 173Datagrams with a hop limit of 1 are not forwarded beyond the local 174network. 175Multicast datagrams with a hop limit of zero will not be transmitted on 176any network but may be delivered locally if the sending host belongs to 177the destination group and if multicast loopback (see below) has not been 178disabled on the sending socket. 179Multicast datagrams with a hop limit greater than 1 may be forwarded to 180the other networks if a multicast router (such as 181.Xr mrouted 8 ) 182is attached to the local network. 183.It Dv IPV6_MULTICAST_LOOP Fa "u_int *" 184Get or set the status of whether multicast datagrams will be looped back 185for local delivery when a multicast datagram is sent to a group to which 186the sending host belongs. 187.Pp 188This option improves performance for applications that may have no more 189than one instance on a single host (such as a router daemon) by 190eliminating the overhead of receiving their own transmissions. 191It should generally not be used by applications for which there may be 192more than one instance on a single host (such as a conferencing program) 193or for which the sender does not belong to the destination group 194(such as a time-querying program). 195.Pp 196A multicast datagram sent with an initial hop limit greater than 1 may 197be delivered to the sending host on a different interface from that on 198which it was sent if the host belongs to the destination group on that 199other interface. 200The multicast loopback control option has no effect on such delivery. 201.It Dv IPV6_JOIN_GROUP Fa "struct ipv6_mreq *" 202Join a multicast group. 203A host must become a member of a multicast group before it can receive 204datagrams sent to the group. 205.Bd -literal 206struct ipv6_mreq { 207 struct in6_addr ipv6mr_multiaddr; 208 unsigned int ipv6mr_interface; 209}; 210.Ed 211.Pp 212.Va ipv6mr_interface 213may be set to zeroes to choose the default multicast interface or to the 214index of a particular multicast-capable interface if the host is 215multihomed. 216Membership is associated with a single interface; programs running on 217multihomed hosts may need to join the same group on more than one 218interface. 219.Pp 220If the multicast address is unspecified (i.e., all zeroes), messages 221from all multicast addresses will be accepted by this group. 222Note that setting to this value requires superuser privileges. 223.It Dv IPV6_LEAVE_GROUP Fa "struct ipv6_mreq *" 224Drop membership from the associated multicast group. 225Memberships are automatically dropped when the socket is closed or when 226the process exits. 227.It Dv IPV6_PORTRANGE Fa "int *" 228Get or set the allocation policy of ephemeral ports for when the kernel 229automatically binds a local address to this socket. 230The following values are available: 231.Pp 232.Bl -tag -width IPV6_PORTRANGE_DEFAULT -compact 233.It Dv IPV6_PORTRANGE_DEFAULT 234Use the regular range of non-reserved ports (varies, see 235.Xr sysctl 8 ) . 236.It Dv IPV6_PORTRANGE_HIGH 237Use a high range (varies, see 238.Xr sysctl 8 ) . 239.It Dv IPV6_PORTRANGE_LOW 240Use a low, reserved range (600\-1023). 241.El 242.It Dv IPV6_PKTINFO Fa "int *" 243Get or set whether additional information about subsequent packets will 244be provided as ancillary data along with the payload in subsequent 245.Xr recvmsg 2 246calls. 247The information is stored in the following structure in the ancillary 248data returned: 249.Bd -literal 250struct in6_pktinfo { 251 struct in6_addr ipi6_addr; /* src/dst IPv6 address */ 252 unsigned int ipi6_ifindex; /* send/recv if index */ 253}; 254.Ed 255.It Dv IPV6_HOPLIMIT Fa "int *" 256Get or set whether the hop limit header field from subsequent packets 257will be provided as ancillary data along with the payload in subsequent 258.Xr recvmsg 2 259calls. 260The value is stored as an 261.Vt int 262in the ancillary data returned. 263.\" .It Dv IPV6_NEXTHOP Fa "int *" 264.\" Get or set whether the address of the next hop for subsequent 265.\" packets will be provided as ancillary data along with the payload in 266.\" subsequent 267.\" .Xr recvmsg 2 268.\" calls. 269.\" The option is stored as a 270.\" .Vt sockaddr 271.\" structure in the ancillary data returned. 272.\" .Pp 273.\" This option requires superuser privileges. 274.It Dv IPV6_HOPOPTS Fa "int *" 275Get or set whether the hop-by-hop options from subsequent packets will be 276provided as ancillary data along with the payload in subsequent 277.Xr recvmsg 2 278calls. 279The option is stored in the following structure in the ancillary data 280returned: 281.Bd -literal 282struct ip6_hbh { 283 u_int8_t ip6h_nxt; /* next header */ 284 u_int8_t ip6h_len; /* length in units of 8 octets */ 285/* followed by options */ 286} __packed; 287.Ed 288.Pp 289The 290.Fn inet6_option_space 291routine and family of routines may be used to manipulate this data. 292.Pp 293This option requires superuser privileges. 294.It Dv IPV6_DSTOPTS Fa "int *" 295Get or set whether the destination options from subsequent packets will 296be provided as ancillary data along with the payload in subsequent 297.Xr recvmsg 2 298calls. 299The option is stored in the following structure in the ancillary data 300returned: 301.Bd -literal 302struct ip6_dest { 303 u_int8_t ip6d_nxt; /* next header */ 304 u_int8_t ip6d_len; /* length in units of 8 octets */ 305/* followed by options */ 306} __packed; 307.Ed 308.Pp 309The 310.Fn inet6_option_space 311routine and family of routines may be used to manipulate this data. 312.Pp 313This option requires superuser privileges. 314.It Dv IPV6_RTHDR Fa "int *" 315Get or set whether the routing header from subsequent packets will be 316provided as ancillary data along with the payload in subsequent 317.Xr recvmsg 2 318calls. 319The header is stored in the following structure in the ancillary data 320returned: 321.Bd -literal 322struct ip6_rthdr { 323 u_int8_t ip6r_nxt; /* next header */ 324 u_int8_t ip6r_len; /* length in units of 8 octets */ 325 u_int8_t ip6r_type; /* routing type */ 326 u_int8_t ip6r_segleft; /* segments left */ 327/* followed by routing-type-specific data */ 328} __packed; 329.Ed 330.Pp 331The 332.Fn inet6_option_space 333routine and family of routines may be used to manipulate this data. 334.Pp 335This option requires superuser privileges. 336.It Dv IPV6_PKTOPTIONS Fa "struct cmsghdr *" 337Get or set all header options and extension headers at one time on the 338last packet sent or received on the socket. 339All options must fit within the size of an mbuf (see 340.Xr mbuf 9 ) . 341Options are specified as a series of 342.Vt cmsghdr 343structures followed by corresponding values. 344.Va cmsg_level 345is set to 346.Dv IPPROTO_IPV6 , 347.Va cmsg_type 348to one of the other values in this list, and trailing data to the option 349value. 350When setting options, if the length 351.Va optlen 352to 353.Xr setsockopt 2 354is zero, all header options will be reset to their default values. 355Otherwise, the length should specify the size the series of control 356messages consumes. 357.Pp 358Instead of using 359.Xr sendmsg 2 360to specify option values, the ancillary data used in these calls that 361correspond to the desired header options may be directly specified as 362the control message in the series of control messages provided as the 363argument to 364.Xr setsockopt 2 . 365.It Dv IPV6_CHECKSUM Fa "int *" 366Get or set the byte offset into a packet where the 16-bit checksum is 367located. 368When set, this byte offset is where incoming packets will be expected 369to have checksums of their data stored and where outgoing packets will 370have checksums of their data computed and stored by the kernel. 371A value of \-1 specifies that no checksums will be checked on incoming 372packets and that no checksums will be computed or stored on outgoing 373packets. 374The offset of the checksum for ICMPv6 sockets cannot be relocated or 375turned off. 376.It Dv IPV6_V6ONLY Fa "int *" 377Get or set whether only IPv6 connections can be made to this socket. 378For wildcard sockets, this can restrict connections to IPv6 only. 379.\"With 380.\".Ox 381.\"IPv6 sockets are always IPv6-only, so the socket option is read-only 382.\"(not modifiable). 383.It Dv IPV6_FAITH Fa "int *" 384Get or set the status of whether 385.Xr faith 4 386connections can be made to this socket. 387.It Dv IPV6_USE_MIN_MTU Fa "int *" 388Get or set whether the minimal IPv6 maximum transmission unit (MTU) size 389will be used to avoid fragmentation from occurring for subsequent 390outgoing datagrams. 391.It Dv IPV6_AUTH_LEVEL Fa "int *" 392Get or set the 393.Xr ipsec 4 394authentication level. 395.It Dv IPV6_ESP_TRANS_LEVEL Fa "int *" 396Get or set the ESP transport level. 397.It Dv IPV6_ESP_NETWORK_LEVEL Fa "int *" 398Get or set the ESP encapsulation level. 399.It Dv IPV6_IPCOMP_LEVEL Fa "int *" 400Get or set the 401.Xr ipcomp 4 402level. 403.El 404.Pp 405The 406.Dv IPV6_PKTINFO , 407.\" .Dv IPV6_NEXTHOP , 408.Dv IPV6_HOPLIMIT , 409.Dv IPV6_HOPOPTS , 410.Dv IPV6_DSTOPTS , 411and 412.Dv IPV6_RTHDR 413options will return ancillary data along with payload contents in subsequent 414.Xr recvmsg 2 415calls with 416.Va cmsg_level 417set to 418.Dv IPPROTO_IPV6 419and 420.Va cmsg_type 421set to respective option name value (e.g., 422.Dv IPV6_HOPTLIMIT ) . 423These options may also be used directly as ancillary 424.Va cmsg_type 425values in 426.Xr sendmsg 2 427to set options on the packet being transmitted by the call. 428The 429.Va cmsg_level 430value must be 431.Dv IPPROTO_IPV6 . 432For these options, the ancillary data object value format is the same 433as the value returned as explained for each when received with 434.Xr recvmsg 2 . 435.Pp 436Note that using 437.Xr sendmsg 2 438to specify options on particular packets works only on UDP and raw sockets. 439To manipulate header options for packets on TCP sockets, only the socket 440options may be used. 441.Pp 442In some cases, there are multiple APIs defined for manipulating an IPv6 443header field. 444A good example is the outgoing interface for multicast datagrams, which 445can be set by the 446.Dv IPV6_MULTICAST_IF 447socket option, through the 448.Dv IPV6_PKTINFO 449option, and through the 450.Va sin6_scope_id 451field of the socket address passed to the 452.Xr sendto 2 453system call. 454.Pp 455Resolving these conflicts is implementation dependent. 456This implementation determines the value in the following way: 457options specified by using ancillary data (i.e., 458.Xr sendmsg 2 ) 459are considered first, 460options specified by using 461.Dv IPV6_PKTOPTIONS 462to set 463.Dq sticky 464options are considered second, 465options specified by using the individual, basic, and direct socket 466options (e.g., 467.Dv IPV6_UNICAST_HOPS ) 468are considered third, 469and options specified in the socket address supplied to 470.Xr sendto 2 471are the last choice. 472.Ss Multicasting 473IPv6 multicasting is supported only on 474.Dv AF_INET6 475sockets of type 476.Dv SOCK_DGRAM 477and 478.Dv SOCK_RAW , 479and only on networks where the interface driver supports 480multicasting. 481Socket options (see above) that manipulate membership of 482multicast groups and other multicast options include 483.Dv IPV6_MULTICAST_IF , 484.Dv IPV6_MULTICAST_HOPS , 485.Dv IPV6_MULTICAST_LOOP , 486.Dv IPV6_LEAVE_GROUP , 487and 488.Dv IPV6_JOIN_GROUP . 489.Ss Raw Sockets 490Raw IPv6 sockets are connectionless and are normally used with the 491.Xr sendto 2 492and 493.Xr recvfrom 2 494calls, although the 495.Xr connect 2 496call may be used to fix the destination address for future outgoing 497packets so that 498.Xr send 2 499may instead be used and the 500.Xr bind 2 501call may be used to fix the source address for future outgoing 502packets instead of having the kernel choose a source address. 503.Pp 504By using 505.Xr connect 2 506or 507.Xr bind 2 , 508raw socket input is constrained to only packets with their 509source address matching the socket destination address if 510.Xr connect 2 511was used and to packets with their destination address 512matching the socket source address if 513.Xr bind 2 514was used. 515.Pp 516If the 517.Ar proto 518argument to 519.Xr socket 2 520is zero, the default protocol 521.Pq Dv IPPROTO_RAW 522is used for outgoing packets. 523For incoming packets, protocols recognized by kernel are 524.Sy not 525passed to the application socket (e.g., 526.Xr tcp 4 527and 528.Xr udp 4 ) 529except for some ICMPv6 messages. 530The ICMPv6 messages not passed to raw sockets include echo, timestamp, 531and address mask requests. 532If 533.Ar proto 534is non-zero, only packets with this protocol will be passed to the 535socket. 536.Pp 537IPv6 fragments are also not passed to application sockets until 538they have been reassembled. 539If reception of all packets is desired, link-level access (such as 540.Xr bpf 4 ) 541must be used instead. 542.Pp 543Outgoing packets automatically have an IPv6 header prepended to them 544(based on the destination address and the protocol number the socket 545was created with). 546Incoming packets are received by an application without the IPv6 header 547or any extension headers. 548.Pp 549Outgoing packets will be fragmented automatically by the kernel if they 550are too large. 551Incoming packets will be reassembled before being sent to the raw socket, 552so packet fragments or fragment headers will never be seen on a raw socket. 553.Sh EXAMPLES 554The following determines the hop limit on the next packet received: 555.Bd -literal 556struct iovec iov[2]; 557u_char buf[BUFSIZ]; 558struct cmsghdr *cm; 559struct msghdr m; 560int found, optval; 561u_char data[2048]; 562 563/* Create socket. */ 564 565(void)memset(&m, 0, sizeof(m)); 566(void)memset(&iov, 0, sizeof(iov)); 567 568iov[0].iov_base = data; /* buffer for packet payload */ 569iov[0].iov_len = sizeof(data); /* expected packet length */ 570 571m.msg_name = &from; /* sockaddr_in6 of peer */ 572m.msg_namelen = sizeof(from); 573m.msg_iov = iov; 574m.msg_iovlen = 1; 575m.msg_control = (caddr_t)buf; /* buffer for control messages */ 576m.msg_controllen = sizeof(buf); 577 578/* 579 * Enable the hop limit value from received packets to be 580 * returned along with the payload. 581 */ 582optval = 1; 583if (setsockopt(s, IPPROTO_IPV6, IPV6_HOPLIMIT, &optval, 584 sizeof(optval)) == -1) 585 err(1, "setsockopt"); 586 587found = 0; 588while (!found) { 589 if (recvmsg(s, &m, 0) == -1) 590 err(1, "recvmsg"); 591 for (cm = CMSG_FIRSTHDR(&m); cm != NULL; 592 cm = CMSG_NXTHDR(&m, cm)) { 593 if (cm->cmsg_level == IPPROTO_IPV6 && 594 cm->cmsg_type == IPV6_HOPLIMIT && 595 cm->cmsg_len == CMSG_LEN(sizeof(int))) { 596 found = 1; 597 (void)printf("hop limit: %d\en", 598 *(int *)CMSG_DATA(cm)); 599 break; 600 } 601 } 602} 603.Ed 604.Sh DIAGNOSTICS 605A socket operation may fail with one of the following errors returned: 606.Bl -tag -width EADDRNOTAVAILxx 607.It Bq Er EISCONN 608when trying to establish a connection on a socket which 609already has one or when trying to send a datagram with the destination 610address specified and the socket is already connected. 611.It Bq Er ENOTCONN 612when trying to send a datagram, but 613no destination address is specified, and the socket hasn't been 614connected. 615.It Bq Er ENOBUFS 616when the system runs out of memory for 617an internal data structure. 618.It Bq Er EADDRNOTAVAIL 619when an attempt is made to create a 620socket with a network address for which no network interface 621exists. 622.It Bq Er EACCES 623when an attempt is made to create 624a raw IPv6 socket by a non-privileged process. 625.El 626.Pp 627The following errors specific to IPv6 may occur when setting or getting 628header options: 629.Bl -tag -width EADDRNOTAVAILxx 630.It Bq Er EINVAL 631An unknown socket option name was given. 632.It Bq Er EINVAL 633An ancillary data object was improperly formed. 634.El 635.Sh SEE ALSO 636.Xr getsockopt 2 , 637.Xr recv 2 , 638.Xr send 2 , 639.Xr setsockopt 2 , 640.Xr socket 2 , 641.\" .Xr inet6_option_space 3 , 642.\" .Xr inet6_rthdr_space 3 , 643.Xr if_nametoindex 3 , 644.Xr bpf 4 , 645.Xr icmp6 4 , 646.Xr inet6 4 , 647.Xr netintro 4 , 648.Xr tcp 4 , 649.Xr udp 4 650.Rs 651.%A W. Stevens 652.%A M. Thomas 653.%T Advanced Sockets API for IPv6 654.%R RFC 2292 655.%D February 1998 656.Re 657.Rs 658.%A S. Deering 659.%A R. Hinden 660.%T Internet Protocol, Version 6 (IPv6) Specification 661.%R RFC 2460 662.%D December 1998 663.Re 664.Rs 665.%A R. Gilligan 666.%A S. Thomson 667.%A J. Bound 668.%A W. Stevens 669.%T Basic Socket Interface Extensions for IPv6 670.%R RFC 2553 671.%D March 1999 672.Re 673.Rs 674.%A W. Stevens 675.%A B. Fenner 676.%A A. Rudoff 677.%T UNIX Network Programming, third edition 678.Re 679.Sh STANDARDS 680Most of the socket options are defined in RFC 2292 or RFC 2553. 681The 682.Dv IPV6_V6ONLY 683socket option is defined in RFC 3542. 684The 685.Dv IPV6_PORTRANGE 686socket option and the conflict resolution rule are not defined in the 687RFCs and should be considered implementation dependent. 688