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