FreeBSD/sys/netinet6/nd6.c
/*
 * Rejuvenate this function for routing operations related
 * processing.
 */
Rejuvenate this function for routing operations related
processing.
Rejuvenate this function for routing operations related processing .
void
nd6_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info)
{
	struct sockaddr_in6 *gateway;
	struct nd_defrouter *dr;
	struct ifnet *ifp;
	gateway = (struct sockaddr_in6 *)rt->rt_gateway;
	ifp = rt->rt_ifp;
	switch (req) {
	case RTM_ADD:
		break;
	case RTM_DELETE:
		if (!ifp)
			return;
		if ((rt->rt_flags & RTF_GATEWAY) == 0)
			return;
		if (IN6_ARE_ADDR_EQUAL(&in6addr_any,
		    &SIN6(rt_key(rt))->sin6_addr)) {
			dr = defrouter_lookup(&gateway->sin6_addr, ifp);
			if (dr != NULL) {
				dr->installed = 0;
				defrouter_rele(dr);
			}
		}
		break;
	}
}
void nd6_rtrequest ( int req , struct rtentry * rt , struct rt_addrinfo * info ) { struct sockaddr_in6 * gateway ; struct nd_defrouter * dr ; struct ifnet * ifp ; gateway = ( struct sockaddr_in6 * ) rt -> rt_gateway ; ifp = rt -> rt_ifp ; switch ( req ) { case RTM_ADD : break ; case RTM_DELETE : if ( ! ifp ) return ; if ( ( rt -> rt_flags & RTF_GATEWAY ) == 0 ) return ; if ( IN6_ARE_ADDR_EQUAL ( & in6addr_any , & SIN6 ( rt_key ( rt ) ) -> sin6_addr ) ) { dr = defrouter_lookup ( & gateway -> sin6_addr , ifp ) ; if ( dr != NULL ) { dr -> installed = 0 ; defrouter_rele ( dr ) ; } } break ; } }
Rejuvenate this function for routing operations related
 processing.
Rejuvenate this function for routing operations related processing .
/*
		 * Only indirect routes are interesting.
		 */ /*
		 * check for default route
		 */