1 | /*
|
---|
2 | * TINET (TCP/IP Protocol Stack)
|
---|
3 | *
|
---|
4 | * Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
|
---|
5 | * Tomakomai National College of Technology, JAPAN
|
---|
6 | *
|
---|
7 | * ä¸è¨èä½æ¨©è
|
---|
8 | ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation
|
---|
9 | * ã«ãã£ã¦å
|
---|
10 | ¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
|
---|
11 | * è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
|
---|
12 | * ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹å¤ã»åé
|
---|
13 | å¸ï¼ä»¥ä¸ï¼
|
---|
14 | * å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
15 | * (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
16 | * 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
17 | * ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
18 | * (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
19 | * ç¨ã§ããå½¢ã§åé
|
---|
20 | å¸ããå ´åã«ã¯ï¼åé
|
---|
21 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
22 | * è
|
---|
23 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
24 | * ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
25 | * (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
26 | * ç¨ã§ããªãå½¢ã§åé
|
---|
27 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
|
---|
28 | * (a) åé
|
---|
29 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
30 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
31 | * ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
32 | * (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
33 | * 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
34 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
35 | 責ãããã¨ï¼
|
---|
36 | *
|
---|
37 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
38 | ã
|
---|
39 | * ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
|
---|
40 | * å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
|
---|
41 | * æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
|
---|
42 | *
|
---|
43 | * @(#) $Id: in6.h 270 2017-02-09 04:03:47Z coas-nagasima $
|
---|
44 | */
|
---|
45 |
|
---|
46 | /* $FreeBSD: src/sys/netinet6/in6.h,v 1.7.2.4 2001/07/04 09:45:23 ume Exp $ */
|
---|
47 | /* $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ */
|
---|
48 |
|
---|
49 | /*
|
---|
50 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
---|
51 | * All rights reserved.
|
---|
52 | *
|
---|
53 | * Redistribution and use in source and binary forms, with or without
|
---|
54 | * modification, are permitted provided that the following conditions
|
---|
55 | * are met:
|
---|
56 | * 1. Redistributions of source code must retain the above copyright
|
---|
57 | * notice, this list of conditions and the following disclaimer.
|
---|
58 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
59 | * notice, this list of conditions and the following disclaimer in the
|
---|
60 | * documentation and/or other materials provided with the distribution.
|
---|
61 | * 3. Neither the name of the project nor the names of its contributors
|
---|
62 | * may be used to endorse or promote products derived from this software
|
---|
63 | * without specific prior written permission.
|
---|
64 | *
|
---|
65 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
---|
66 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
---|
67 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
---|
68 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
---|
69 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
---|
70 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
---|
71 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
72 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
73 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
---|
74 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
75 | * SUCH DAMAGE.
|
---|
76 | */
|
---|
77 |
|
---|
78 | /*
|
---|
79 | * Copyright (c) 1982, 1986, 1990, 1993
|
---|
80 | * The Regents of the University of California. All rights reserved.
|
---|
81 | *
|
---|
82 | * Redistribution and use in source and binary forms, with or without
|
---|
83 | * modification, are permitted provided that the following conditions
|
---|
84 | * are met:
|
---|
85 | * 1. Redistributions of source code must retain the above copyright
|
---|
86 | * notice, this list of conditions and the following disclaimer.
|
---|
87 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
88 | * notice, this list of conditions and the following disclaimer in the
|
---|
89 | * documentation and/or other materials provided with the distribution.
|
---|
90 | * 3. All advertising materials mentioning features or use of this software
|
---|
91 | * must display the following acknowledgement:
|
---|
92 | * This product includes software developed by the University of
|
---|
93 | * California, Berkeley and its contributors.
|
---|
94 | * 4. Neither the name of the University nor the names of its contributors
|
---|
95 | * may be used to endorse or promote products derived from this software
|
---|
96 | * without specific prior written permission.
|
---|
97 | *
|
---|
98 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
---|
99 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
---|
100 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
---|
101 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
---|
102 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
---|
103 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
---|
104 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
105 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
106 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
---|
107 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
108 | * SUCH DAMAGE.
|
---|
109 | *
|
---|
110 | * @(#)in.h 8.3 (Berkeley) 1/3/94
|
---|
111 | */
|
---|
112 |
|
---|
113 | #ifndef _IN6_H_
|
---|
114 | #define _IN6_H_
|
---|
115 |
|
---|
116 | /*
|
---|
117 | * IPv6 ã¢ãã¬ã¹
|
---|
118 | */
|
---|
119 |
|
---|
120 | struct t_in6_addr {
|
---|
121 | union {
|
---|
122 | uint8_t __u6_addr8[16];
|
---|
123 | uint16_t __u6_addr16[8];
|
---|
124 | uint32_t __u6_addr32[4];
|
---|
125 | } __u6_addr;
|
---|
126 | };
|
---|
127 |
|
---|
128 | #define s6_addr __u6_addr.__u6_addr8
|
---|
129 | #define s6_addr8 __u6_addr.__u6_addr8
|
---|
130 | #define s6_addr16 __u6_addr.__u6_addr16
|
---|
131 | #define s6_addr32 __u6_addr.__u6_addr32
|
---|
132 |
|
---|
133 | #ifndef T_IN6_ADDR_DEFINED
|
---|
134 |
|
---|
135 | typedef struct t_in6_addr T_IN6_ADDR;
|
---|
136 |
|
---|
137 | #define T_IN6_ADDR_DEFINED
|
---|
138 |
|
---|
139 | #endif /* of #ifndef T_IN6_ADDR_DEFINED */
|
---|
140 |
|
---|
141 | /*
|
---|
142 | * IPv6 ã¢ãã¬ã¹ã®åæåãã¼ã¿
|
---|
143 | */
|
---|
144 |
|
---|
145 | #define IPV6_ADDR_UNSPECIFIED_INIT \
|
---|
146 | {{{ UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
|
---|
147 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
|
---|
148 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
|
---|
149 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00) }}}
|
---|
150 |
|
---|
151 | #define IPV6_ADDR_LINKLOCAL_ALLNODES_INIT \
|
---|
152 | {{{ UINT_C(0xff), UINT_C(0x02), UINT_C(0x00), UINT_C(0x00), \
|
---|
153 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
|
---|
154 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
|
---|
155 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x01) }}}
|
---|
156 |
|
---|
157 | #define IPV6_ADDR_LINKLOCAL_ALLROUTERS_INIT \
|
---|
158 | {{{ UINT_C(0xff), UINT_C(0x02), UINT_C(0x00), UINT_C(0x00), \
|
---|
159 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
|
---|
160 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
|
---|
161 | UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x02) }}}
|
---|
162 |
|
---|
163 | /*
|
---|
164 | * ã¢ãã¬ã¹ã®å®ç¾©
|
---|
165 | */
|
---|
166 |
|
---|
167 | #ifdef _NET_CFG_BYTE_ORDER
|
---|
168 |
|
---|
169 | #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN
|
---|
170 |
|
---|
171 | #define IPV6_ADDR_INT32_ONE ULONG_C(0x00000001)
|
---|
172 | #define IPV6_ADDR_INT32_TWO ULONG_C(0x00000002)
|
---|
173 | #define IPV6_ADDR_INT32_0000FFFF ULONG_C(0x0000ffff)
|
---|
174 | #define IPV6_ADDR_INT32_MNL ULONG_C(0xff010000)
|
---|
175 | #define IPV6_ADDR_INT32_MLL ULONG_C(0xff020000)
|
---|
176 | #define IPV6_ADDR_INT32_ULL ULONG_C(0xfe800000)
|
---|
177 | #define IPV6_ADDR_INT16_ULL UINT_C(0xfe80)
|
---|
178 | #define IPV6_ADDR_INT16_USL UINT_C(0xfec0)
|
---|
179 | #define IPV6_ADDR_INT16_MLL UINT_C(0xff02)
|
---|
180 |
|
---|
181 | #elif _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN
|
---|
182 |
|
---|
183 | #define IPV6_ADDR_INT32_ONE ULONG_C(0x01000000)
|
---|
184 | #define IPV6_ADDR_INT32_TWO ULONG_C(0x02000000)
|
---|
185 | #define IPV6_ADDR_INT32_0000FFFF ULONG_C(0xffff0000)
|
---|
186 | #define IPV6_ADDR_INT32_MNL ULONG_C(0x000001ff)
|
---|
187 | #define IPV6_ADDR_INT32_MLL ULONG_C(0x000002ff)
|
---|
188 | #define IPV6_ADDR_INT32_ULL ULONG_C(0x000080fe)
|
---|
189 | #define IPV6_ADDR_INT16_ULL UINT_C(0x80fe)
|
---|
190 | #define IPV6_ADDR_INT16_USL UINT_C(0xc0fe)
|
---|
191 | #define IPV6_ADDR_INT16_MLL UINT_C(0x02ff)
|
---|
192 |
|
---|
193 | #endif /* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
|
---|
194 |
|
---|
195 | #endif /* of #ifdef _NET_CFG_BYTE_ORDER */
|
---|
196 |
|
---|
197 | /*
|
---|
198 | * ç¹å¥ãªã¢ãã¬ã¹ã®ãã§ãã¯
|
---|
199 | */
|
---|
200 |
|
---|
201 | /* ç¡æå® */
|
---|
202 |
|
---|
203 | #define IN6_IS_ADDR_UNSPECIFIED(a) \
|
---|
204 | (memcmp((void *)(a), (void *)&in6_addr_unspecified, sizeof(T_IN6_ADDR)) == 0)
|
---|
205 |
|
---|
206 | /* ã«ã¼ããã㯠*/
|
---|
207 |
|
---|
208 | #define IN6_IS_ADDR_LOOPBACK(a) \
|
---|
209 | (memcmp((void *)(a), (void *)&in6_addr_unspecified, sizeof(T_IN6_ADDR) - 1) == 0 && \
|
---|
210 | (a)->s6_addr8[15] == 0x01)
|
---|
211 |
|
---|
212 | /* IPv4 äºæ */
|
---|
213 |
|
---|
214 | #define IN6_IS_ADDR_V4COMPAT(a) \
|
---|
215 | (memcmp((void *)(a), (void *)&in6_addr_unspecified, sizeof(T_IN6_ADDR) - 4) == 0 && \
|
---|
216 | (a)->s6_addr32[3] > IPV6_ADDR_INT32_ONE)
|
---|
217 |
|
---|
218 | /* IPv4 ããã */
|
---|
219 |
|
---|
220 | #define IN6_IS_ADDR_V4MAPPED(a) \
|
---|
221 | (((a)->s6_addr32[0] == ULONG_C(0x00000000)) && \
|
---|
222 | ((a)->s6_addr32[1] == ULONG_C(0x00000000)) && \
|
---|
223 | ((a)->s6_addr32[2] == IPV6_ADDR_INT32_0000FFFF))
|
---|
224 |
|
---|
225 | /*
|
---|
226 | * ã¹ã³ã¼ã ID
|
---|
227 | */
|
---|
228 |
|
---|
229 | #define IPV6_ADDR_SCOPE_NODELOCAL UINT_C(0x01)
|
---|
230 | #define IPV6_ADDR_SCOPE_LINKLOCAL UINT_C(0x02)
|
---|
231 | #define IPV6_ADDR_SCOPE_SITELOCAL UINT_C(0x05)
|
---|
232 | #define IPV6_ADDR_SCOPE_ORGLOCAL UINT_C(0x08)
|
---|
233 | #define IPV6_ADDR_SCOPE_GLOBAL UINT_C(0x0e)
|
---|
234 |
|
---|
235 | /*
|
---|
236 | * ã¦ããã£ã¹ãã»ã¹ã³ã¼ã
|
---|
237 | *
|
---|
238 | * 注æ: ä¸ä½ 10 ãããã®ã¿ãã§ãã¯ããªããã°ãªããªããRFC2373 åç
|
---|
239 | §
|
---|
240 | */
|
---|
241 |
|
---|
242 | /* ãªã³ã¯ãã¼ã«ã« */
|
---|
243 |
|
---|
244 | #define IN6_IS_ADDR_LINKLOCAL(a) \
|
---|
245 | (((a)->s6_addr8[0] == UINT_C(0xfe)) && (((a)->s6_addr8[1] & UINT_C(0xc0)) == UINT_C(0x80)))
|
---|
246 |
|
---|
247 | /* ãµã¤ããã¼ã«ã« */
|
---|
248 |
|
---|
249 | #define IN6_IS_ADDR_SITELOCAL(a) \
|
---|
250 | (((a)->s6_addr8[0] == UINT_C(0xfe)) && (((a)->s6_addr8[1] & UINT_C(0xc0)) == UINT_C(0xc0)))
|
---|
251 |
|
---|
252 | /* éç´å¯è½ã¦ããã£ã¹ã (ã°ãã¼ãã«) */
|
---|
253 |
|
---|
254 | #define IN6_IS_ADDR_AGGREGATE_UNICAST(a) \
|
---|
255 | (((a)->s6_addr8[0] & UINT_C(0xe0)) == UINT_C(0x20))
|
---|
256 |
|
---|
257 | /*
|
---|
258 | * ãã«ããã£ã¹ã
|
---|
259 | */
|
---|
260 |
|
---|
261 | #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr8[0] == UINT_C(0xff))
|
---|
262 |
|
---|
263 | /* è¦è«ãã«ããã£ã¹ã */
|
---|
264 |
|
---|
265 | #define IN6_IS_ADDR_NS_MULTICAST(a) \
|
---|
266 | (((a)->s6_addr32[0] == IPV6_ADDR_INT32_MLL) && \
|
---|
267 | ((a)->s6_addr32[1] == ULONG_C(0x00000000)) && \
|
---|
268 | ((a)->s6_addr32[2] == IPV6_ADDR_INT32_ONE) && \
|
---|
269 | ((a)->s6_addr8[12] == UINT_C(0xff)))
|
---|
270 |
|
---|
271 | /*
|
---|
272 | * åä¸ã®ãã§ãã¯
|
---|
273 | */
|
---|
274 |
|
---|
275 | #define IN6_ARE_ADDR_EQUAL(a,b) (memcmp((a), (b), sizeof(T_IN6_ADDR)) == 0)
|
---|
276 |
|
---|
277 | /*
|
---|
278 | * çµè·¯å¶å¾¡ç¨å®ç¾©
|
---|
279 | */
|
---|
280 |
|
---|
281 | #define IPV6_RTHDR_TYPE_0 UINT_C(0) /* IPv6 çµè·¯å¶å¾¡ãããã¿ã¤ã 0 */
|
---|
282 |
|
---|
283 | /*
|
---|
284 | * è¦å®å¤ã¨å¶éå¤
|
---|
285 | */
|
---|
286 |
|
---|
287 | #define IPV6_DEFAULT_MULTICAST_HOPS 1 /* ãã«ããã£ã¹ãæã®ããããªãããã®è¦å®å¤ */
|
---|
288 |
|
---|
289 | /*
|
---|
290 | * ITRON TCP/IPv6 ã¢ãã¬ã¹/ãã¼ãçªå·ã®å®ç¾©
|
---|
291 | */
|
---|
292 |
|
---|
293 | typedef struct t_ipv6ep {
|
---|
294 | T_IN6_ADDR ipaddr; /* IPv6 ã¢ãã¬ã¹ */
|
---|
295 | uint16_t portno; /* ãã¼ãçªå· */
|
---|
296 | } T_IPV6EP;
|
---|
297 |
|
---|
298 | /*
|
---|
299 | * ITRON/TCP/IP ç¨ IP ã¢ãã¬ã¹ã®å®ç¾©
|
---|
300 | */
|
---|
301 |
|
---|
302 | #define IPV6_ADDRANY IPV6_ADDR_UNSPECIFIED_INIT
|
---|
303 |
|
---|
304 | /*
|
---|
305 | * åççæç¨ IPv6 TCP åä»å£
|
---|
306 | */
|
---|
307 |
|
---|
308 | typedef struct t_tcp6_crep {
|
---|
309 | /* æ¨æº */
|
---|
310 | ATR repatr; /* åä»å£å±æ§ */
|
---|
311 | T_IPV6EP myaddr; /* èªåã®ã¢ãã¬ã¹ */
|
---|
312 | /* å®è£
|
---|
313 | ä¾å */
|
---|
314 | } T_TCP6_CREP;
|
---|
315 |
|
---|
316 | #if defined(SUPPORT_INET6)
|
---|
317 | #define T_TCP_CREP T_TCP6_CREP
|
---|
318 | #endif
|
---|
319 |
|
---|
320 | /*
|
---|
321 | * åççæç¨ IPv6 UDP é信端ç¹
|
---|
322 | */
|
---|
323 |
|
---|
324 | typedef struct t_udp6_ccep {
|
---|
325 | /* æ¨æº */
|
---|
326 | ATR cepatr; /* UDP é信端ç¹å±æ§ */
|
---|
327 | T_IPV6EP myaddr; /* èªåã®ã¢ãã¬ã¹ */
|
---|
328 | FP callback; /* ã³ã¼ã«ããã¯é¢æ° */
|
---|
329 | /* å®è£
|
---|
330 | ä¾å */
|
---|
331 | } T_UDP6_CCEP;
|
---|
332 |
|
---|
333 | #if defined(SUPPORT_INET6)
|
---|
334 | #define T_UDP_CCEP T_UDP6_CCEP
|
---|
335 | #endif
|
---|
336 |
|
---|
337 | /*
|
---|
338 | * IPv4 㨠IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã
|
---|
339 | */
|
---|
340 |
|
---|
341 | #if defined(SUPPORT_INET6)
|
---|
342 |
|
---|
343 | #define T_IN_ADDR T_IN6_ADDR
|
---|
344 | #define T_IPEP T_IPV6EP
|
---|
345 | #define IP_ADDRANY IPV6_ADDRANY
|
---|
346 |
|
---|
347 | #define IN_ARE_ADDR_EQUAL(n,h) IN6_ARE_ADDR_EQUAL(n,h)
|
---|
348 | #define IN_ARE_NET_ADDR_EQUAL(n,h) IN6_ARE_ADDR_EQUAL(n,h)
|
---|
349 | #define IN_COPY_TO_NET(d,s) memcpy(d,s,sizeof(T_IN6_ADDR))
|
---|
350 | #define IN_COPY_TO_HOST(d,s) memcpy(d,s,sizeof(T_IN6_ADDR))
|
---|
351 | #define IN_IS_ADDR_MULTICAST(a) IN6_IS_ADDR_MULTICAST(a)
|
---|
352 | #define IN_IS_NET_ADDR_MULTICAST(a) IN6_IS_ADDR_MULTICAST(a)
|
---|
353 | #define IN_IS_ADDR_ANY(a) IN6_IS_ADDR_UNSPECIFIED(a)
|
---|
354 |
|
---|
355 | #endif /* of #if defined(SUPPORT_INET6) */
|
---|
356 |
|
---|
357 | /*
|
---|
358 | * åæ¹åç
|
---|
359 | §
|
---|
360 | */
|
---|
361 |
|
---|
362 | #ifndef T_IFNET_DEFINED
|
---|
363 |
|
---|
364 | typedef struct t_ifnet T_IFNET;
|
---|
365 |
|
---|
366 | #define T_IFNET_DEFINED
|
---|
367 |
|
---|
368 | #endif /* of #ifndef T_IFNET_DEFINED */
|
---|
369 |
|
---|
370 | /*
|
---|
371 | * å
|
---|
372 | ¨åå¤æ°
|
---|
373 | */
|
---|
374 |
|
---|
375 | extern T_IN6_ADDR in6_addr_unspecified;
|
---|
376 | extern T_IN6_ADDR in6_addr_linklocal_allnodes;
|
---|
377 | extern T_IN6_ADDR in6_addr_linklocal_allrouters;
|
---|
378 |
|
---|
379 | #define ipv6_addrany in6_addr_unspecified
|
---|
380 |
|
---|
381 | /*
|
---|
382 | * TINET ç¬èª API
|
---|
383 | */
|
---|
384 |
|
---|
385 | extern char *ipv62str (char *buf, const T_IN6_ADDR *p_ip6addr);
|
---|
386 | extern ER_UINT in6_get_maxnum_ifaddr (void);
|
---|
387 | extern const T_IN6_ADDR *in6_get_ifaddr (int_t index);
|
---|
388 |
|
---|
389 | #endif /* of #ifndef _IN6_H_ */
|
---|