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

Function if_delgroup

freebsd/net/if.c:1609–1626  ·  view source on GitHub ↗

* Remove a group from an interface */

Source from the content-addressed store, hash-verified

1607 * Remove a group from an interface
1608 */
1609int
1610if_delgroup(struct ifnet *ifp, const char *groupname)
1611{
1612 struct ifg_list *ifgl;
1613
1614 IFNET_WLOCK();
1615 CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next)
1616 if (strcmp(ifgl->ifgl_group->ifg_group, groupname) == 0)
1617 break;
1618 if (ifgl == NULL) {
1619 IFNET_WUNLOCK();
1620 return (ENOENT);
1621 }
1622
1623 _if_delgroup_locked(ifp, ifgl, groupname);
1624
1625 return (0);
1626}
1627
1628/*
1629 * Remove an interface from all groups

Callers 2

ifhwioctlFunction · 0.85
if_clone_destroyifFunction · 0.85

Calls 2

strcmpFunction · 0.85
_if_delgroup_lockedFunction · 0.85

Tested by

no test coverage detected