VirtualBox

Ignore:
Timestamp:
Nov 24, 2008 6:36:44 PM (16 years ago)
Author:
vboxsync
Message:

DrvVD: fix internal networking IP stuff, not available in OSE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DrvVD.cpp

    r14535 r14538  
    3535#include <iprt/tcp.h>
    3636
     37#ifndef VBOX_OSE
    3738/* All lwip header files are not C++ safe. So hack around this. */
    3839__BEGIN_DECLS
     
    4142#include <lwip/sockets.h>
    4243__END_DECLS
     44#endif /* !VBOX_OSE */
    4345
    4446#include "Builtins.h"
    4547
     48#ifndef VBOX_OSE
    4649/* Small hack to get at lwIP initialized status */
    4750extern bool DevINIPConfigured(void);
     51#endif /* !VBOX_OSE */
    4852
    4953
     
    329333
    330334
     335#ifndef VBOX_OSE
    331336/*******************************************************************************
    332337*   VD TCP network stack interface implementation - INIP case                  *
     
    483488    return VINF_SUCCESS;
    484489}
     490#endif /* !VBOX_OSE */
    485491
    486492
     
    919925        else
    920926        {
     927#ifdef VBOX_OSE
     928            rc = PDMDrvHlpVMSetError(pDrvIns, VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES,
     929                                     RT_SRC_POS, N_("DrvVD: Configuration error: TCP over Internal Networking not supported in VirtualBox OSE"));
     930#else /* !VBOX_OSE */
    921931            pThis->VDITcpNetCallbacks.cbSize = sizeof(VDINTERFACETCPNET);
    922932            pThis->VDITcpNetCallbacks.enmInterface = VDINTERFACETYPE_TCPNET;
     
    927937            pThis->VDITcpNetCallbacks.pfnWrite = drvvdINIPWrite;
    928938            pThis->VDITcpNetCallbacks.pfnFlush = drvvdINIPFlush;
    929         }
    930         rc = VDInterfaceAdd(&pThis->VDITcpNet, "DrvVD_INIP",
    931                             VDINTERFACETYPE_TCPNET,
    932                             &pThis->VDITcpNetCallbacks, NULL,
    933                             &pThis->pVDIfsDisk);
    934         AssertRC(rc);
    935 
    936         rc = VDCreate(pThis->pVDIfsDisk, &pThis->pDisk);
    937         /* Error message is already set correctly. */
     939#endif /* !VBOX_OSE */
     940        }
     941        if (RT_SUCCESS(rc))
     942        {
     943            rc = VDInterfaceAdd(&pThis->VDITcpNet, "DrvVD_INIP",
     944                                VDINTERFACETYPE_TCPNET,
     945                                &pThis->VDITcpNetCallbacks, NULL,
     946                                &pThis->pVDIfsDisk);
     947        }
     948        if (RT_SUCCESS(rc))
     949        {
     950            rc = VDCreate(pThis->pVDIfsDisk, &pThis->pDisk);
     951            /* Error message is already set correctly. */
     952        }
    938953    }
    939954
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