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

Function if_delmulti

freebsd/net/if.c:3590–3613  ·  view source on GitHub ↗

* Delete a multicast group membership by network-layer group address. * * Returns ENOENT if the entry could not be found. If ifp no longer * exists, results are undefined. This entry point should only be used * from subsystems which do appropriate locking to hold ifp for the * duration of the call. * Network-layer protocol domains must use if_delmulti_ifma(). */

Source from the content-addressed store, hash-verified

3588 * Network-layer protocol domains must use if_delmulti_ifma().
3589 */
3590int
3591if_delmulti(struct ifnet *ifp, struct sockaddr *sa)
3592{
3593 struct ifmultiaddr *ifma;
3594 int lastref;
3595
3596 KASSERT(ifp, ("%s: NULL ifp", __func__));
3597
3598 IF_ADDR_WLOCK(ifp);
3599 lastref = 0;
3600 ifma = if_findmulti(ifp, sa);
3601 if (ifma != NULL)
3602 lastref = if_delmulti_locked(ifp, ifma, 0);
3603 IF_ADDR_WUNLOCK(ifp);
3604
3605 if (ifma == NULL)
3606 return (ENOENT);
3607
3608 if (lastref && ifp->if_ioctl != NULL) {
3609 (void)(*ifp->if_ioctl)(ifp, SIOCDELMULTI, 0);
3610 }
3611
3612 return (0);
3613}
3614
3615/*
3616 * Delete all multicast group membership for an interface.

Callers 4

ifhwioctlFunction · 0.85
vlan_setmultiFunction · 0.85
vlan_unconfig_lockedFunction · 0.85
ng_ether_rcvmsgFunction · 0.85

Calls 2

if_findmultiFunction · 0.85
if_delmulti_lockedFunction · 0.85

Tested by

no test coverage detected