FreeBSD/sys/netinet6/ip6_output.c
/*
 * Calculates IPv6 path mtu for destination @dst.
 * Resulting MTU is stored in @mtup.
 *
 * Returns 0 on success.
 */
Calculates IPv6 path mtu for destination @dst.
Resulting MTU is stored in @mtup.

Returns 0 on success.
Calculates IPv6 path mtu for destination @dst . Resulting MTU is stored in @mtup . Returns 0 on success .
static int
ip6_getpmtu_ctl(u_int fibnum, const struct in6_addr *dst, u_long *mtup)
{
	struct nhop6_extended nh6;
	struct in6_addr kdst;
	uint32_t scopeid;
	struct ifnet *ifp;
	u_long mtu;
	int error;
	in6_splitscope(dst, &kdst, &scopeid);
	if (fib6_lookup_nh_ext(fibnum, &kdst, scopeid, NHR_REF, 0, &nh6) != 0)
		return (EHOSTUNREACH);
	ifp = nh6.nh_ifp;
	mtu = nh6.nh_mtu;
	error = ip6_calcmtu(ifp, dst, mtu, mtup, NULL);
	fib6_free_nh_ext(fibnum, &nh6);
	return (error);
}
static int ip6_getpmtu_ctl ( u_int fibnum , const struct in6_addr * dst , u_long * mtup ) { struct nhop6_extended nh6 ; struct in6_addr kdst ; uint32_t scopeid ; struct ifnet * ifp ; u_long mtu ; int error ; in6_splitscope ( dst , & kdst , & scopeid ) ; if ( fib6_lookup_nh_ext ( fibnum , & kdst , scopeid , NHR_REF , 0 , & nh6 ) != 0 ) return ( EHOSTUNREACH ) ; ifp = nh6 . nh_ifp ; mtu = nh6 . nh_mtu ; error = ip6_calcmtu ( ifp , dst , mtu , mtup , NULL ) ; fib6_free_nh_ext ( fibnum , & nh6 ) ; return ( error ) ; }
Calculates IPv6 path mtu for destination @dst.
Calculates IPv6 path mtu for destination @dst .