* Remove a group from an interface */
| 1607 | * Remove a group from an interface |
| 1608 | */ |
| 1609 | int |
| 1610 | if_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 |
no test coverage detected