VirtualBox

Changeset 10843 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Jul 23, 2008 9:49:52 PM (16 years ago)
Author:
vboxsync
Message:

intnet: Implemented activation on power on & resume, deactivation on power off and suspend, and setting/updating of the mac address.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r10806 r10843  
    670670DECLINLINE(bool) vmmR0IsValidSession(PVM pVM, PSUPDRVSESSION pClaimedSession, PSUPDRVSESSION pSession)
    671671{
    672     /* Only one out of the two */
    673     if (pVM && pSession)
     672    /* This must be set! */
     673    if (!pSession)
     674        return false;
     675
     676    /* Only one out of the two. */
     677    if (pVM && pClaimedSession)
    674678        return false;
    675679    if (pVM)
     
    909913                return VERR_NOT_SUPPORTED;
    910914            return INTNETR0IfSetPromiscuousModeReq(g_pIntNet, pSession, (PINTNETIFSETPROMISCUOUSMODEREQ)pReqHdr);
     915
     916        case VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS:
     917            if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSETMACADDRESSREQ)pReqHdr)->pSession, pSession))
     918                return VERR_INVALID_PARAMETER;
     919            if (!g_pIntNet)
     920                return VERR_NOT_SUPPORTED;
     921            return INTNETR0IfSetMacAddressReq(g_pIntNet, pSession, (PINTNETIFSETMACADDRESSREQ)pReqHdr);
     922
     923        case VMMR0_DO_INTNET_IF_SET_ACTIVE:
     924            if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSETACTIVEREQ)pReqHdr)->pSession, pSession))
     925                return VERR_INVALID_PARAMETER;
     926            if (!g_pIntNet)
     927                return VERR_NOT_SUPPORTED;
     928            return INTNETR0IfSetActiveReq(g_pIntNet, pSession, (PINTNETIFSETACTIVEREQ)pReqHdr);
    911929
    912930        case VMMR0_DO_INTNET_IF_SEND:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette