FreeBSD/sys/netinet6/nd6_rtr.c
/*
 * Look up a matching default router list entry and remove it. Returns true if a
 * matching entry was found, false otherwise.
 */
Look up a matching default router list entry and remove it. Returns true if a
matching entry was found, false otherwise.
Look up a matching default router list entry and remove it . Returns true if a matching entry was found false otherwise .
bool
defrouter_remove(struct in6_addr *addr, struct ifnet *ifp)
{
	struct nd_defrouter *dr;
	ND6_WLOCK();
	dr = defrouter_lookup_locked(addr, ifp);
	if (dr == NULL) {
		ND6_WUNLOCK();
		return (false);
	}
	defrouter_unlink(dr, NULL);
	ND6_WUNLOCK();
	defrouter_del(dr);
	defrouter_rele(dr);
	return (true);
}
bool defrouter_remove ( struct in6_addr * addr , struct ifnet * ifp ) { struct nd_defrouter * dr ; ND6_WLOCK ( ) ; dr = defrouter_lookup_locked ( addr , ifp ) ; if ( dr == NULL ) { ND6_WUNLOCK ( ) ; return ( false ) ; } defrouter_unlink ( dr , NULL ) ; ND6_WUNLOCK ( ) ; defrouter_del ( dr ) ; defrouter_rele ( dr ) ; return ( true ) ; }
Look up a matching default router list entry and remove it.
Look up a matching default router list entry and remove it .