2 ipv6.h -- missing IPv6 related definitions
3 Copyright (C) 2003 Ivo Timmermans <ivo@o2w.nl>
4 2003 Guus Sliepen <guus@sliepen.eu.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 $Id: ipv6.h,v 1.1.2.1 2003/07/07 11:13:31 guus Exp $
23 #ifndef __TINC_IPV6_H__
24 #define __TINC_IPV6_H__
28 #include <netinet/in.h>
29 #ifdef HAVE_INTTYPES_H
37 #ifndef IPPROTO_ICMPV6
38 #define IPPROTO_ICMPV6 58
41 #ifndef HAVE_STRUCT_IN6_ADDR
45 uint16_t u6_addr16[8];
46 uint32_t u6_addr32[4];
49 #define s6_addr in6_u.u6_addr8
50 #define s6_addr16 in6_u.u6_addr16
51 #define s6_addr32 in6_u.u6_addr32
54 #ifndef HAVE_STRUCT_SOCKADDR_IN6
57 uint32_t sin6_flowinfo;
58 struct in6_addr sin6_addr;
59 uint32_t sin6_scope_id;
63 #ifndef HAVE_NETINET_IP6_H
67 uint32_t ip6_un1_flow;
68 uint16_t ip6_un1_plen;
74 struct in6_addr ip6_src;
75 struct in6_addr ip6_dst;
83 uint32_t icmp6_un_data32[1];
84 uint16_t icmp6_un_data16[2];
85 uint8_t icmp6_un_data8[4];
88 #define ICMP6_DST_UNREACH_NOROUTE 0
89 #define ICMP6_DST_UNREACH 1
90 #define ICMP6_DST_UNREACH_ADDR 3
91 #define ND_NEIGHBOR_SOLICIT 135
92 #define ND_NEIGHBOR_ADVERT 136
94 struct nd_neighbor_solicit {
95 struct icmp6_hdr nd_ns_hdr;
96 struct in6_addr nd_ns_target;
98 #define ND_OPT_SOURCE_LINKADDR 1
99 #define ND_OPT_TARGET_LINKADDR 2
107 #endif /* __TINC_IPV6_H__ */