MCPcopy Create free account
hub / github.com/F-Stack/f-stack / fib4_lookup_debugnet

Function fib4_lookup_debugnet

freebsd/netinet/in_fib.c:316–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316struct nhop_object *
317fib4_lookup_debugnet(uint32_t fibnum, struct in_addr dst, uint32_t scopeid,
318 uint32_t flags)
319{
320 struct rtentry *rt;
321 struct route_nhop_data rnd;
322
323 rt = fib4_lookup_rt(fibnum, dst, scopeid, NHR_UNLOCKED, &rnd);
324 if (rt != NULL) {
325 struct nhop_object *nh = nhop_select(rnd.rnd_nhop, 0);
326 /* Ensure route & ifp is UP */
327 if (RT_LINK_IS_UP(nh->nh_ifp))
328 return (nh);
329 }
330
331 return (NULL);
332}
333
334#endif

Callers 1

debugnet_connectFunction · 0.85

Calls 2

fib4_lookup_rtFunction · 0.85
nhop_selectFunction · 0.85

Tested by

no test coverage detected