FreeBSD/sys/net/if_clone.c
/*
 * Unregister a network interface cloner.
 */
Unregister a network interface cloner.
Unregister a network interface cloner .
void
if_clone_detach(struct if_clone *ifc)
{
	IF_CLONERS_LOCK();
	LIST_REMOVE(ifc, ifc_list);
	V_if_cloners_count--;
	IF_CLONERS_UNLOCK();
	if (ifc->ifc_type == SIMPLE)
		ifc->ifcs_minifs = 0;
	while (!LIST_EMPTY(&ifc->ifc_iflist))
		if_clone_destroyif(ifc, LIST_FIRST(&ifc->ifc_iflist));
	IF_CLONE_REMREF(ifc);
}
void if_clone_detach ( struct if_clone * ifc ) { IF_CLONERS_LOCK ( ) ; LIST_REMOVE ( ifc , ifc_list ) ; V_if_cloners_count -- ; IF_CLONERS_UNLOCK ( ) ; if ( ifc -> ifc_type == SIMPLE ) ifc -> ifcs_minifs = 0 ; while ( ! LIST_EMPTY ( & ifc -> ifc_iflist ) ) if_clone_destroyif ( ifc , LIST_FIRST ( & ifc -> ifc_iflist ) ) ; IF_CLONE_REMREF ( ifc ) ; }
Unregister a network interface cloner.
Unregister a network interface cloner .
/* Allow all simples to be destroyed */ /* destroy all interfaces for this cloner */