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

Function if_unlink_ifnet

freebsd/net/if.c:489–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489static bool
490if_unlink_ifnet(struct ifnet *ifp, bool vmove)
491{
492 struct ifnet *iter;
493 int found = 0;
494
495 IFNET_WLOCK();
496 CK_STAILQ_FOREACH(iter, &V_ifnet, if_link)
497 if (iter == ifp) {
498 CK_STAILQ_REMOVE(&V_ifnet, ifp, ifnet, if_link);
499 if (!vmove)
500 ifp->if_flags |= IFF_DYING;
501 found = 1;
502 break;
503 }
504#ifdef VIMAGE
505 curvnet->vnet_ifcnt--;
506#endif
507 IFNET_WUNLOCK();
508
509 return (found);
510}
511
512#ifdef VIMAGE
513static void

Callers 4

vnet_if_returnFunction · 0.85
if_detachFunction · 0.85
if_vmove_loanFunction · 0.85
if_vmove_reclaimFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected