VirtualBox

Ignore:
Timestamp:
Jun 12, 2009 3:28:26 PM (15 years ago)
Author:
vboxsync
Message:

NetworkAttachment: Allow changing the attachment between NONE/NAT/HIF/host-only/.. dynamically #3573

File:
1 edited

Legend:

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

    r20501 r20521  
    13641364        {
    13651365            case NetworkAttachmentType_Null:
     1366#ifdef VBOX_DYNAMIC_NET_ATTACH
     1367                pConsole->meAttachmentType[ulInstance] = NetworkAttachmentType_Null;
     1368#endif /* VBOX_DYNAMIC_NET_ATTACH */
    13661369                break;
    13671370
     
    14121415                    STR_FREE();
    14131416                }
     1417#ifdef VBOX_DYNAMIC_NET_ATTACH
     1418                pConsole->meAttachmentType[ulInstance] = NetworkAttachmentType_NAT;
     1419#endif /* VBOX_DYNAMIC_NET_ATTACH */
    14141420                break;
    14151421            }
     
    17451751# error "Port me"
    17461752#endif
     1753#ifdef VBOX_DYNAMIC_NET_ATTACH
     1754                    pConsole->meAttachmentType[ulInstance] = NetworkAttachmentType_Bridged;
     1755#endif /* VBOX_DYNAMIC_NET_ATTACH */
    17471756                }
    17481757                else
     
    17931802                    STR_FREE();
    17941803                }
     1804#ifdef VBOX_DYNAMIC_NET_ATTACH
     1805                pConsole->meAttachmentType[ulInstance] = NetworkAttachmentType_Internal;
     1806#endif /* VBOX_DYNAMIC_NET_ATTACH */
    17951807                break;
    17961808            }
     
    20042016                    hrc = hostInterface->EnableStaticIpConfigV6(tmpAddr, Utf8Str(tmpMask).toUInt32());
    20052017#endif
     2018#ifdef VBOX_DYNAMIC_NET_ATTACH
     2019                pConsole->meAttachmentType[ulInstance] = NetworkAttachmentType_HostOnly;
     2020#endif /* VBOX_DYNAMIC_NET_ATTACH */
    20062021                break;
    20072022            }
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