2 * Copyright (c) 2006-2008 University of Zagreb
3 * Copyright (c) 2006-2008 FreeBSD Foundation
5 * This software was developed by the University of Zagreb and the
6 * FreeBSD Foundation under sponsorship by the Stichting NLnet and the
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 #ifndef _NETINET6_VINET6_H_
34 #define _NETINET6_VINET6_H_
37 #include <sys/socket.h>
38 #include <netinet/ip6.h>
40 #include <netinet6/ip6_var.h>
41 #include <netinet6/raw_ip6.h>
42 #include <netinet/icmp6.h>
43 #include <netinet6/scope6_var.h>
44 #include <netinet6/in6_ifattach.h>
45 #include <netinet6/in6_var.h>
46 #include <netinet6/nd6.h>
47 #include <netinet/in_pcb.h>
50 struct in6_ifaddr * _in6_ifaddr;
52 u_int _frag6_nfragpackets;
56 struct route_in6 _ip6_forward_rt;
58 struct in6_addrpolicy _defaultaddrpolicy;
59 TAILQ_HEAD(, addrsel_policyent) _addrsel_policytab;
61 int _ip6_auto_linklocal;
62 int _rtq_minreallyold6;
66 struct ip6stat _ip6stat;
67 struct rip6stat _rip6stat;
68 struct icmp6stat _icmp6stat;
71 struct callout _rtq_timer6;
72 struct callout _rtq_mtutimer;
73 struct callout _nd6_slowtimo_ch;
74 struct callout _nd6_timer_ch;
75 struct callout _in6_tmpaddrtimer_ch;
79 struct llinfo_nd6 _llinfo_nd6;
80 struct nd_drhead _nd_defrouter;
81 struct nd_prhead _nd_prefix;
82 struct ifnet * _nd6_defifp;
85 struct scope6_id _sid_default;
87 TAILQ_HEAD(, dadq) _dadq;
90 int _icmp6errpps_count;
91 int _icmp6errppslim_last;
94 int _ip6_sendredirects;
96 int _ip6_defmcasthlim;
97 int _ip6_accept_rtadv;
98 int _ip6_maxfragpackets;
100 int _ip6_log_interval;
101 int _ip6_hdrnestlimit;
103 int _ip6_auto_flowlabel;
104 int _ip6_use_deprecated;
110 time_t _ip6_log_time;
111 int _nd6_onlink_ns_rfc4861;
115 u_long _rip6_sendspace;
116 u_long _rip6_recvspace;
117 int _icmp6_rediraccept;
118 int _icmp6_redirtimeout;
124 int _ip6_prefer_tempaddr;
125 int _ip6_forward_srcrt;
126 int _ip6_sourcecheck;
127 int _ip6_sourcecheck_interval;
128 int _ip6_ours_check_algorithm;
134 int _nd6_useloopback;
138 int _nd6_maxqueuelen;
140 int _nd6_recalc_reachtm_interval;
143 int _ip6_use_tempaddr;
144 int _ip6_desync_factor;
145 u_int32_t _ip6_temp_preferred_lifetime;
146 u_int32_t _ip6_temp_valid_lifetime;
148 int _ip6_mrouter_ver;
152 int _ip6_temp_regen_advance;
153 int _ip6_use_defzone;
155 struct ip6_pktopts _ip6_opts;
160 #define INIT_VNET_INET6(vnet) \
161 INIT_FROM_VNET(vnet, VNET_MOD_INET6, struct vnet_inet6, vnet_inet6)
163 #define VNET_INET6(sym) VSYM(vnet_inet6, sym)
167 * Symbol translation macros
169 #define V_addrsel_policytab VNET_INET6(addrsel_policytab)
170 #define V_dad_ignore_ns VNET_INET6(dad_ignore_ns)
171 #define V_dad_init VNET_INET6(dad_init)
172 #define V_dad_maxtry VNET_INET6(dad_maxtry)
173 #define V_dadq VNET_INET6(dadq)
174 #define V_defaultaddrpolicy VNET_INET6(defaultaddrpolicy)
175 #define V_frag6_nfragpackets VNET_INET6(frag6_nfragpackets)
176 #define V_frag6_nfrags VNET_INET6(frag6_nfrags)
177 #define V_icmp6_nodeinfo VNET_INET6(icmp6_nodeinfo)
178 #define V_icmp6_rediraccept VNET_INET6(icmp6_rediraccept)
179 #define V_icmp6_redirtimeout VNET_INET6(icmp6_redirtimeout)
180 #define V_icmp6errpps_count VNET_INET6(icmp6errpps_count)
181 #define V_icmp6errppslim VNET_INET6(icmp6errppslim)
182 #define V_icmp6errppslim_last VNET_INET6(icmp6errppslim_last)
183 #define V_icmp6stat VNET_INET6(icmp6stat)
184 #define V_in6_ifaddr VNET_INET6(in6_ifaddr)
185 #define V_in6_maxmtu VNET_INET6(in6_maxmtu)
186 #define V_in6_tmpaddrtimer_ch VNET_INET6(in6_tmpaddrtimer_ch)
187 #define V_ip6_accept_rtadv VNET_INET6(ip6_accept_rtadv)
188 #define V_ip6_auto_flowlabel VNET_INET6(ip6_auto_flowlabel)
189 #define V_ip6_auto_linklocal VNET_INET6(ip6_auto_linklocal)
190 #define V_ip6_dad_count VNET_INET6(ip6_dad_count)
191 #define V_ip6_defhlim VNET_INET6(ip6_defhlim)
192 #define V_ip6_defmcasthlim VNET_INET6(ip6_defmcasthlim)
193 #define V_ip6_desync_factor VNET_INET6(ip6_desync_factor)
194 #define V_ip6_forward_rt VNET_INET6(ip6_forward_rt)
195 #define V_ip6_forward_srcrt VNET_INET6(ip6_forward_srcrt)
196 #define V_ip6_forwarding VNET_INET6(ip6_forwarding)
197 #define V_ip6_hdrnestlimit VNET_INET6(ip6_hdrnestlimit)
198 #define V_ip6_keepfaith VNET_INET6(ip6_keepfaith)
199 #define V_ip6_log_interval VNET_INET6(ip6_log_interval)
200 #define V_ip6_log_time VNET_INET6(ip6_log_time)
201 #define V_ip6_maxfragpackets VNET_INET6(ip6_maxfragpackets)
202 #define V_ip6_maxfrags VNET_INET6(ip6_maxfrags)
203 #define V_ip6_mcast_pmtu VNET_INET6(ip6_mcast_pmtu)
204 #define V_ip6_mrouter_ver VNET_INET6(ip6_mrouter_ver)
205 #define V_ip6_opts VNET_INET6(ip6_opts)
206 #define V_ip6_ours_check_algorithm VNET_INET6(ip6_ours_check_algorithm)
207 #define V_ip6_prefer_tempaddr VNET_INET6(ip6_prefer_tempaddr)
208 #define V_ip6_rr_prune VNET_INET6(ip6_rr_prune)
209 #define V_ip6_sendredirects VNET_INET6(ip6_sendredirects)
210 #define V_ip6_sourcecheck VNET_INET6(ip6_sourcecheck)
211 #define V_ip6_sourcecheck_interval VNET_INET6(ip6_sourcecheck_interval)
212 #define V_ip6_temp_preferred_lifetime VNET_INET6(ip6_temp_preferred_lifetime)
213 #define V_ip6_temp_regen_advance VNET_INET6(ip6_temp_regen_advance)
214 #define V_ip6_temp_valid_lifetime VNET_INET6(ip6_temp_valid_lifetime)
215 #define V_ip6_use_defzone VNET_INET6(ip6_use_defzone)
216 #define V_ip6_use_deprecated VNET_INET6(ip6_use_deprecated)
217 #define V_ip6_use_tempaddr VNET_INET6(ip6_use_tempaddr)
218 #define V_ip6_v6only VNET_INET6(ip6_v6only)
219 #define V_ip6q VNET_INET6(ip6q)
220 #define V_ip6qmaxlen VNET_INET6(ip6qmaxlen)
221 #define V_ip6stat VNET_INET6(ip6stat)
222 #define V_ip6stealth VNET_INET6(ip6stealth)
223 #define V_llinfo_nd6 VNET_INET6(llinfo_nd6)
224 #define V_mrt6debug VNET_INET6(mrt6debug)
225 #define V_nd6_allocated VNET_INET6(nd6_allocated)
226 #define V_nd6_debug VNET_INET6(nd6_debug)
227 #define V_nd6_defifindex VNET_INET6(nd6_defifindex)
228 #define V_nd6_defifp VNET_INET6(nd6_defifp)
229 #define V_nd6_delay VNET_INET6(nd6_delay)
230 #define V_nd6_gctimer VNET_INET6(nd6_gctimer)
231 #define V_nd6_inuse VNET_INET6(nd6_inuse)
232 #define V_nd6_maxndopt VNET_INET6(nd6_maxndopt)
233 #define V_nd6_maxnudhint VNET_INET6(nd6_maxnudhint)
234 #define V_nd6_maxqueuelen VNET_INET6(nd6_maxqueuelen)
235 #define V_nd6_mmaxtries VNET_INET6(nd6_mmaxtries)
236 #define V_nd6_onlink_ns_rfc4861 VNET_INET6(nd6_onlink_ns_rfc4861)
237 #define V_nd6_prune VNET_INET6(nd6_prune)
238 #define V_nd6_recalc_reachtm_interval VNET_INET6(nd6_recalc_reachtm_interval)
239 #define V_nd6_slowtimo_ch VNET_INET6(nd6_slowtimo_ch)
240 #define V_nd6_timer_ch VNET_INET6(nd6_timer_ch)
241 #define V_nd6_umaxtries VNET_INET6(nd6_umaxtries)
242 #define V_nd6_useloopback VNET_INET6(nd6_useloopback)
243 #define V_nd_defrouter VNET_INET6(nd_defrouter)
244 #define V_nd_prefix VNET_INET6(nd_prefix)
245 #define V_pim6 VNET_INET6(pim6)
246 #define V_pmtu_expire VNET_INET6(pmtu_expire)
247 #define V_pmtu_probe VNET_INET6(pmtu_probe)
248 #define V_rip6_recvspace VNET_INET6(rip6_recvspace)
249 #define V_rip6_sendspace VNET_INET6(rip6_sendspace)
250 #define V_rip6stat VNET_INET6(rip6stat)
251 #define V_rtq_minreallyold6 VNET_INET6(rtq_minreallyold6)
252 #define V_rtq_mtutimer VNET_INET6(rtq_mtutimer)
253 #define V_rtq_reallyold6 VNET_INET6(rtq_reallyold6)
254 #define V_rtq_timeout6 VNET_INET6(rtq_timeout6)
255 #define V_rtq_timer6 VNET_INET6(rtq_timer6)
256 #define V_rtq_toomany6 VNET_INET6(rtq_toomany6)
257 #define V_sid_default VNET_INET6(sid_default)
258 #define V_udp6_recvspace VNET_INET6(udp6_recvspace)
259 #define V_udp6_sendspace VNET_INET6(udp6_sendspace)
261 #endif /* !_NETINET6_VINET6_H_ */