s = splimp();
s = splnet();
vr_ioctl(ifp, command, data)	struct ifnet		*ifp;	u_long			command;	caddr_t			data;{	struct vr_softc		*sc = ifp->if_softc;	struct ifreq		*ifr = (struct ifreq *) data;	int			s, error = 0;	struct ifaddr *ifa = (struct ifaddr *)data;	s = splimp();	if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {		splx(s);		return error;	}	switch(command) {	case SIOCSIFADDR:		ifp->if_flags |= IFF_UP;		switch (ifa->ifa_addr->sa_family) {#ifdef INET		case AF_INET:			vr_init(sc);			arp_ifinit(&sc->arpcom, ifa);			break;#endif	/* INET */		default:			vr_init(sc);			break;		}		break;	case SIOCSIFFLAGS:		if (ifp->if_flags & IFF_UP) {			vr_init(sc);		} else {			if (ifp->if_flags & IFF_RUNNING)				vr_stop(sc);		}		error = 0;		break;	case SIOCADDMULTI:	case SIOCDELMULTI:		error = (command == SIOCADDMULTI) ?		    ether_addmulti(ifr, &sc->arpcom) :		    ether_delmulti(ifr, &sc->arpcom);		if (error == ENETRESET) {			/*			 * Multicast list has changed; set the hardware			 * filter accordingly.			 */			if (ifp->if_flags & IFF_RUNNING)				vr_setmulti(sc);			error = 0;		}		break;	case SIOCGIFMEDIA:	case SIOCSIFMEDIA:		error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);		break;	default:		error = EINVAL;		break;	}	splx(s);	return(error);}