Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/nd6.c
Show All 30 Lines | |||||
* $KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $ | * $KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $ | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_route.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#include <sys/callout.h> | #include <sys/callout.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
▲ Show 20 Lines • Show All 1,518 Lines • ▼ Show 20 Lines | nd6_free_redirect(const struct llentry *ln) | ||||
for (fibnum = 0; fibnum < rt_numfibs; fibnum++) | for (fibnum = 0; fibnum < rt_numfibs; fibnum++) | ||||
rib_action(fibnum, RTM_DELETE, &info, &rc); | rib_action(fibnum, RTM_DELETE, &info, &rc); | ||||
NET_EPOCH_EXIT(et); | NET_EPOCH_EXIT(et); | ||||
} | } | ||||
/* | /* | ||||
* Updates status of the default router route. | * Updates status of the default router route. | ||||
*/ | */ | ||||
void | static void | ||||
nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *arg) | check_release_defrouter(struct rib_cmd_info *rc, void *_cbdata) | ||||
{ | { | ||||
struct nd_defrouter *dr; | struct nd_defrouter *dr; | ||||
struct nhop_object *nh; | struct nhop_object *nh; | ||||
if (rc->rc_cmd == RTM_DELETE) { | |||||
nh = rc->rc_nh_old; | nh = rc->rc_nh_old; | ||||
if (nh->nh_flags & NHF_DEFAULT) { | if ((nh != NULL) && (nh->nh_flags & NHF_DEFAULT)) { | ||||
dr = defrouter_lookup(&nh->gw6_sa.sin6_addr, nh->nh_ifp); | dr = defrouter_lookup(&nh->gw6_sa.sin6_addr, nh->nh_ifp); | ||||
if (dr != NULL) { | if (dr != NULL) { | ||||
dr->installed = 0; | dr->installed = 0; | ||||
defrouter_rele(dr); | defrouter_rele(dr); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
void | |||||
nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *arg) | |||||
{ | |||||
#ifdef ROUTE_MPATH | |||||
rib_decompose_notification(rc, check_release_defrouter, NULL); | |||||
#else | |||||
check_release_defrouter(rc, NULL); | |||||
#endif | |||||
} | } | ||||
int | int | ||||
nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) | nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) | ||||
{ | { | ||||
struct in6_ndireq *ndi = (struct in6_ndireq *)data; | struct in6_ndireq *ndi = (struct in6_ndireq *)data; | ||||
struct in6_nbrinfo *nbi = (struct in6_nbrinfo *)data; | struct in6_nbrinfo *nbi = (struct in6_nbrinfo *)data; | ||||
struct in6_ndifreq *ndif = (struct in6_ndifreq *)data; | struct in6_ndifreq *ndif = (struct in6_ndifreq *)data; | ||||
▲ Show 20 Lines • Show All 1,049 Lines • Show Last 20 Lines |