1 .\" This man page is Copyright (C) 2000 Andi Kleen <ak@muc.de>.
2 .\" Permission is granted to distribute possibly modified copies
3 .\" of this page provided the header is included verbatim,
4 .\" and in case of nontrivial modification author and date
5 .\" of the modification is added to the header.
6 .\" $Id: ipv6.7,v 1.4 2001/08/15 18:01:06 hanataka Exp $
8 .\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
9 .\" Translated Sun 18 Feb 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
10 .\" Updated Wed 4 Apr 2001 by Yuichi SATO <ysato@h4.dion.ne.jp>
11 .\" Updated Sat Dec 17 09:31:21 JST 2005 by Yuichi SATO <ysato444@yahoo.co.jp>
12 .\" Updated 2007-05-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.50
13 .\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
15 .\"WORD: flow identifier ¥Õ¥í¡¼»ØÄê»Ò
16 .\"WORD: control message À©¸æ¥á¥Ã¥»¡¼¥¸
17 .\"WORD: incoming ¡Á ¼õ¿® (¥Ñ¥±¥Ã¥È¡¢¥Ç¡¼¥¿¥°¥é¥à)
18 .\"WORD: outgoing ¡Á Á÷¿® (¥Ñ¥±¥Ã¥È¡¢¥Ç¡¼¥¿¥°¥é¥à)
19 .\"WORD: asynchronous error ÈóƱ´ü¥¨¥é¡¼
21 .TH IPV6 7 2009-02-28 "Linux" "Linux Programmer's Manual"
23 .\"O ipv6, AF_INET6 \- Linux IPv6 protocol implementation
25 ipv6, AF_INET6 \- Linux ¤Î IPv6 ¥×¥í¥È¥³¥ë¼ÂÁõ
28 .B #include <sys/socket.h>
30 .B #include <netinet/in.h>
32 .IB tcp6_socket " = socket(AF_INET6, SOCK_STREAM, 0);"
34 .IB raw6_socket " = socket(AF_INET6, SOCK_RAW, " protocol ");"
36 .IB udp6_socket " = socket(AF_INET6, SOCK_DGRAM, " protocol ");"
39 .\"O Linux 2.2 optionally implements the Internet Protocol, version 6.
40 .\"O This man page contains a description of the IPv6 basic API as
41 .\"O implemented by the Linux kernel and glibc 2.1.
43 .\"O is based on the BSD sockets interface; see
45 Linux 2.2 ¤Ç¤Ï¡¢Internet Protocol, version 6 ¤ò
46 ¥ª¥×¥·¥ç¥ó¤È¤·¤Æ¼ÂÁõ¤·¤Æ¤¤¤ë¡£
47 ¤³¤Î man ¥Ú¡¼¥¸¤Ç¤Ï¡¢Linux ¥«¡¼¥Í¥ë¤È glibc 2.1 ¤Ç¤Î¼ÂÁõ¤Ë´ð¤Å¤¤¤Æ¡¢
48 IPv6 ¤Î´ðËÜŪ¤Ê API ¤ò²òÀ⤹¤ë¡£
49 ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ï BSD ¥½¥±¥Ã¥È¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¤â¤È¤Ë¤·¤Æ¤¤¤ë¡£
53 .\"O The IPv6 API aims to be mostly compatible with the
56 .\"O Only differences are described in this man page.
60 »²¾È) ¤È¤Û¤Ü¸ß´¹¤Ë¤Ê¤ë¤³¤È¤òÌܻؤ·¤Æ¤¤¤ë¡£
61 ¤³¤Î man ¥Ú¡¼¥¸¤Ç¤ÏÁê°ãÅÀ¤Î¤ß¤ò²òÀ⤹¤ë¡£
65 .\"O socket to any process, the local address should be copied from the
67 .\"O variable which has
70 .\"O In static initializations,
71 .\"O .B IN6ADDR_ANY_INIT
72 .\"O may also be used, which expands to a constant expression.
73 .\"O Both of them are in network byte order.
75 ¥½¥±¥Ã¥È¤ò²¿¤é¤«¤Î¥×¥í¥»¥¹¤Ë¥Ð¥¤¥ó¥É¤¹¤ë¤Ë¤Ï¡¢
80 ¤«¤é¥³¥Ô¡¼¤·¤Æ¤¯¤ëɬÍפ¬¤¢¤ë¡£
83 ¤âÍѤ¤¤ë¤³¤È¤¬¤Ç¤¡¢¤³¤ì¤ÏÄê¿ô¼°¤ËŸ³«¤µ¤ì¤ë¡£
84 ¤³¤ì¤é¤Îξ¼Ô¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Ç¤¢¤ë¡£
86 .\"O The IPv6 loopback address (::1) is available in the global
87 .\"O .I in6addr_loopback
89 .\"O For initializations,
90 .\"O .B IN6ADDR_LOOPBACK_INIT
92 IPv6 ¤Î¥ë¡¼¥×¥Ð¥Ã¥¯¥¢¥É¥ì¥¹ (::1) ¤Ï global ÊÑ¿ô
94 ¤«¤é¼èÆÀ¤Ç¤¤ë¡£½é´ü²½¤Ë¤Ï
95 .B IN6ADDR_LOOPBACK_INIT
98 .\"O IPv4 connections can be handled with the v6 API by using the
99 .\"O v4-mapped-on-v6 address type;
100 .\"O thus a program only needs to support this API type to
101 .\"O support both protocols.
102 .\"O This is handled transparently by the address
103 .\"O handling functions in the C library.
104 v4-mapped-on-v6 ¥¢¥É¥ì¥¹·¿¤òÍѤ¤¤ë¤³¤È¤Ç¡¢
105 IPv4 Àܳ¤â v6 API ¤Ç°·¤¦¤³¤È¤¬¤Ç¤¤ë¡£
106 ¤³¤¦¤¹¤ì¤Ð¡¢¥×¥í¥°¥é¥à¤Ï v6 ¤Î API ¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤À¤±¤Ç¡¢
107 ξÊý¤Î¥×¥í¥È¥³¥ë¤ò¥µ¥Ý¡¼¥È¤Ç¤¤ë¡£
108 v4-mapped-on-v6 ¥¢¥É¥ì¥¹·¿¤Ï C ¥é¥¤¥Ö¥é¥êÆâÉô¤Î¥¢¥É¥ì¥¹¤ò
109 °·¤¦´Ø¿ô¤Ë¤è¤Ã¤ÆÆ©²áŪ¤Ë½èÍý¤µ¤ì¤ë¡£
111 .\"O IPv4 and IPv6 share the local port space.
112 .\"O When you get an IPv4 connection
113 .\"O or packet to a IPv6 socket, its source address will be mapped
114 .\"O to v6 and it will be mapped to v6.
115 IPv4 ¤È IPv6 ¤Ï¥í¡¼¥«¥ë¥Ý¡¼¥È¶õ´Ö¤ò¶¦Í¤¹¤ë¡£
116 IPv4 ¤ÎÀܳ (¤Þ¤¿¤Ï¥Ñ¥±¥Ã¥È) ¤ò IPv6 ¥½¥±¥Ã¥È¤¬¼èÆÀ¤¹¤ë¤È¡¢
117 ȯ¿®¸µ¥¢¥É¥ì¥¹¤¬ v6 ¤Ë¥Þ¥Ã¥×¤µ¤ì¡¢¤½¤ÎÀܳ (¥Ñ¥±¥Ã¥È) ¤â v6 ¤Ë¥Þ¥Ã¥×¤µ¤ì¤ë¡£
118 .\"nakano: ºÇ¸å¤Î it ¤¬¤Ê¤Ë¤ò»Ø¤¹¤Î¤«¤ï¤«¤é¤ó¡£
120 .\"O .SS Address Format
121 .SS ¥¢¥É¥ì¥¹¤Î¥Õ¥©¡¼¥Þ¥Ã¥È
124 struct sockaddr_in6 {
125 sa_family_t sin6_family; /* AF_INET6 */
126 in_port_t sin6_port; /* port number */
127 uint32_t sin6_flowinfo; /* IPv6 flow information */
128 struct in6_addr sin6_addr; /* IPv6 address */
129 uint32_t sin6_scope_id; /* Scope ID (new in 2.4) */
133 unsigned char s6_addr[16]; /* IPv6 address */
139 .\"O is always set to
142 .\"O is the protocol port (see
146 .\"O .I sin6_flowinfo
147 .\"O is the IPv6 flow identifier;
149 .\"O is the 128bit IPv6 address.
150 .\"O .I sin6_scope_id
151 .\"O is an ID depending on the scope of the address.
152 .\"O It is new in Linux 2.4.
153 .\"O Linux only supports it for link scope addresses, in that case
154 .\"O .I sin6_scope_id
155 .\"O contains the interface index (see
156 .\"O .BR netdevice (7))
162 ¤Ï¥×¥í¥È¥³¥ë¥Ý¡¼¥È¤Ç¤¢¤ë
168 ¤Ï IPv6 ¤Î¥Õ¥í¡¼»ØÄê»Ò (flow identifier) ¤Ç¤¢¤ë¡£
170 ¤Ï 128 ¥Ó¥Ã¥È¤Î IPv6 ¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
172 ¤Ï¥¢¥É¥ì¥¹¤Î¥¹¥³¡¼¥×¤Ë°Í¸¤·¤¿ ID ¤Ç¤¢¤ë
173 (¤³¤ì¤Ï Linux 2.4 ¤ÇƳÆþ¤µ¤ì¤¿)¡£
174 Linux ¤Î¾ì¹ç¤Ï¡¢¤³¤ì¤Ï¥ê¥ó¥¯¥¹¥³¡¼¥×¥¢¥É¥ì¥¹¤Ç¤·¤«¥µ¥Ý¡¼¥È¤µ¤ì¤Ê¤¤¡£
177 ¤Ë¤Ï¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬´Þ¤Þ¤ì¤ë¤³¤È¤Ë¤Ê¤ë
181 .\"O IPv6 supports several address types: unicast to address a single
182 .\"O host, multicast to address a group of hosts,
183 .\"O anycast to address the nearest member of a group of hosts
184 .\"O (not implemented in Linux), IPv4-on-IPv6 to
185 .\"O address a IPv4 host, and other reserved address types.
186 IPv6 ¤Ï²¿¼ïÎफ¤Î¥¢¥É¥ì¥¹¥¿¥¤¥×¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£
187 ñ°ì¤Î¥Û¥¹¥È¤ò¥¢¥É¥ì¥¹¤¹¤ë¤¿¤á¤Î unicast¡¢
188 ¥Û¥¹¥È¤Î¥°¥ë¡¼¥×¤ò¥¢¥É¥ì¥¹¤¹¤ë¤¿¤á¤Î multicast¡¢
189 ¥Û¥¹¥È¤Î¥°¥ë¡¼¥×Ãæ¤ÇºÇ¤â¶á¤¯¤Ë¤¤¤ë¤â¤Î¤ò¥¢¥É¥ì¥¹¤¹¤ë¤¿¤á¤Î anycast
190 (¤³¤ì¤Ï Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)¡¢
191 IPv4 ¥Û¥¹¥È¤ò¥¢¥É¥ì¥¹¤¹¤ë¤¿¤á¤Î IPv4-on-IPv6¡£
192 ¾¤Ë¤âͽÌóºÑ¤ß¤Î¥¢¥É¥ì¥¹¥¿¥¤¥×¤¬¤¢¤ë¡£
194 .\"O The address notation for IPv6 is a group of 16 2-digit hexadecimal
195 .\"O numbers, separated with a \(aq:\(aq.
196 .\"O \&"::" stands for a string of 0 bits.
197 .\"O Special addresses are ::1 for loopback and ::FFFF:<IPv4 address>
198 .\"O for IPv4-mapped-on-IPv6.
199 IPv6 ¤Ç¤Î¥¢¥É¥ì¥¹É½µ¤Ï 2 ·å¤Î 16 ¿Ê¿ô 16 ¸Ä¤«¤é¤Ê¤ê¡¢
200 \(aq:\(aq ¤Ï¶èÀÚ¤êʸ»ú¤Ï¤Ç¡¢"::" ¤Ï 0 ¥Ó¥Ã¥È¤Îʸ»úÎó¤òɽ¤¹¡£
201 Æüì¤Ê¥¢¥É¥ì¥¹¤È¤·¤Æ¡¢¥ë¡¼¥×¥Ð¥Ã¥¯¤òɽ¤¹ ::1¡¢
202 IPv4-mapped-on-IPv6 ¤òɽ¤¹ ::FFFF::<IPv4 ¥¢¥É¥ì¥¹> ¤¬¤¢¤ë¡£
204 .\"O The port space of IPv6 is shared with IPv4.
205 IPv6 ¤Î¥Ý¡¼¥È¶õ´Ö¤Ï IPv4 ¤È¶¦Í¤µ¤ì¤Æ¤¤¤ë¡£
206 .\"O .SS "Socket Options"
207 .SS ¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó
208 .\"O IPv6 supports some protocol-specific socket options that can be set with
209 .\"O .BR setsockopt (2)
211 .\"O .BR getsockopt (2).
212 .\"O The socket option level for IPv6 is
213 .\"O .BR IPPROTO_IPV6 .
214 .\"O A boolean integer flag is zero when it is false, otherwise true.
215 IPv6 ¤Ï¥×¥í¥È¥³¥ë¸ÇͤΥ½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤ò¤¤¤¯¤Ä¤«¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£
221 IPv6 ¤Î¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¥ì¥Ù¥ë¤Ï
224 ¥Ö¡¼¥ëÀ°¿ô¤Î¥Õ¥é¥°¤Ï¡¢0 ¤¬µ¶¤Ç¤¢¤ê¡¢¤½¤ì°Ê³°¤Ï¿¿¤Ç¤¢¤ë¡£
229 .\"O socket into a socket of a different address family.
232 .\"O is currently supported for that.
233 .\"O It is only allowed for IPv6 sockets
234 .\"O that are connected and bound to a v4-mapped-on-v6 address.
235 .\"O The argument is a pointer to an integer containing
237 .\"O This is useful to pass v4-mapped sockets as file descriptors to
238 .\"O programs that don't know how to deal with the IPv6 API.
240 ¥½¥±¥Ã¥È¤òÊ̤Υ¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¡¼¤Î¥½¥±¥Ã¥È¤ËÊѤ¨¤ë¡£
243 ¤Î¤ß¤¬Êѹ¹Àè¤Î¥¢¥É¥ì¥¹¥Õ¥¡¥ß¥ê¡¼¤È¤·¤Æ¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
244 ¤³¤ì¤¬µö²Ä¤µ¤ì¤ë¤Î¤Ï¡¢IPv6 ¤¬Àܳ¤µ¤ì¡¢
245 v4-mapped-on-v6 ¥¢¥É¥ì¥¹¤Ë¥Ð¥¤¥ó¥É¤µ¤ì¤¿¾ì¹ç¤Ë¸Â¤é¤ì¤ë¡£
248 ¤¬Æþ¤Ã¤Æ¤¤¤ëÀ°¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
249 v4-mapped ¥½¥±¥Ã¥È¤ò¡¢IPv6 API ¤ò°·¤¨¤Ê¤¤¥×¥í¥°¥é¥à¤ËÂФ·¤Æ
250 ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¼¤È¤·¤ÆÅϤ¹¾ì¹ç¤ËÊØÍø¡£
252 .B IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP
253 .\"O Control membership in multicast groups.
254 .\"O Argument is a pointer to a
255 .\"O .I struct ipv6_mreq
257 multicast ¥°¥ë¡¼¥×¤Î¥á¥ó¥Ð¡¼¤òÀ©¸æ¤¹¤ë¡£
261 .\"O .\" FIXME IPV6_CHECKSUM is not documented, and probably should be
262 .\"O .\" FIXME IPV6_JOIN_ANYCAST is not documented, and probably should be
263 .\"O .\" FIXME IPV6_LEAVE_ANYCAST is not documented, and probably should be
264 .\" FIXME IPV6_CHECKSUM ¤Ïµ½Ò¤µ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢µ½Ò¤¹¤Ù¤¤À¤í¤¦¡£
265 .\" FIXME IPV6_JOIN_ANYCAST ¤Ïµ½Ò¤µ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢µ½Ò¤¹¤Ù¤¤À¤í¤¦¡£
266 .\" FIXME IPV6_LEAVE_ANYCAST ¤Ïµ½Ò¤µ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢µ½Ò¤¹¤Ù¤¤À¤í¤¦¡£
267 .\"O .\" FIXME IPV6_RECVPKTINFO is not documented, and probably should be
268 .\"O .\" FIXME IPV6_2292PKTINFO is not documented, and probably should be
269 .\"O .\" FIXME there are probably many other IPV6_* socket options that
270 .\"O .\" should be documented
271 .\" FIXME IPV6_RECVPKTINFO ¤Ïµ½Ò¤µ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢µ½Ò¤¹¤Ù¤¤À¤í¤¦¡£
272 .\" FIXME IPV6_2292PKTINFO ¤Ïµ½Ò¤µ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢µ½Ò¤¹¤Ù¤¤À¤í¤¦¡£
273 .\" FIXME ¾¤Ë¤â¿¤¯¤Îµ½Ò¤¹¤Ù¤ IPV6_* ¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤¬¤¢¤ë¤À¤í¤¦¡£
276 .\"O Set the MTU to be used for the socket.
277 .\"O The MTU is limited by the device
278 .\"O MTU or the path mtu when path mtu discovery is enabled.
279 .\"O Argument is a pointer to integer.
280 ¤½¤Î¥½¥±¥Ã¥È¤ËÂФ·¤ÆÍѤ¤¤ë MTU ¤ÎÃͤòÀßÄꤹ¤ë¡£
282 ¤½¤Î¥Ç¥Ð¥¤¥¹¤Î MTU ¤Þ¤¿¤Ï (Path MTU Discovery
283 ¤¬²Äǽ¤Ê¤é) ¤½¤Î·ÐÏ©¤Î MTU ¤ÎÂ礤µ°Ê²¼¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
284 °ú¤¿ô¤ÏÀ°¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¡£
287 .\"O Control path mtu discovery on the socket.
289 .\"O .B IP_MTU_DISCOVER
293 ¤½¤Î¥½¥±¥Ã¥È¤Ç¤Î Path MTU Discovery ¤òÀ©¸æ¤¹¤ë¡£
300 .B IPV6_MULTICAST_HOPS
301 .\"O Set the multicast hop limit for the socket.
302 .\"O Argument is a pointer to an
304 .\"O \-1 in the value means use the route default, otherwise it should be
305 .\"O between 0 and 255.
306 ¤½¤Î¥½¥±¥Ã¥È¤Ç¤Î multicast ¤Î hop ¿ô¤Î¾å¸ÂÃͤòÀßÄꤹ¤ë¡£
307 °ú¤¿ô¤ÏÀ°¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
308 \-1 ¤ò»ØÄꤹ¤ë¤È·ÐÏ©¤Î¥Ç¥Õ¥©¥ë¥È¤òÍѤ¤¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
309 ¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï 0 ¤«¤é 255 ¤ÎÈϰϤò»ØÄꤹ¤ë¡£
312 .\"O Set the device for outgoing multicast packets on the socket.
313 .\"O This is only allowed
319 .\"O The argument is a pointer to an interface index (see
320 .\"O .BR netdevice (7))
322 ¤½¤Î¥½¥±¥Ã¥È¤Ç¤Î¡¢Á÷¿® multicast ¥Ñ¥±¥Ã¥È¤ËÍѤ¤¤ë¥Ç¥Ð¥¤¥¹¤òÀßÄꤹ¤ë¡£
327 ³Æ¥½¥±¥Ã¥È¤Ç¤Î¤ßµö¤µ¤ì¤ë¡£
328 °ú¤¿ô¤Ï¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÎÀ°¿ôÃÍ
330 ¤ò»²¾È) ¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
332 .B IPV6_MULTICAST_LOOP
333 .\"O Control whether the socket sees multicast packets that it has send itself.
334 .\"O Argument is a pointer to boolean.
335 ¥½¥±¥Ã¥È¤¬¡¢¼«Ê¬¼«¿È¤ÎÁ÷¿®¤·¤¿
336 multicast ¥Ñ¥±¥Ã¥È¤ò´Æ»ë¤¹¤ë¤«¤É¤¦¤«¤òÀ©¸æ¤¹¤ë¡£
337 °ú¤¿ô¤Ï¥Ö¡¼¥ëÃͤؤΥݥ¤¥ó¥¿¡£
340 .\"O Set delivery of the
342 .\"O control message on incoming datagrams.
343 .\"O Only allowed for
348 .\"O Argument is a pointer to a boolean value in an integer.
349 ¥Ç¡¼¥¿¥°¥é¥à¤ÎÅþÃå»þ¤Ë¤ª¤±¤ë
351 À©¸æ¥á¥Ã¥»¡¼¥¸¤òÇÛÁ÷¤¹¤ë¤«¤É¤¦¤«¤òÀßÄꤹ¤ë¡£
355 ¥½¥±¥Ã¥È¤ËÂФ·¤Æ¤Î¤ßµö²Ä¤µ¤ì¤ë¡£
356 °ú¤¿ô¤Ï¥Ö¡¼¥ëÃͤÎÆþ¤Ã¤¿À°¿ô¡£
359 .B IPV6_RTHDR, IPV6_AUTHHDR, IPV6_DSTOPS, IPV6_HOPOPTS, IPV6_FLOWINFO, IPV6_HOPLIMIT
361 .\"O Set delivery of control messages for incoming datagrams containing
362 .\"O extension headers from the received packet.
363 ¼õ¿®¥Ñ¥±¥Ã¥È¤Î¥Ç¡¼¥¿¥°¥é¥à¤Ë³ÈÄ¥¥Ø¥Ã¥À¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¤Î¡¢
364 À©¸æ¥á¥Ã¥»¡¼¥¸¤ÎÇÛÁ÷¤òÀßÄꤹ¤ë¡£
366 .\"O delivers the routing header,
368 routing ¥Ø¥Ã¥À¤òÇÛÁ÷¤¹¤ë¤«¤É¤¦¤«¡£
370 .\"O delivers the authentication header,
372 authentication ¥Ø¥Ã¥À¤òÇÛÁ÷¤¹¤ë¤«¤É¤¦¤«¡£
374 .\"O delivers the destination options,
376 destination ¥ª¥×¥·¥ç¥ó¤òÇÛÁ÷¤¹¤ë¤«¤É¤¦¤«¡£
378 .\"O delivers the hop options,
380 hop ¥ª¥×¥·¥ç¥ó¤òÇÛÁ÷¤¹¤ë¤«¤É¤¦¤«¡£
381 .\"O .B IPV6_FLOWINFO
382 .\"O delivers an integer containing the flow ID,
384 flow ID ¤ò´Þ¤àÀ°¿ô¤òÇÛÁ÷¤¹¤ë¤«¤É¤¦¤«¡£
385 .\"O .B IPV6_HOPLIMIT
386 .\"O delivers an integer containing the hop count of the packet.
388 ¥Ñ¥±¥Ã¥È¤Î hop ¥«¥¦¥ó¥È¤ò´Þ¤àÀ°¿ô¤òÇÛÁ÷¤¹¤ë¤«¤É¤¦¤«¡£
389 .\"O The control messages have the same type as the socket option.
390 .\"O All these header options can also be set for outgoing packets
391 .\"O by putting the appropriate control message into the control buffer of
392 .\"O .BR sendmsg (2).
393 .\"O Only allowed for
398 .\"O Argument is a pointer to a boolean value.
399 À©¸æ¥á¥Ã¥»¡¼¥¸¤Ï¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤Î¤â¤Î¤ÈƱ¤¸¥¿¥¤¥×¤ò»ý¤Ä¡£
400 ¤³¤ì¤é¤Î¤¹¤Ù¤Æ¤Î¥Ø¥Ã¥À¥ª¥×¥·¥ç¥ó¤Ï¡¢
401 ŬÀÚ¤ÊÀ©¸æ¥á¥Ã¥»¡¼¥¸¤ò
403 ¤ÎÀ©¸æ¥Ð¥Ã¥Õ¥¡¡¼¤Ë½ñ¤¤³¤á¤Ð¡¢
404 Á÷¿®¥Ñ¥±¥Ã¥È¤Ë¤Ç¤âÀßÄê¤Ç¤¤ë¡£
408 ¥½¥±¥Ã¥È¤Ç¤Î¤ßµö¤µ¤ì¤ë¡£°ú¤¿ô¤Ï¥Ö¡¼¥ëÃͤؤΥݥ¤¥ó¥¿¡£
411 .\"O Control receiving of asynchronous error options.
417 .\"O Argument is a pointer to boolean.
418 ÈóƱ´ü¥¨¥é¡¼ (asynchronous error) ¥ª¥×¥·¥ç¥ó¤Î¼õ¿®¤òÀ©¸æ¤¹¤ë¡£
424 °ú¤¿ô¤Ï¥Ö¡¼¥ëÃͤؤΥݥ¤¥ó¥¿¡£
427 .\"O Pass forwarded packets containing a router alert hop-by-hop option to
429 .\"O Only allowed for SOCK_RAW sockets.
430 .\"O The tapped packets are not forwarded by the kernel, it is the
431 .\"O user's responsibility to send them out again.
432 ¤³¤Î¥½¥±¥Ã¥È¤Ç¡¢router alert hop-by-hop ¥ª¥×¥·¥ç¥ó¤ÎÉÕ¤¤¤¿Å¾Á÷¥Ñ¥±¥Ã¥È¤ò
433 Ä̤¹¤«¤É¤¦¤«¤òÀ©¸æ¤¹¤ë¡£
435 ¥½¥±¥Ã¥È¤Ç¤Î¤ßµö²Ä¤µ¤ì¤ë¡£
436 tap ¤µ¤ì¤¿¥Ñ¥±¥Ã¥È¤Ï¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤Æ¤ÏžÁ÷¤µ¤ì¤Ê¤¤¡£¤½¤¦¤·¤¿¥Ñ¥±¥Ã¥È¤ò
437 ºÆÅÙÁ÷¿®¤¹¤ë¤Î¤Ï¥æ¡¼¥¶¡¼¤ÎÀÕǤ¤Ç¤¢¤ë¡£
438 .\"O Argument is a pointer to an integer.
439 .\"O A positive integer indicates a router alert option value to intercept.
440 .\"O Packets carrying a router alert option with a value field containing
441 .\"O this integer will be delivered to the socket.
442 .\"O A negative integer disables delivery of packets with router alert options
444 °ú¤¿ô¤ÏÀ°¿ô (integer) ¤Ø¤Î¥Ý¥¤¥ó¥¿¡£
445 Àµ¤ÎÀ°¿ô¤Ï˵¼õ¤ò¹Ô¤¦ router alert ¥ª¥×¥·¥ç¥óÃͤò¼¨¤¹¡£
446 ¥ª¥×¥·¥ç¥óÃͤ¬¤³¤ÎÀ°¿ô¤Ç¤¢¤ë router alert ¥ª¥×¥·¥ç¥ó¤ÎÉÕ¤¤¤¿¥Ñ¥±¥Ã¥È¤Ï
447 ¥½¥±¥Ã¥È¤ËÇÛÁ÷¤µ¤ì¤ë¡£Éé¤ÎÀ°¿ô¤ò»ØÄꤹ¤ë¤È¡¢¤³¤Î¥½¥±¥Ã¥È¤Ø¤Î
448 router alert ¥ª¥×¥·¥ç¥ó¤ÎÉÕ¤¤¤¿¥Ñ¥±¥Ã¥È¤ÎÇÛÁ÷¤¬¹Ô¤ï¤ì¤Ê¤¤¡£
449 .\" FLOWLABEL_MGR, FLOWINFO_SEND
452 .\"O Set the unicast hop limit for the socket.
453 .\"O Argument is a pointer to an integer.
454 .\"O \-1 in the value means use the route default,
455 .\"O otherwise it should be between 0 and 255.
456 ¤½¤Î¥½¥±¥Ã¥È¤Ç¤Î unicast ¤Î hop ¿ô¤Î¾å¸ÂÃͤòÀßÄꤹ¤ë¡£
457 °ú¤¿ô¤ÏÀ°¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
458 \-1 ¤ò»ØÄꤹ¤ë¤È·ÐÏ©¤Î¥Ç¥Õ¥©¥ë¥È¤òÍѤ¤¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
459 ¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï 0 ¤«¤é 255 ¤ÎÈϰϤò»ØÄꤹ¤ë¡£
461 .\"O .BR IPV6_V6ONLY " (since Linux 2.4.21 and 2.6)"
462 .BR IPV6_V6ONLY " (Linux 2.4.21 °Ê¹ß¤ª¤è¤Ó 2.6 °Ê¹ß)"
464 .\"O If this flag is set to true (nonzero), then the socket is restricted
465 .\"O to sending and receiving IPv6 packets only.
466 .\"O In this case, an IPv4 and an IPv6 application can bind
467 .\"O to a single port at the same time.
468 ¤³¤Î¥Õ¥é¥°¤ò¿¿ (0 °Ê³°) ¤ËÀßÄꤹ¤ë¤È¡¢¤½¤Î¥½¥±¥Ã¥È¤Ï IPv6 ¥Ñ¥±¥Ã¥È¤À¤±¤ò
469 Á÷¼õ¿®¤¹¤ë¤è¤¦¤ËÀ©¸Â¤µ¤ì¤ë¡£
470 ¤³¤Î¾ì¹ç¡¢IPv4 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È IPv6 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬Æ±»þ¤Ë
471 °ì¤Ä¤Î¥Ý¡¼¥È¤ò¥Ð¥¤¥ó¥É¤Ç¤¤ë¡£
473 .\"O If this flag is set to false (zero),
474 .\"O then the socket can be used to send and receive packets
475 .\"O to and from an IPv6 address or an IPv4-mapped IPv6 address.
476 ¤³¤Î¥Õ¥é¥°¤òµ¶ (0) ¤ËÀßÄꤹ¤ë¤È¡¢¤½¤Î¥½¥±¥Ã¥È¤Ï¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤Ë
477 IPv6 ¥¢¥É¥ì¥¹¤È IPv4-mapped IPv6 ¥¢¥É¥ì¥¹¤ÎξÊý¤ò»ÈÍѤǤ¤ë¡£
479 .\"O The argument is a pointer to a boolean value in an integer.
480 °ú¤¿ô¤Ï¥Ö¡¼¥ëÃͤÎÆþ¤Ã¤¿À°¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£
482 .\"O The default value for this flag is defined by the contents of the file
483 .\"O .IR /proc/sys/net/ipv6/bindv6only .
484 .\"O The default value for that file is 0 (false).
485 ¤³¤Î¥Õ¥é¥°¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤϥե¡¥¤¥ë
486 .I /proc/sys/net/ipv6/bindv6only
487 ¤ÎÆâÍƤˤè¤êÄêµÁ¤µ¤ì¤ë¡£
488 ¤³¤Î¥Õ¥¡¥¤¥ë¤Î¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï 0 (µ¶) ¤Ç¤¢¤ë¡£
493 .\"O libc5 based IPv6 API implementation for Linux is not described here
494 .\"O and may vary in details.
495 IPv6 API ¤ò libc5 ¥Ù¡¼¥¹¤Ç Linux ¸þ¤±¤Ë¼ÂÁõ¤·¤¿¡¢°ÊÁ°¤Î
497 ¤Ë¤Ä¤¤¤Æ¤Ï¤³¤³¤Ç¤Ïµ½Ò¤·¤Æ¤¤¤Ê¤¤¡£
498 ¤ª¤½¤é¤¯ºÙ¤«¤¤¤È¤³¤í¤Ë¤ÏÁê°ãÅÀ¤¬¤¢¤ë¤À¤í¤¦¡£
500 .\"O Linux 2.4 will break binary compatibility for the
503 .\"O hosts by changing the alignment of
505 .\"O and adding an additional
506 .\"O .I sin6_scope_id
508 .\"O The kernel interfaces stay compatible, but a program including
512 .\"O into other structures may not be.
514 .\"O a problem for 32bit hosts like i386.
515 Linux 2.4 ¤Ç¤Ï 64 ¥Ó¥Ã¥È¤Î¥Û¥¹¥È¤ËÂФ·¤Æ
517 ¤Î¥Ð¥¤¥Ê¥ê¸ß´¹À¤¬Êݤ¿¤ì¤Æ¤¤¤Ê¤¤¡£
519 ¤Î¥¢¥é¥¤¥ó¥á¥ó¥È¤¬Êѹ¹¤µ¤ì¡¢¤Þ¤¿
521 ¥Õ¥£¡¼¥ë¥É¤¬¿·¤¿¤ËÄɲ䵤줿¤«¤é¤Ç¤¢¤ë¡£
522 ¥«¡¼¥Í¥ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¸ß´¹À¤ÏÊݤ¿¤ì¤Æ¤¤¤ë¤¬¡¢
526 ¤ò¾¤Î¹½Â¤ÂΤ˴ޤó¤Ç¤¤¤ë¤è¤¦¤Ê¥×¥í¥°¥é¥à¤Ç¤Ï
527 Êݤ¿¤ì¤Ê¤¤¤«¤â¤·¤ì¤Ê¤¤¡£
528 ¤³¤ì¤Ï i386 ¤Î¤è¤¦¤Ê 32 ¥Ó¥Ã¥È¤Î¥Û¥¹¥È¤Ç¤ÏÌäÂê¤Ë¤Ê¤é¤Ê¤¤¡£
531 .\"O .I sin6_flowinfo
532 .\"O field is new in Linux 2.4.
533 .\"O It is transparently passed/read by the kernel
534 .\"O when the passed address length contains it.
535 .\"O Some programs that pass a longer address buffer and then
536 .\"O check the outgoing address length may break.
538 ¥Õ¥£¡¼¥ë¥É¤Ï Linux 2.4 ¤ÇÅо줷¤¿¡£
539 ¤³¤ì¤¬ÅϤµ¤ì¤¿¥¢¥É¥ì¥¹Ä¹¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¤È¡¢
540 ¥«¡¼¥Í¥ë¤ËÆ©²áŪ¤ËÅϤµ¤ì¡¢Æɤޤì¤ë¡£
541 .\"nakano ¤³¤³¤ï¤«¤é¤Ê¤¤¤Ç¤¹...
542 ¤è¤êŤ¤¥¢¥É¥ì¥¹¥Ð¥Ã¥Õ¥¡¤òÅϤ·¡¢
543 ¤½¤·¤ÆÁ÷¿®¥¢¥É¥ì¥¹¤ÎŤµ¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤è¤¦¤Ê¥×¥í¥°¥é¥à¤Ï
544 ¤¦¤Þ¤¯Æ°¤«¤Ê¤¤¤«¤â¤·¤ì¤Ê¤¤¡£
549 .\"O structure is bigger than the generic
551 .\"O Programs that assume that all address types can be stored safely in a
552 .\"O .I struct sockaddr
553 .\"O need to be changed to use
554 .\"O .I struct sockaddr_storage
555 .\"O for that instead.
557 ¹½Â¤ÂΤϥ¸¥§¥Í¥ê¥Ã¥¯¤Ê
560 ¤¹¤Ù¤Æ¤Î¥¢¥É¥ì¥¹¥¿¥¤¥×¤¬
562 ¤ÎÃæ¤Ë°ÂÁ´¤ËǼ¤á¤é¤ì¤ë¤È²¾Äꤷ¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤Ï¡¢Âå¤ï¤ê¤Ë
563 .I struct sockaddr_storage
564 ¤òÍѤ¤¤ë¤è¤¦¤ËÊѹ¹¤¹¤ëɬÍפ¬¤¢¤ë¡£
567 .\"O The IPv6 extended API as in RFC\ 2292 is currently only partly
569 .\"O although the 2.2 kernel has near complete support for receiving options,
570 .\"O the macros for generating IPv6 options are missing in glibc 2.1.
571 IPv6 ³ÈÄ¥ API ¤Ï¡¢¸½ºß¤Þ¤À RFC\ 2292 ¤ò´°Á´¤Ë¤Ï¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¡£
572 2.2 ¥«¡¼¥Í¥ë¤Ï¼õ¿®¥ª¥×¥·¥ç¥ó¤ò¤Û¤Ü´°Á´¤Ë¥µ¥Ý¡¼¥È¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¤¬¡¢
573 glibc2.1 ¤Ë¤Ï IPv6 ¥ª¥×¥·¥ç¥ó¤òÀ¸À®¤¹¤ë¥Þ¥¯¥í¤¬Â¸ºß¤·¤Æ¤¤¤Ê¤¤¡£
575 .\"O IPSec support for EH and AH headers is missing.
576 EH ¤ª¤è¤Ó AH ¥Ø¥Ã¥À ¤Ç¤Î IPSec ¤Î¥µ¥Ý¡¼¥È¤Ï¸ºß¤·¤Ê¤¤¡£
578 .\"O Flow label management is not complete and not documented here.
579 ¥Õ¥í¡¼¥é¥Ù¥ë´ÉÍý¤Ï¤Þ¤À´°Á´¤Ç¤Ê¤¯¡¢¤³¤³¤Ë¤âµ½Ò¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
581 .\"O This man page is not complete.
582 ¤³¤Î man ¥Ú¡¼¥¸¤Ï¤Þ¤À´°À®¤·¤Æ¤¤¤Ê¤¤¡£
588 RFC\ 2553: IPv6 BASIC API.
589 .\"O Linux tries to be compliant to this.
590 Linux ¤Ï¤³¤Î RFC ¤Ë½àµò¤¹¤ë¤è¤¦¤Ë¤·¤Æ¤¤¤ë¡£
592 RFC\ 2460: IPv6 specification.