VirtualBox

Changeset 5283 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Oct 12, 2007 11:21:09 PM (17 years ago)
Author:
vboxsync
Message:

internal networking fixes.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

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

    r4800 r5283  
    991991    if (    uOperation >= VMMR0_DO_SRV_START
    992992        &&  uOperation <  VMMR0_DO_SRV_END)
    993 #if 0 /** @todo fix internal networking */
    994         rc = SUPCallVMMR0Ex(pDrvIns->Internal.s.pVM->pVMR0, uOperation, pvArg, cbArg);
    995 #else
    996 {
    997 LogRel(("Sorry, internal networking is currently broken in the devlopment tree. Will be fixed in a bit, no time right now.\n"));
    998 rc = VERR_NOT_IMPLEMENTED;
    999 }
    1000 #endif
     993        rc = SUPCallVMMR0Ex(pDrvIns->Internal.s.pVM->pVMR0, uOperation, 0, (PSUPVMMR0REQHDR)pvArg);
    1001994    else
    1002995    {
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r5274 r5283  
    832832
    833833
    834 #if 0//def VBOX_WITH_INTERNAL_NETWORKING - currently busted
    835         /*
    836          * Services.
     834#ifdef VBOX_WITH_INTERNAL_NETWORKING
     835        /*
     836         * Requests to the internal networking service.
    837837         */
    838838        case VMMR0_DO_INTNET_OPEN:
     839            if (!pVM || u64Arg)
     840                return VERR_INVALID_PARAMETER;
     841            if (!g_pIntNet)
     842                return VERR_NOT_SUPPORTED;
     843            return INTNETR0OpenReq(g_pIntNet, pVM->pSession, (PINTNETOPENREQ)pReqHdr);
     844
    839845        case VMMR0_DO_INTNET_IF_CLOSE:
     846            if (!pVM || u64Arg)
     847                return VERR_INVALID_PARAMETER;
     848            if (!g_pIntNet)
     849                return VERR_NOT_SUPPORTED;
     850            return INTNETR0IfCloseReq(g_pIntNet, (PINTNETIFCLOSEREQ)pReqHdr);
     851
    840852        case VMMR0_DO_INTNET_IF_GET_RING3_BUFFER:
     853            if (!pVM || u64Arg)
     854                return VERR_INVALID_PARAMETER;
     855            if (!g_pIntNet)
     856                return VERR_NOT_SUPPORTED;
     857            return INTNETR0IfGetRing3BufferReq(g_pIntNet, (PINTNETIFGETRING3BUFFERREQ)pReqHdr);
     858
    841859        case VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE:
     860            if (!pVM || u64Arg)
     861                return VERR_INVALID_PARAMETER;
     862            if (!g_pIntNet)
     863                return VERR_NOT_SUPPORTED;
     864            return INTNETR0IfSetPromiscuousModeReq(g_pIntNet, (PINTNETIFSETPROMISCUOUSMODEREQ)pReqHdr);
     865
    842866        case VMMR0_DO_INTNET_IF_SEND:
     867            if (!pVM || u64Arg)
     868                return VERR_INVALID_PARAMETER;
     869            if (!g_pIntNet)
     870                return VERR_NOT_SUPPORTED;
     871            return INTNETR0IfSendReq(g_pIntNet, (PINTNETIFSENDREQ)pReqHdr);
     872
    843873        case VMMR0_DO_INTNET_IF_WAIT:
    844         {
    845             /*
    846              * Validate arguments a bit first.
    847              */
    848             if (!VALID_PTR(pvArg))
    849                 return VERR_INVALID_POINTER;
    850             if (!VALID_PTR(pVM))
    851                 return VERR_INVALID_POINTER;
    852             if (pVM->pVMR0 != pVM)
    853                 return VERR_INVALID_POINTER;
    854             if (!VALID_PTR(pVM->pSession))
    855                 return VERR_INVALID_POINTER;
     874            if (!pVM || u64Arg)
     875                return VERR_INVALID_PARAMETER;
    856876            if (!g_pIntNet)
    857                 return VERR_FILE_NOT_FOUND; ///@todo fix this status code!
    858 
    859             /*
    860              * Unpack the arguments and call the service.
    861              */
    862             switch (enmOperation)
    863             {
    864                 case VMMR0_DO_INTNET_OPEN:
    865                 {
    866                     PINTNETOPENARGS pArgs = (PINTNETOPENARGS)pvArg;
    867                     return INTNETR0Open(g_pIntNet, pVM->pSession, &pArgs->szNetwork[0], pArgs->cbSend, pArgs->cbRecv, pArgs->fRestrictAccess, &pArgs->hIf);
    868                 }
    869 
    870                 case VMMR0_DO_INTNET_IF_CLOSE:
    871                 {
    872                     PINTNETIFCLOSEARGS pArgs = (PINTNETIFCLOSEARGS)pvArg;
    873                     return INTNETR0IfClose(g_pIntNet, pArgs->hIf);
    874                 }
    875 
    876                 case VMMR0_DO_INTNET_IF_GET_RING3_BUFFER:
    877                 {
    878                     PINTNETIFGETRING3BUFFERARGS pArgs = (PINTNETIFGETRING3BUFFERARGS)pvArg;
    879                     return INTNETR0IfGetRing3Buffer(g_pIntNet, pArgs->hIf, &pArgs->pRing3Buf);
    880                 }
    881 
    882                 case VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE:
    883                 {
    884                     PINTNETIFSETPROMISCUOUSMODEARGS pArgs = (PINTNETIFSETPROMISCUOUSMODEARGS)pvArg;
    885                     return INTNETR0IfSetPromiscuousMode(g_pIntNet, pArgs->hIf, pArgs->fPromiscuous);
    886                 }
    887 
    888                 case VMMR0_DO_INTNET_IF_SEND:
    889                 {
    890                     PINTNETIFSENDARGS pArgs = (PINTNETIFSENDARGS)pvArg;
    891                     return INTNETR0IfSend(g_pIntNet, pArgs->hIf, pArgs->pvFrame, pArgs->cbFrame);
    892                 }
    893 
    894                 case VMMR0_DO_INTNET_IF_WAIT:
    895                 {
    896                     PINTNETIFWAITARGS pArgs = (PINTNETIFWAITARGS)pvArg;
    897                     return INTNETR0IfWait(g_pIntNet, pArgs->hIf, pArgs->cMillies);
    898                 }
    899 
    900                 default:
    901                     return VERR_NOT_SUPPORTED;
    902             }
    903         }
     877                return VERR_NOT_SUPPORTED;
     878            return INTNETR0IfWaitReq(g_pIntNet, (PINTNETIFWAITREQ)pReqHdr);
    904879#endif /* VBOX_WITH_INTERNAL_NETWORKING */
    905880
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