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