VirtualBox

Changeset 5755 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Nov 15, 2007 1:03:25 PM (17 years ago)
Author:
vboxsync
Message:

Added new type of network device 'e1000'. Define VBOX_WITH_E1000 to activate.

Location:
trunk/src/VBox/Main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r5698 r5755  
    831831     * Network adapters
    832832     */
    833     rc = CFGMR3InsertNode(pDevices, "pcnet", &pDev);                                RC_CHECK();
    834     //rc = CFGMR3InsertNode(pDevices, "ne2000", &pDev);                               RC_CHECK();
     833    PCFGMNODE pDevPCNet = NULL;          /* PCNet-type devices */
     834    rc = CFGMR3InsertNode(pDevices, "pcnet", &pDevPCNet);                           RC_CHECK();
     835#ifdef VBOX_WITH_E1000
     836    PCFGMNODE pDevE1000 = NULL;          /* E1000-type devices */
     837    rc = CFGMR3InsertNode(pDevices, "e1000", &pDevE1000);                           RC_CHECK();
     838#endif
    835839    for (ULONG ulInstance = 0; ulInstance < SchemaDefs::NetworkAdapterCount; ulInstance++)
    836840    {
     
    841845        if (!fEnabled)
    842846            continue;
     847
     848        /*
     849        * The virtual hardware type. Create appropriate device first.
     850        */
     851        NetworkAdapterType_T adapterType;
     852        hrc = networkAdapter->COMGETTER(AdapterType)(&adapterType);                 H();
     853        switch (adapterType)
     854        {
     855            case NetworkAdapterType_NetworkAdapterAm79C970A:
     856            case NetworkAdapterType_NetworkAdapterAm79C973:
     857                pDev = pDevPCNet;
     858                break;
     859#ifdef VBOX_WITH_E1000
     860            case NetworkAdapterType_NetworkAdapter82540EM:
     861                pDev = pDevE1000;
     862                break;
     863#endif
     864            default:
     865                AssertMsgFailed(("Invalid network adapter type '%d' for slot '%d'",
     866                                 adapterType, ulInstance));
     867                return VERR_GENERAL_FAILURE;
     868        }
    843869
    844870        char szInstance[4]; Assert(ulInstance <= 999);
     
    855881
    856882        /*
    857          * The virtual hardware type.
    858          */
    859         NetworkAdapterType_T adapterType;
    860         hrc = networkAdapter->COMGETTER(AdapterType)(&adapterType);                 H();
     883        * The virtual hardware type. PCNet supports two types.
     884        */
    861885        switch (adapterType)
    862886        {
     
    867891                rc = CFGMR3InsertInteger(pCfg, "Am79C973", 1);                      RC_CHECK();
    868892                break;
    869             default:
    870                 AssertMsgFailed(("Invalid network adapter type '%d' for slot '%d'",
    871                                  adapterType, ulInstance));
    872                 return VERR_GENERAL_FAILURE;
    873893        }
    874894
  • trunk/src/VBox/Main/MachineImpl.cpp

    r5713 r5755  
    46904690            else if (adapterType.compare(Bstr("Am79C973")) == 0)
    46914691                mNetworkAdapters [slot]->COMSETTER(AdapterType)(NetworkAdapterType_NetworkAdapterAm79C973);
     4692#ifdef VBOX_WITH_E1000
     4693            else if (adapterType.compare(Bstr("82540EM")) == 0)
     4694                mNetworkAdapters [slot]->COMSETTER(AdapterType)(NetworkAdapterType_NetworkAdapter82540EM);
     4695#endif
    46924696            else
    46934697                ComAssertBreak (0, rc = E_FAIL);
  • trunk/src/VBox/Main/Makefile.kmk

    r5721 r5755  
    2222ifndef VBOX_OSE
    2323SUBDIRS_AFTER += webservice
     24DEFS          += VBOX_WITH_E1000
    2425endif
    2526
  • trunk/src/VBox/Main/NetworkAdapterImpl.cpp

    r5378 r5755  
    201201        case NetworkAdapterType_NetworkAdapterAm79C970A:
    202202        case NetworkAdapterType_NetworkAdapterAm79C973:
     203#ifdef VBOX_WITH_E1000
     204        case NetworkAdapterType_NetworkAdapter82540EM:
     205#endif
    203206            break;
    204207        default:
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r5713 r5755  
    73717371    <const name="NetworkAdapterAm79C970A"        value="1"/>
    73727372    <const name="NetworkAdapterAm79C973"         value="2"/>
     7373    <const name="NetworkAdapter82540EM"          value="3"/>
    73737374  </enum>
    73747375
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r5713 r5755  
    171171    <xsd:enumeration value="Am79C970A"/>
    172172    <xsd:enumeration value="Am79C973"/>
     173    <xsd:enumeration value="82540EM"/>
    173174  </xsd:restriction>
    174175</xsd:simpleType>
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