#ifndef __KAME_NETINET_IN_H_INCLUDED_
#error "do not include netinet6/in6.h directly, include netinet/in.h"
#endif
#ifndef _NETINET6_IN6_H_
#define _NETINET6_IN6_H_
#if !defined(_XOPEN_SOURCE)
#include <sys/queue.h>
#endif
#define __KAME__
#define __KAME_VERSION "STABLE 20000425"
#define IPV6PORT_RESERVED 1024
#define IPV6PORT_ANONMIN 49152
#define IPV6PORT_ANONMAX 65535
#define IPV6PORT_RESERVEDMIN 600
#define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1)
struct in6_addr {
union {
u_int8_t __u6_addr8[16];
u_int16_t __u6_addr16[8];
u_int32_t __u6_addr32[4];
} __u6_addr;
};
#define s6_addr __u6_addr.__u6_addr8
#ifdef KERNEL
#define s6_addr8 __u6_addr.__u6_addr8
#define s6_addr16 __u6_addr.__u6_addr16
#define s6_addr32 __u6_addr.__u6_addr32
#endif
#define INET6_ADDRSTRLEN 46
#if !defined(_XOPEN_SOURCE)
#define SIN6_LEN
#endif
struct sockaddr_in6 {
u_int8_t sin6_len;
u_int8_t sin6_family;
u_int16_t sin6_port;
u_int32_t sin6_flowinfo;
struct in6_addr sin6_addr;
u_int32_t sin6_scope_id;
};
#ifdef KERNEL
#define IN6MASK0 {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}}
#define IN6MASK32 {{{ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
#define IN6MASK64 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
#define IN6MASK96 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}
#define IN6MASK128 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}}
#endif
#ifdef KERNEL
extern const struct in6_addr in6mask0;
extern const struct in6_addr in6mask32;
extern const struct in6_addr in6mask64;
extern const struct in6_addr in6mask96;
extern const struct in6_addr in6mask128;
#endif
#ifdef KERNEL
#if BYTE_ORDER == BIG_ENDIAN
#define IPV6_ADDR_INT32_ONE 1
#define IPV6_ADDR_INT32_TWO 2
#define IPV6_ADDR_INT32_MNL 0xff010000
#define IPV6_ADDR_INT32_MLL 0xff020000
#define IPV6_ADDR_INT32_SMP 0x0000ffff
#define IPV6_ADDR_INT16_ULL 0xfe80
#define IPV6_ADDR_INT16_USL 0xfec0
#define IPV6_ADDR_INT16_MLL 0xff02
#elif BYTE_ORDER == LITTLE_ENDIAN
#define IPV6_ADDR_INT32_ONE 0x01000000
#define IPV6_ADDR_INT32_TWO 0x02000000
#define IPV6_ADDR_INT32_MNL 0x000001ff
#define IPV6_ADDR_INT32_MLL 0x000002ff
#define IPV6_ADDR_INT32_SMP 0xffff0000
#define IPV6_ADDR_INT16_ULL 0x80fe
#define IPV6_ADDR_INT16_USL 0xc0fe
#define IPV6_ADDR_INT16_MLL 0x02ff
#endif
#endif
#define IN6ADDR_ANY_INIT \
{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
#define IN6ADDR_LOOPBACK_INIT \
{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
#define IN6ADDR_NODELOCAL_ALLNODES_INIT \
{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \
{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \
{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}}
#ifdef KERNEL
extern const struct in6_addr in6addr_any;
extern const struct in6_addr in6addr_loopback;
extern const struct in6_addr in6addr_nodelocal_allnodes;
extern const struct in6_addr in6addr_linklocal_allnodes;
extern const struct in6_addr in6addr_linklocal_allrouters;
#endif
#ifdef KERNEL
#define IN6_ARE_ADDR_EQUAL(a, b) \
(bcmp((a), (b), sizeof(struct in6_addr)) == 0)
#else
#define IN6_ARE_ADDR_EQUAL(a, b) \
(memcmp((a), (b), sizeof(struct in6_addr)) == 0)
#endif
#define IN6_IS_ADDR_UNSPECIFIED(a) \
((*(u_int32_t *)(&(a)->s6_addr[0]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[4]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[8]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[12]) == 0))
#define IN6_IS_ADDR_LOOPBACK(a) \
((*(u_int32_t *)(&(a)->s6_addr[0]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[4]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[8]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[12]) == ntohl(1)))
#define IN6_IS_ADDR_V4COMPAT(a) \
((*(u_int32_t *)(&(a)->s6_addr[0]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[4]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[8]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[12]) != 0) && \
(*(u_int32_t *)(&(a)->s6_addr[12]) != ntohl(1)))
#define IN6_IS_ADDR_V4MAPPED(a) \
((*(u_int32_t *)(&(a)->s6_addr[0]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[4]) == 0) && \
(*(u_int32_t *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
#ifdef KERNEL
#define IPV6_ADDR_SCOPE_NODELOCAL 0x01
#define IPV6_ADDR_SCOPE_LINKLOCAL 0x02
#define IPV6_ADDR_SCOPE_SITELOCAL 0x05
#define IPV6_ADDR_SCOPE_ORGLOCAL 0x08
#define IPV6_ADDR_SCOPE_GLOBAL 0x0e
#else
#define __IPV6_ADDR_SCOPE_NODELOCAL 0x01
#define __IPV6_ADDR_SCOPE_LINKLOCAL 0x02
#define __IPV6_ADDR_SCOPE_SITELOCAL 0x05
#define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08
#define __IPV6_ADDR_SCOPE_GLOBAL 0x0e
#endif
#define IN6_IS_ADDR_LINKLOCAL(a) \
(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
#define IN6_IS_ADDR_SITELOCAL(a) \
(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
#ifdef KERNEL
#define IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
#else
#define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
#endif
#ifdef KERNEL
#define IN6_IS_ADDR_MC_NODELOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_NODELOCAL))
#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_LINKLOCAL))
#define IN6_IS_ADDR_MC_SITELOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_SITELOCAL))
#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_ORGLOCAL))
#define IN6_IS_ADDR_MC_GLOBAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL))
#else
#define IN6_IS_ADDR_MC_NODELOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL))
#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL))
#define IN6_IS_ADDR_MC_SITELOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL))
#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL))
#define IN6_IS_ADDR_MC_GLOBAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && \
(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL))
#endif
#if 0
#define IN6_IS_ADDR_ANY(a) IN6_IS_ADDR_UNSPECIFIED(a)
#endif
#ifdef KERNEL
#define IN6_IS_SCOPE_LINKLOCAL(a) \
((IN6_IS_ADDR_LINKLOCAL(a)) || \
(IN6_IS_ADDR_MC_LINKLOCAL(a)))
#endif
#if !defined(_XOPEN_SOURCE)
struct route_in6 {
struct rtentry *ro_rt;
struct sockaddr_in6 ro_dst;
};
#endif
#if 0
#define IPV6_OPTIONS 1
#define IPV6_RECVOPTS 5
#define IPV6_RECVRETOPTS 6
#define IPV6_RECVDSTADDR 7
#define IPV6_RETOPTS 8
#endif
#define IPV6_SOCKOPT_RESERVED1 3
#define IPV6_UNICAST_HOPS 4
#define IPV6_MULTICAST_IF 9
#define IPV6_MULTICAST_HOPS 10
#define IPV6_MULTICAST_LOOP 11
#define IPV6_JOIN_GROUP 12
#define IPV6_LEAVE_GROUP 13
#define IPV6_PORTRANGE 14
#define ICMP6_FILTER 18
#define IPV6_PKTINFO 19
#define IPV6_HOPLIMIT 20
#define IPV6_NEXTHOP 21
#define IPV6_HOPOPTS 22
#define IPV6_DSTOPTS 23
#define IPV6_RTHDR 24
#define IPV6_PKTOPTIONS 25
#define IPV6_CHECKSUM 26
#define IPV6_BINDV6ONLY 27
#if 1
#define IPV6_IPSEC_POLICY 28
#endif
#define IPV6_FAITH 29
#if 1
#define IPV6_FW_ADD 30
#define IPV6_FW_DEL 31
#define IPV6_FW_FLUSH 32
#define IPV6_FW_ZERO 33
#define IPV6_FW_GET 34
#endif
#define IPV6_RTHDRDSTOPTS 35
#define IPV6_RECVPKTINFO 36
#define IPV6_RECVHOPLIMIT 37
#define IPV6_RECVRTHDR 38
#define IPV6_RECVHOPOPTS 39
#define IPV6_RECVDSTOPTS 40
#define IPV6_RECVRTHDRDSTOPTS 41
#define IPV6_USE_MIN_MTU 42
#define IPV6_RECVPATHMTU 43
#define IPV6_PATHMTU 44
#define IPV6_REACHCONF 45
#define IPV6_RTHDR_LOOSE 0
#define IPV6_RTHDR_STRICT 1
#define IPV6_RTHDR_TYPE_0 0
#define IPV6_DEFAULT_MULTICAST_HOPS 1
#define IPV6_DEFAULT_MULTICAST_LOOP 1
struct ipv6_mreq {
struct in6_addr ipv6mr_multiaddr;
u_int ipv6mr_interface;
};
struct in6_pktinfo {
struct in6_addr ipi6_addr;
u_int ipi6_ifindex;
};
#define IPV6_PORTRANGE_DEFAULT 0
#define IPV6_PORTRANGE_HIGH 1
#define IPV6_PORTRANGE_LOW 2
#if !defined(_XOPEN_SOURCE)
#define IPV6PROTO_MAXID (IPPROTO_PIM + 1)
#define CTL_IPV6PROTO_NAMES { \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, \
{ "tcp6", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "udp6", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, \
{ "ip6", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, \
{ "ipsec6", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "icmp6", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "pim6", CTLTYPE_NODE }, \
}
#define IPV6CTL_FORWARDING 1
#define IPV6CTL_SENDREDIRECTS 2
#define IPV6CTL_DEFHLIM 3
#ifdef notyet
#define IPV6CTL_DEFMTU 4
#endif
#define IPV6CTL_FORWSRCRT 5
#define IPV6CTL_STATS 6
#define IPV6CTL_MRTSTATS 7
#define IPV6CTL_MRTPROTO 8
#define IPV6CTL_MAXFRAGPACKETS 9
#define IPV6CTL_SOURCECHECK 10
#define IPV6CTL_SOURCECHECK_LOGINT 11
#define IPV6CTL_ACCEPT_RTADV 12
#define IPV6CTL_KEEPFAITH 13
#define IPV6CTL_LOG_INTERVAL 14
#define IPV6CTL_HDRNESTLIMIT 15
#define IPV6CTL_DAD_COUNT 16
#define IPV6CTL_AUTO_FLOWLABEL 17
#define IPV6CTL_DEFMCASTHLIM 18
#define IPV6CTL_GIF_HLIM 19
#define IPV6CTL_KAME_VERSION 20
#define IPV6CTL_USE_DEPRECATED 21
#define IPV6CTL_RR_PRUNE 22
#if MAPPED_ADDR_ENABLED
#define IPV6CTL_MAPPED_ADDR 23
#endif
#define IPV6CTL_MAXID 24
#if MAPPED_ADDR_ENABLED
#define IPV6CTL_NAMES_MAPPED_ADDR "mapped_addr"
#define IPV6CTL_TYPE_MAPPED_ADDR CTLTYPE_INT
#define IPV6CTL_VARS_MAPPED_ADDR &ip6_mapped_addr_on
#else
#define IPV6CTL_NAMES_MAPPED_ADDR 0
#define IPV6CTL_TYPE_MAPPED_ADDR 0
#define IPV6CTL_VARS_MAPPED_ADDR 0
#endif
#if IPV6CTL_BINDV6ONLY
#define IPV6CTL_NAMES_BINDV6ONLY "bindv6only"
#define IPV6CTL_TYPE_BINDV6ONLY CTLTYPE_INT
#define IPV6CTL_VARS_BINDV6ONLY &ip6_bindv6only
#else
#define IPV6CTL_NAMES_BINDV6ONLY 0
#define IPV6CTL_TYPE_BINDV6ONLY 0
#define IPV6CTL_VARS_BINDV6ONLY 0
#endif
#define IPV6CTL_NAMES { \
{ 0, 0 }, \
{ "forwarding", CTLTYPE_INT }, \
{ "redirect", CTLTYPE_INT }, \
{ "hlim", CTLTYPE_INT }, \
{ "mtu", CTLTYPE_INT }, \
{ "forwsrcrt", CTLTYPE_INT }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "mrtproto", CTLTYPE_INT }, \
{ "maxfragpackets", CTLTYPE_INT }, \
{ "sourcecheck", CTLTYPE_INT }, \
{ "sourcecheck_logint", CTLTYPE_INT }, \
{ "accept_rtadv", CTLTYPE_INT }, \
{ "keepfaith", CTLTYPE_INT }, \
{ "log_interval", CTLTYPE_INT }, \
{ "hdrnestlimit", CTLTYPE_INT }, \
{ "dad_count", CTLTYPE_INT }, \
{ "auto_flowlabel", CTLTYPE_INT }, \
{ "defmcasthlim", CTLTYPE_INT }, \
{ "gifhlim", CTLTYPE_INT }, \
{ "kame_version", CTLTYPE_STRING }, \
{ "use_deprecated", CTLTYPE_INT }, \
{ "rr_prune", CTLTYPE_INT }, \
{ IPV6CTL_NAMES_MAPPED_ADDR, IPV6CTL_TYPE_MAPPED_ADDR }, \
{ IPV6CTL_NAMES_BINDV6ONLY, IPV6CTL_TYPE_BINDV6ONLY }, \
}
#ifdef __bsdi__
#define IPV6CTL_VARS { \
0, \
&ip6_forwarding, \
&ip6_sendredirects, \
&ip6_defhlim, \
0, \
&ip6_forward_srcrt, \
0, \
0, \
0, \
&ip6_maxfragpackets, \
&ip6_sourcecheck, \
&ip6_sourcecheck_interval, \
&ip6_accept_rtadv, \
&ip6_keepfaith, \
&ip6_log_interval, \
&ip6_hdrnestlimit, \
&ip6_dad_count, \
&ip6_auto_flowlabel, \
&ip6_defmcasthlim, \
&ip6_gif_hlim, \
0, \
&ip6_use_deprecated, \
&ip6_rr_prune, \
IPV6CTL_VARS_MAPPED_ADDR, \
IPV6CTL_VARS_BINDV6ONLY, \
}
#endif
#endif
#ifdef KERNEL
struct cmsghdr;
int in6_cksum __P((struct mbuf *, u_int8_t, u_int32_t, u_int32_t));
int in6_localaddr __P((struct in6_addr *));
int in6_addrscope __P((struct in6_addr *));
struct in6_ifaddr *in6_ifawithscope __P((struct ifnet *, struct in6_addr *));
struct in6_ifaddr *in6_ifawithifp __P((struct ifnet *, struct in6_addr *));
extern void in6_if_up __P((struct ifnet *));
#if MAPPED_ADDR_ENABLED
struct sockaddr;
void in6_sin6_2_sin __P((struct sockaddr_in *sin,
struct sockaddr_in6 *sin6));
void in6_sin_2_v4mapsin6 __P((struct sockaddr_in *sin,
struct sockaddr_in6 *sin6));
void in6_sin6_2_sin_in_sock __P((struct sockaddr *nam));
void in6_sin_2_v4mapsin6_in_sock __P((struct sockaddr **nam));
#endif
#define satosin6(sa) ((struct sockaddr_in6 *)(sa))
#define sin6tosa(sin6) ((struct sockaddr *)(sin6))
#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
#endif
__BEGIN_DECLS
struct cmsghdr;
extern int inet6_option_space __P((int));
extern int inet6_option_init __P((void *, struct cmsghdr **, int));
extern int inet6_option_append __P((struct cmsghdr *, const u_int8_t *,
int, int));
extern u_int8_t *inet6_option_alloc __P((struct cmsghdr *, int, int, int));
extern int inet6_option_next __P((const struct cmsghdr *, u_int8_t **));
extern int inet6_option_find __P((const struct cmsghdr *, u_int8_t **, int));
extern size_t inet6_rthdr_space __P((int, int));
extern struct cmsghdr *inet6_rthdr_init __P((void *, int));
extern int inet6_rthdr_add __P((struct cmsghdr *, const struct in6_addr *,
unsigned int));
extern int inet6_rthdr_lasthop __P((struct cmsghdr *, unsigned int));
#if 0
extern int inet6_rthdr_reverse __P((const struct cmsghdr *, struct cmsghdr *));
#endif
extern int inet6_rthdr_segments __P((const struct cmsghdr *));
extern struct in6_addr *inet6_rthdr_getaddr __P((struct cmsghdr *, int));
extern int inet6_rthdr_getflags __P((const struct cmsghdr *, int));
extern int inet6_opt_init __P((void *, size_t));
extern int inet6_opt_append __P((void *, size_t, int, u_int8_t,
size_t, u_int8_t, void **));
extern int inet6_opt_finish __P((void *, size_t, int));
extern int inet6_opt_set_val __P((void *, size_t, void *, int));
extern int inet6_opt_next __P((void *, size_t, int, u_int8_t *,
size_t *, void **));
extern int inet6_opt_find __P((void *, size_t, int, u_int8_t,
size_t *, void **));
extern int inet6_opt_get_val __P((void *, size_t, void *, int));
extern size_t inet6_rth_space __P((int, int));
extern void *inet6_rth_init __P((void *, int, int, int));
extern int inet6_rth_add __P((void *, const struct in6_addr *));
extern int inet6_rth_reverse __P((const void *, void *));
extern int inet6_rth_segments __P((const void *));
extern struct in6_addr *inet6_rth_getaddr __P((const void *, int));
__END_DECLS
#endif