00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 #ifndef __KAME_NETINET_IN_H_INCLUDED_
00065 #error "do not include netinet6/in6.h directly, include netinet/in.h. see RFC2553"
00066 #endif
00067
00068 #ifndef _NETINET6_IN6_H_
00069 #define _NETINET6_IN6_H_
00070
00071 #if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
00072 #define SYMBIAN
00073 #endif
00074
00075
00076
00077
00078
00079 #define __KAME__
00080 #define __KAME_VERSION "20010528/FreeBSD"
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109 #if __BSD_VISIBLE
00110 #define IPV6PORT_RESERVED 1024
00111 #define IPV6PORT_ANONMIN 49152
00112 #define IPV6PORT_ANONMAX 65535
00113 #define IPV6PORT_RESERVEDMIN 600
00114 #define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1)
00115 #endif
00116
00117
00118
00119
00120 struct in6_addr {
00121 union {
00122 uint8_t __u6_addr8[16];
00123 uint16_t __u6_addr16[8];
00124 uint32_t __u6_addr32[4];
00125 } __u6_addr;
00126 };
00127
00128 #define s6_addr __u6_addr.__u6_addr8
00129 #ifdef _KERNEL
00130 #define s6_addr8 __u6_addr.__u6_addr8
00131 #define s6_addr16 __u6_addr.__u6_addr16
00132 #define s6_addr32 __u6_addr.__u6_addr32
00133 #endif
00134
00135 #define INET6_ADDRSTRLEN 46
00136
00137
00138
00139
00140
00141
00142
00143
00144 #if __BSD_VISIBLE
00145 #define SIN6_LEN
00146 #endif
00147 #ifdef __SYMBIAN32__
00148 struct sockaddr_in6 {
00149 u_short sin6_family;
00150 u_short sin6_port;
00151 struct in6_addr sin6_addr;
00152 uint32_t sin6_flowinfo;
00153 uint32_t sin6_scope_id;
00154 uint8_t sin6_len;
00155 };
00156 #else
00157 struct sockaddr_in6 {
00158 uint8_t sin6_len;
00159 sa_family_t sin6_family;
00160 in_port_t sin6_port;
00161 uint32_t sin6_flowinfo;
00162 struct in6_addr sin6_addr;
00163 uint32_t sin6_scope_id;
00164 };
00165 #endif
00166
00167
00168
00169
00170 #ifdef _KERNEL
00171 #define IN6MASK0 {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}}
00172 #define IN6MASK32 {{{ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, \
00173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
00174 #define IN6MASK64 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
00175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
00176 #define IN6MASK96 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
00177 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}
00178 #define IN6MASK128 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
00179 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}}
00180 #endif
00181
00182 #ifdef _KERNEL
00183 extern const struct sockaddr_in6 sa6_any;
00184
00185 extern const struct in6_addr in6mask0;
00186 extern const struct in6_addr in6mask32;
00187 extern const struct in6_addr in6mask64;
00188 extern const struct in6_addr in6mask96;
00189 extern const struct in6_addr in6mask128;
00190 #endif
00191
00192
00193
00194
00195 #ifdef _KERNEL
00196 #if _BYTE_ORDER == _BIG_ENDIAN
00197 #define IPV6_ADDR_INT32_ONE 1
00198 #define IPV6_ADDR_INT32_TWO 2
00199 #define IPV6_ADDR_INT32_MNL 0xff010000
00200 #define IPV6_ADDR_INT32_MLL 0xff020000
00201 #define IPV6_ADDR_INT32_SMP 0x0000ffff
00202 #define IPV6_ADDR_INT16_ULL 0xfe80
00203 #define IPV6_ADDR_INT16_USL 0xfec0
00204 #define IPV6_ADDR_INT16_MLL 0xff02
00205 #elif _BYTE_ORDER == _LITTLE_ENDIAN
00206 #define IPV6_ADDR_INT32_ONE 0x01000000
00207 #define IPV6_ADDR_INT32_TWO 0x02000000
00208 #define IPV6_ADDR_INT32_MNL 0x000001ff
00209 #define IPV6_ADDR_INT32_MLL 0x000002ff
00210 #define IPV6_ADDR_INT32_SMP 0xffff0000
00211 #define IPV6_ADDR_INT16_ULL 0x80fe
00212 #define IPV6_ADDR_INT16_USL 0xc0fe
00213 #define IPV6_ADDR_INT16_MLL 0x02ff
00214 #endif
00215 #endif
00216
00217
00218
00219
00220 #if __BSD_VISIBLE
00221 #define IN6ADDR_ANY_INIT \
00222 {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
00223 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
00224 #define IN6ADDR_LOOPBACK_INIT \
00225 {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
00226 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
00227 #define IN6ADDR_NODELOCAL_ALLNODES_INIT \
00228 {{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
00229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
00230 #define IN6ADDR_INTFACELOCAL_ALLNODES_INIT \
00231 {{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
00232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
00233 #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \
00234 {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
00235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
00236 #define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \
00237 {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
00238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}}
00239 #endif
00240
00241 extern const struct in6_addr in6addr_any;
00242 extern const struct in6_addr in6addr_loopback;
00243 #if __BSD_VISIBLE
00244 extern const struct in6_addr in6addr_nodelocal_allnodes;
00245 extern const struct in6_addr in6addr_linklocal_allnodes;
00246 extern const struct in6_addr in6addr_linklocal_allrouters;
00247 #endif
00248
00249
00250
00251
00252
00253
00254
00255 #ifdef _KERNEL
00256 #define IN6_ARE_ADDR_EQUAL(a, b) \
00257 (bcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
00258 #else
00259 #if __BSD_VISIBLE
00260 #define IN6_ARE_ADDR_EQUAL(a, b) \
00261 (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
00262 #endif
00263 #endif
00264
00265 #ifdef _KERNEL
00266
00267 #define SA6_ARE_ADDR_EQUAL(a, b) \
00268 (((a)->sin6_scope_id == 0 || (b)->sin6_scope_id == 0 || \
00269 ((a)->sin6_scope_id == (b)->sin6_scope_id)) && \
00270 (bcmp(&(a)->sin6_addr, &(b)->sin6_addr, sizeof(struct in6_addr)) == 0))
00271 #endif
00272
00273
00274
00275
00276 #define IN6_IS_ADDR_UNSPECIFIED(a) \
00277 ((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
00278 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
00279 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
00280 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
00281
00282
00283
00284
00285 #define IN6_IS_ADDR_LOOPBACK(a) \
00286 ((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
00287 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
00288 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
00289 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1)))
00290
00291
00292
00293
00294 #define IN6_IS_ADDR_V4COMPAT(a) \
00295 ((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
00296 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
00297 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
00298 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \
00299 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1)))
00300
00301
00302
00303
00304 #define IN6_IS_ADDR_V4MAPPED(a) \
00305 ((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
00306 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
00307 (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
00308
00309
00310
00311
00312
00313 #ifdef _KERNEL
00314 #define IPV6_ADDR_SCOPE_NODELOCAL 0x01
00315 #define IPV6_ADDR_SCOPE_INTFACELOCAL 0x01
00316 #define IPV6_ADDR_SCOPE_LINKLOCAL 0x02
00317 #define IPV6_ADDR_SCOPE_SITELOCAL 0x05
00318 #define IPV6_ADDR_SCOPE_ORGLOCAL 0x08
00319 #define IPV6_ADDR_SCOPE_GLOBAL 0x0e
00320 #else
00321 #define __IPV6_ADDR_SCOPE_NODELOCAL 0x01
00322 #define __IPV6_ADDR_SCOPE_INTFACELOCAL 0x01
00323 #define __IPV6_ADDR_SCOPE_LINKLOCAL 0x02
00324 #define __IPV6_ADDR_SCOPE_SITELOCAL 0x05
00325 #define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08
00326 #define __IPV6_ADDR_SCOPE_GLOBAL 0x0e
00327 #endif
00328
00329
00330
00331
00332
00333 #define IN6_IS_ADDR_LINKLOCAL(a) \
00334 (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
00335 #define IN6_IS_ADDR_SITELOCAL(a) \
00336 (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
00337
00338
00339
00340
00341 #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
00342
00343 #ifdef _KERNEL
00344 #define IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
00345 #else
00346 #define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
00347 #endif
00348
00349
00350
00351
00352 #ifdef _KERNEL
00353 #define IN6_IS_ADDR_MC_NODELOCAL(a) \
00354 (IN6_IS_ADDR_MULTICAST(a) && \
00355 (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_NODELOCAL))
00356 #define IN6_IS_ADDR_MC_INTFACELOCAL(a) \
00357 (IN6_IS_ADDR_MULTICAST(a) && \
00358 (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_INTFACELOCAL))
00359 #define IN6_IS_ADDR_MC_LINKLOCAL(a) \
00360 (IN6_IS_ADDR_MULTICAST(a) && \
00361 (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_LINKLOCAL))
00362 #define IN6_IS_ADDR_MC_SITELOCAL(a) \
00363 (IN6_IS_ADDR_MULTICAST(a) && \
00364 (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_SITELOCAL))
00365 #define IN6_IS_ADDR_MC_ORGLOCAL(a) \
00366 (IN6_IS_ADDR_MULTICAST(a) && \
00367 (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_ORGLOCAL))
00368 #define IN6_IS_ADDR_MC_GLOBAL(a) \
00369 (IN6_IS_ADDR_MULTICAST(a) && \
00370 (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL))
00371 #else
00372 #define IN6_IS_ADDR_MC_NODELOCAL(a) \
00373 (IN6_IS_ADDR_MULTICAST(a) && \
00374 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL))
00375 #define IN6_IS_ADDR_MC_LINKLOCAL(a) \
00376 (IN6_IS_ADDR_MULTICAST(a) && \
00377 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL))
00378 #define IN6_IS_ADDR_MC_SITELOCAL(a) \
00379 (IN6_IS_ADDR_MULTICAST(a) && \
00380 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL))
00381 #define IN6_IS_ADDR_MC_ORGLOCAL(a) \
00382 (IN6_IS_ADDR_MULTICAST(a) && \
00383 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL))
00384 #define IN6_IS_ADDR_MC_GLOBAL(a) \
00385 (IN6_IS_ADDR_MULTICAST(a) && \
00386 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL))
00387 #endif
00388
00389 #ifdef _KERNEL
00390
00391
00392
00393 #define IN6_IS_SCOPE_LINKLOCAL(a) \
00394 ((IN6_IS_ADDR_LINKLOCAL(a)) || \
00395 (IN6_IS_ADDR_MC_LINKLOCAL(a)))
00396
00397 #define IFA6_IS_DEPRECATED(a) \
00398 ((a)->ia6_lifetime.ia6t_preferred != 0 && \
00399 (a)->ia6_lifetime.ia6t_preferred < time_second)
00400 #define IFA6_IS_INVALID(a) \
00401 ((a)->ia6_lifetime.ia6t_expire != 0 && \
00402 (a)->ia6_lifetime.ia6t_expire < time_second)
00403 #endif
00404
00405
00406
00407
00408 #if __BSD_VISIBLE
00409 struct route_in6 {
00410 struct rtentry *ro_rt;
00411 struct sockaddr_in6 ro_dst;
00412 };
00413 #endif
00414
00415
00416
00417
00418
00419
00420 #if 0
00421 #define IPV6_OPTIONS 1
00422 #define IPV6_RECVOPTS 5
00423 #define IPV6_RECVRETOPTS 6
00424 #define IPV6_RECVDSTADDR 7
00425 #define IPV6_RETOPTS 8
00426 #endif
00427 #define IPV6_SOCKOPT_RESERVED1 3
00428 #define IPV6_UNICAST_HOPS 4
00429 #define IPV6_MULTICAST_IF 9
00430 #define IPV6_MULTICAST_HOPS 10
00431 #define IPV6_MULTICAST_LOOP 11
00432 #define IPV6_JOIN_GROUP 12
00433 #define IPV6_LEAVE_GROUP 13
00434 #define IPV6_PORTRANGE 14
00435 #define ICMP6_FILTER 18
00436
00437 #ifdef _KERNEL
00438 #define IPV6_2292PKTINFO 19
00439 #define IPV6_2292HOPLIMIT 20
00440 #define IPV6_2292NEXTHOP 21
00441 #define IPV6_2292HOPOPTS 22
00442 #define IPV6_2292DSTOPTS 23
00443 #define IPV6_2292RTHDR 24
00444 #define IPV6_2292PKTOPTIONS 25
00445 #endif
00446
00447 #define IPV6_CHECKSUM 26
00448 #define IPV6_V6ONLY 27
00449 #ifndef _KERNEL
00450 #define IPV6_BINDV6ONLY IPV6_V6ONLY
00451 #endif
00452
00453 #if 1
00454 #define IPV6_IPSEC_POLICY 28
00455 #endif
00456 #define IPV6_FAITH 29
00457
00458 #if 1
00459 #define IPV6_FW_ADD 30
00460 #define IPV6_FW_DEL 31
00461 #define IPV6_FW_FLUSH 32
00462 #define IPV6_FW_ZERO 33
00463 #define IPV6_FW_GET 34
00464 #endif
00465
00466
00467 #define IPV6_RTHDRDSTOPTS 35
00468
00469 #define IPV6_RECVPKTINFO 36
00470 #define IPV6_RECVHOPLIMIT 37
00471 #define IPV6_RECVRTHDR 38
00472 #define IPV6_RECVHOPOPTS 39
00473 #define IPV6_RECVDSTOPTS 40
00474 #ifdef _KERNEL
00475 #define IPV6_RECVRTHDRDSTOPTS 41
00476 #endif
00477
00478 #define IPV6_USE_MIN_MTU 42
00479 #define IPV6_RECVPATHMTU 43
00480
00481 #define IPV6_PATHMTU 44
00482
00483 #if 0
00484 #define IPV6_REACHCONF 45
00485
00486 #endif
00487
00488
00489 #define IPV6_PKTINFO 46
00490 #define IPV6_HOPLIMIT 47
00491 #define IPV6_NEXTHOP 48
00492 #define IPV6_HOPOPTS 49
00493 #define IPV6_DSTOPTS 50
00494 #define IPV6_RTHDR 51
00495 #if 0
00496 #define IPV6_PKTOPTIONS 52
00497
00498 #endif
00499
00500 #define IPV6_RECVTCLASS 57
00501
00502 #define IPV6_AUTOFLOWLABEL 59
00503
00504 #define IPV6_TCLASS 61
00505 #define IPV6_DONTFRAG 62
00506
00507 #define IPV6_PREFER_TEMPADDR 63
00508
00509
00510
00511
00512
00513 #define IPV6_RTHDR_LOOSE 0
00514 #define IPV6_RTHDR_STRICT 1
00515 #define IPV6_RTHDR_TYPE_0 0
00516
00517
00518
00519
00520 #define IPV6_DEFAULT_MULTICAST_HOPS 1
00521 #define IPV6_DEFAULT_MULTICAST_LOOP 1
00522
00523
00524
00525
00526 struct ipv6_mreq {
00527 struct in6_addr ipv6mr_multiaddr;
00528 unsigned int ipv6mr_interface;
00529 };
00530
00531
00532
00533
00534 struct in6_pktinfo {
00535 struct in6_addr ipi6_addr;
00536 unsigned int ipi6_ifindex;
00537 };
00538
00539
00540
00541
00542 struct ip6_mtuinfo {
00543 struct sockaddr_in6 ip6m_addr;
00544 uint32_t ip6m_mtu;
00545 };
00546
00547
00548
00549
00550
00551 #define IPV6_PORTRANGE_DEFAULT 0
00552 #define IPV6_PORTRANGE_HIGH 1
00553 #define IPV6_PORTRANGE_LOW 2
00554
00555 #if __BSD_VISIBLE
00556
00557
00558
00559
00560
00561
00562 #define IPV6PROTO_MAXID (IPPROTO_PIM + 1)
00563
00564
00565
00566
00567 #define IPV6CTL_FORWARDING 1
00568 #define IPV6CTL_SENDREDIRECTS 2
00569 #define IPV6CTL_DEFHLIM 3
00570 #ifdef notyet
00571 #define IPV6CTL_DEFMTU 4
00572 #endif
00573 #define IPV6CTL_FORWSRCRT 5
00574 #define IPV6CTL_STATS 6
00575 #define IPV6CTL_MRTSTATS 7
00576 #define IPV6CTL_MRTPROTO 8
00577 #define IPV6CTL_MAXFRAGPACKETS 9
00578 #define IPV6CTL_SOURCECHECK 10
00579 #define IPV6CTL_SOURCECHECK_LOGINT 11
00580 #define IPV6CTL_ACCEPT_RTADV 12
00581 #define IPV6CTL_KEEPFAITH 13
00582 #define IPV6CTL_LOG_INTERVAL 14
00583 #define IPV6CTL_HDRNESTLIMIT 15
00584 #define IPV6CTL_DAD_COUNT 16
00585 #define IPV6CTL_AUTO_FLOWLABEL 17
00586 #define IPV6CTL_DEFMCASTHLIM 18
00587 #define IPV6CTL_GIF_HLIM 19
00588 #define IPV6CTL_KAME_VERSION 20
00589 #define IPV6CTL_USE_DEPRECATED 21
00590 #define IPV6CTL_RR_PRUNE 22
00591 #if 0
00592 #define IPV6CTL_MAPPED_ADDR 23
00593 #endif
00594 #define IPV6CTL_V6ONLY 24
00595 #define IPV6CTL_RTEXPIRE 25
00596 #define IPV6CTL_RTMINEXPIRE 26
00597 #define IPV6CTL_RTMAXCACHE 27
00598
00599 #define IPV6CTL_USETEMPADDR 32
00600 #define IPV6CTL_TEMPPLTIME 33
00601 #define IPV6CTL_TEMPVLTIME 34
00602 #define IPV6CTL_AUTO_LINKLOCAL 35
00603 #define IPV6CTL_RIP6STATS 36
00604 #define IPV6CTL_PREFER_TEMPADDR 37
00605 #define IPV6CTL_ADDRCTLPOLICY 38
00606
00607 #define IPV6CTL_MAXFRAGS 41
00608
00609
00610
00611
00612 #define IPV6CTL_STEALTH 45
00613 #define IPV6CTL_MAXID 46
00614 #endif
00615
00616
00617
00618
00619 #define M_AUTHIPHDR M_PROTO2
00620 #define M_DECRYPTED M_PROTO3
00621 #define M_LOOP M_PROTO4
00622 #define M_AUTHIPDGM M_PROTO5
00623
00624 #ifdef _KERNEL
00625 struct cmsghdr;
00626
00627 struct sockaddr;
00628 extern u_char ip6_protox[];
00629 #define satosin6(sa) ((struct sockaddr_in6 *)(sa))
00630 #define sin6tosa(sin6) ((struct sockaddr *)(sin6))
00631 #define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
00632
00633 extern int (*faithprefix_p)(struct in6_addr *);
00634 #endif
00635
00636 #ifndef _SIZE_T_DECLARED
00637 typedef __size_t size_t;
00638 #define _SIZE_T_DECLARED
00639 #endif
00640
00641 #ifndef _SOCKLEN_T_DECLARED
00642 typedef __socklen_t socklen_t;
00643 #define _SOCKLEN_T_DECLARED
00644 #endif
00645
00646 #if __BSD_VISIBLE
00647
00648 __BEGIN_DECLS
00649 struct cmsghdr;
00650 __END_DECLS
00651
00652 #endif
00653
00654 #endif