VirtualBox

Ignore:
Timestamp:
Feb 20, 2009 10:03:55 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43133
Message:

NetAdp: added a Real property to the IHostNetworkInterface, make the interface name be honored in VM settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetwork.cpp

    r16927 r16967  
    156156    mAdapter.SetCableConnected (mCbCable->isChecked());
    157157
    158     if (type == KNetworkAttachmentType_HostInterface)
     158    if (type == KNetworkAttachmentType_HostInterface
     159#if defined (Q_WS_WIN) && defined (VBOX_WITH_NETFLT)
     160            || type == KNetworkAttachmentType_HostOnly
     161#endif
     162            )
    159163    {
    160164#if defined (Q_WS_WIN) || defined (VBOX_WITH_NETFLT)
     
    715719    /* Load current inner list */
    716720    QList<QTreeWidgetItem*> itemsList;
    717     CHostNetworkInterfaceVector interfaces =
    718 #if defined(Q_WS_WIN) && defined(VBOX_WITH_NETFLT)
    719             enmAttachmentType == KNetworkAttachmentType_HostOnly ?
    720                     vboxGlobal().virtualBox().GetHost().GetTapInterfaces()
    721                     :
    722 #endif
    723                     vboxGlobal().virtualBox().GetHost().GetNetworkInterfaces();
     721    CHostNetworkInterfaceVector interfaces = vboxGlobal().virtualBox().GetHost().GetNetworkInterfaces();
    724722    for (CHostNetworkInterfaceVector::ConstIterator it = interfaces.begin();
    725723         it != interfaces.end(); ++it)
    726         itemsList << new VBoxNIListItem (it->GetName());
     724    {
     725#if defined(Q_WS_WIN) && defined(VBOX_WITH_NETFLT)
     726        /* display real for not host-only and viceversa */
     727        if((enmAttachmentType == KNetworkAttachmentType_HostOnly) != it->GetReal())
     728#endif
     729            itemsList << new VBoxNIListItem (it->GetName());
     730    }
    727731
    728732    /* Save current list item name */
     
    855859
    856860#if defined (Q_WS_WIN) || defined (VBOX_WITH_NETFLT)
    857         if (type == KNetworkAttachmentType_HostInterface &&
    858             page->interfaceName().isNull())
     861        if ((type == KNetworkAttachmentType_HostInterface
     862#if defined (Q_WS_WIN) && defined (VBOX_WITH_NETFLT)
     863                || type == KNetworkAttachmentType_HostOnly
     864#endif
     865                ) && page->interfaceName().isNull())
    859866        {
    860867            valid = false;
Note: See TracChangeset for help on using the changeset viewer.

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