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

Function if_purgemaddrs

freebsd/net/if.c:1095–1107  ·  view source on GitHub ↗

* Remove any multicast network addresses from an interface when an ifnet * is going away. */

Source from the content-addressed store, hash-verified

1093 * is going away.
1094 */
1095static void
1096if_purgemaddrs(struct ifnet *ifp)
1097{
1098 struct ifmultiaddr *ifma;
1099
1100 IF_ADDR_WLOCK(ifp);
1101 while (!CK_STAILQ_EMPTY(&ifp->if_multiaddrs)) {
1102 ifma = CK_STAILQ_FIRST(&ifp->if_multiaddrs);
1103 CK_STAILQ_REMOVE(&ifp->if_multiaddrs, ifma, ifmultiaddr, ifma_link);
1104 if_delmulti_locked(ifp, ifma, 1);
1105 }
1106 IF_ADDR_WUNLOCK(ifp);
1107}
1108
1109/*
1110 * Detach an interface, removing it from the list of "active" interfaces.

Callers 1

if_detach_internalFunction · 0.85

Calls 1

if_delmulti_lockedFunction · 0.85

Tested by

no test coverage detected