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_rtr.c,v 1.111 2001/04/27 01:37:15 jinmei Exp $ 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet6/nd6_rtr.c 241916 2012-10-22 21:49:56Z delphij $"); |
34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/malloc.h> 41#include <sys/mbuf.h> --- 21 unchanged lines hidden (view full) --- 63#include <netinet/ip6.h> 64#include <netinet6/ip6_var.h> 65#include <netinet6/nd6.h> 66#include <netinet/icmp6.h> 67#include <netinet6/scope6_var.h> 68 69static int rtpref(struct nd_defrouter *); 70static struct nd_defrouter *defrtrlist_update(struct nd_defrouter *); |
71static int prelist_update(struct nd_prefixctl *, struct nd_defrouter *, 72 struct mbuf *, int); 73static struct in6_ifaddr *in6_ifadd(struct nd_prefixctl *, int); 74static struct nd_pfxrouter *pfxrtr_lookup(struct nd_prefix *, 75 struct nd_defrouter *); |
76static void pfxrtr_add(struct nd_prefix *, struct nd_defrouter *); 77static void pfxrtr_del(struct nd_pfxrouter *); 78static struct nd_pfxrouter *find_pfxlist_reachable_router 79(struct nd_prefix *); 80static void defrouter_delreq(struct nd_defrouter *); 81static void nd6_rtmsg(int, struct rtentry *); 82 83static int in6_init_prefix_ltimes(struct nd_prefix *); |
84static void in6_init_address_ltimes(struct nd_prefix *, 85 struct in6_addrlifetime *); |
86 87static int nd6_prefix_onlink(struct nd_prefix *); 88static int nd6_prefix_offlink(struct nd_prefix *); 89 90static int rt6_deleteroute(struct radix_node *, void *); 91 92VNET_DECLARE(int, nd6_recalc_reachtm_interval); 93#define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval) --- 2074 unchanged lines hidden --- |