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

Function ifnet_byindex_ref

freebsd/net/if.c:352–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352struct ifnet *
353ifnet_byindex_ref(u_short idx)
354{
355 struct ifnet *ifp;
356
357 NET_EPOCH_ASSERT();
358
359 ifp = ifnet_byindex(idx);
360 if (ifp == NULL || (ifp->if_flags & IFF_DYING))
361 return (NULL);
362 if_ref(ifp);
363 return (ifp);
364}
365
366/*
367 * Allocate an ifindex array entry; return 0 on success or an error on

Callers 4

inp_join_groupFunction · 0.85
send_sendFunction · 0.85
sysctl_ifdataFunction · 0.85
get_aifpFunction · 0.85

Calls 2

ifnet_byindexFunction · 0.85
if_refFunction · 0.85

Tested by

no test coverage detected