nd6_nbr.c (197138) | nd6_nbr.c (207369) |
---|---|
1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * $KAME: nd6_nbr.c,v 1.86 2002/01/21 02:33:04 jinmei Exp $ 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * $KAME: nd6_nbr.c,v 1.86 2002/01/21 02:33:04 jinmei Exp $ 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet6/nd6_nbr.c 197138 2009-09-12 22:08:20Z hrs $"); | 33__FBSDID("$FreeBSD: head/sys/netinet6/nd6_nbr.c 207369 2010-04-29 11:52:42Z bz $"); |
34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipsec.h" 38#include "opt_carp.h" 39#include "opt_mpath.h" 40 41#include <sys/param.h> --- 42 unchanged lines hidden (view full) --- 84static struct dadq *nd6_dad_find(struct ifaddr *); 85static void nd6_dad_starttimer(struct dadq *, int); 86static void nd6_dad_stoptimer(struct dadq *); 87static void nd6_dad_timer(struct dadq *); 88static void nd6_dad_ns_output(struct dadq *, struct ifaddr *); 89static void nd6_dad_ns_input(struct ifaddr *); 90static void nd6_dad_na_input(struct ifaddr *); 91 | 34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipsec.h" 38#include "opt_carp.h" 39#include "opt_mpath.h" 40 41#include <sys/param.h> --- 42 unchanged lines hidden (view full) --- 84static struct dadq *nd6_dad_find(struct ifaddr *); 85static void nd6_dad_starttimer(struct dadq *, int); 86static void nd6_dad_stoptimer(struct dadq *); 87static void nd6_dad_timer(struct dadq *); 88static void nd6_dad_ns_output(struct dadq *, struct ifaddr *); 89static void nd6_dad_ns_input(struct ifaddr *); 90static void nd6_dad_na_input(struct ifaddr *); 91 |
92VNET_DEFINE(int, dad_ignore_ns); 93VNET_DEFINE(int, dad_maxtry); 94 | 92VNET_DEFINE(int, dad_ignore_ns) = 0; /* ignore NS in DAD - specwise incorrect*/ 93VNET_DEFINE(int, dad_maxtry) = 15; /* max # of *tries* to transmit DAD packet */ |
95#define V_dad_ignore_ns VNET(dad_ignore_ns) 96#define V_dad_maxtry VNET(dad_maxtry) 97 98/* 99 * Input a Neighbor Solicitation Message. 100 * 101 * Based on RFC 2461 102 * Based on RFC 2462 (duplicate address detection) --- 1016 unchanged lines hidden (view full) --- 1119 int dad_ns_ocount; /* NS sent so far */ 1120 int dad_ns_icount; 1121 int dad_na_icount; 1122 struct callout dad_timer_ch; 1123 struct vnet *dad_vnet; 1124}; 1125 1126static VNET_DEFINE(TAILQ_HEAD(, dadq), dadq); | 94#define V_dad_ignore_ns VNET(dad_ignore_ns) 95#define V_dad_maxtry VNET(dad_maxtry) 96 97/* 98 * Input a Neighbor Solicitation Message. 99 * 100 * Based on RFC 2461 101 * Based on RFC 2462 (duplicate address detection) --- 1016 unchanged lines hidden (view full) --- 1118 int dad_ns_ocount; /* NS sent so far */ 1119 int dad_ns_icount; 1120 int dad_na_icount; 1121 struct callout dad_timer_ch; 1122 struct vnet *dad_vnet; 1123}; 1124 1125static VNET_DEFINE(TAILQ_HEAD(, dadq), dadq); |
1126VNET_DEFINE(int, dad_init) = 0; |
|
1127#define V_dadq VNET(dadq) | 1127#define V_dadq VNET(dadq) |
1128 1129VNET_DEFINE(int, dad_init); | |
1130#define V_dad_init VNET(dad_init) 1131 1132static struct dadq * 1133nd6_dad_find(struct ifaddr *ifa) 1134{ 1135 struct dadq *dp; 1136 1137 for (dp = V_dadq.tqh_first; dp; dp = dp->dad_list.tqe_next) { --- 387 unchanged lines hidden --- | 1128#define V_dad_init VNET(dad_init) 1129 1130static struct dadq * 1131nd6_dad_find(struct ifaddr *ifa) 1132{ 1133 struct dadq *dp; 1134 1135 for (dp = V_dadq.tqh_first; dp; dp = dp->dad_list.tqe_next) { --- 387 unchanged lines hidden --- |