FreeBSD/sys/net/if_vlan.c
/*
 * Return the trunk device for a virtual interface.
 */
Return the trunk device for a virtual interface.
Return the trunk device for a virtual interface .
static struct ifnet  *
vlan_trunkdev(struct ifnet *ifp)
{
	struct ifvlan *ifv;
	if (ifp->if_type != IFT_L2VLAN)
		return (NULL);
	ifv = ifp->if_softc;
	ifp = NULL;
	VLAN_LOCK();
	if (ifv->ifv_trunk)
		ifp = PARENT(ifv);
	VLAN_UNLOCK();
	return (ifp);
}
static struct ifnet * vlan_trunkdev ( struct ifnet * ifp ) { struct ifvlan * ifv ; if ( ifp -> if_type != IFT_L2VLAN ) return ( NULL ) ; ifv = ifp -> if_softc ; ifp = NULL ; VLAN_LOCK ( ) ; if ( ifv -> ifv_trunk ) ifp = PARENT ( ifv ) ; VLAN_UNLOCK ( ) ; return ( ifp ) ; }
Return the trunk device for a virtual interface.
Return the trunk device for a virtual interface .