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

Function ifnet_byindex

freebsd/net/if.c:340–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address");
339
340struct ifnet *
341ifnet_byindex(u_short idx)
342{
343 struct ifnet *ifp;
344
345 if (__predict_false(idx > V_if_index))
346 return (NULL);
347
348 ifp = *(struct ifnet * const volatile *)(V_ifindex_table + idx);
349 return (__predict_false(ifp == IFNET_HOLD) ? NULL : ifp);
350}
351
352struct ifnet *
353ifnet_byindex_ref(u_short idx)

Callers 15

udp_v4mapped_pktinfoFunction · 0.85
inp_block_unblock_sourceFunction · 0.85
inp_get_source_filtersFunction · 0.85
inp_leave_groupFunction · 0.85
inp_set_multicast_ifFunction · 0.85
inp_set_source_filtersFunction · 0.85
sysctl_ip_mcast_filtersFunction · 0.85
sysctl_igmp_ifinfoFunction · 0.85
igmp_intrFunction · 0.85
sysctl_mld_ifinfoFunction · 0.85
mld_dispatch_packetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected