VirtualBox

Changeset 25829 in vbox


Ignore:
Timestamp:
Jan 14, 2010 2:26:58 PM (15 years ago)
Author:
vboxsync
Message:

Solaris/Main/VBoxNet: use different network for auto vboxnet IP assigning.

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

Legend:

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

    r25827 r25829  
    28552855            {
    28562856#ifdef RT_OS_SOLARIS
    2857                 /* Grab the IP number from the 'vboxnetX' instance number and add one (at least on Solaris) */
     2857                /* Grab the IP number from the 'vboxnetX' instance number */
    28582858                const char *pszInstance = pszHifName;
    28592859                pszInstance += sizeof("vboxnet") - 1;
    2860                 int Instance = atoi(pszInstance);
    2861                 Instance++;
     2860                int Instance = VBOXNET_IPV4NETPREFIX_DEFAULT + atoi(pszInstance);
    28622861                char szDefaultIPV4Addr[sizeof(VBOXNET_IPV4ADDR_DEFAULT) + 1];
    2863                 RTStrPrintf(szDefaultIPV4Addr, sizeof(szDefaultIPV4Addr), "%s%d", VBOXNET_IPV4NETPREFIX_DEFAULT, Instance);
     2862                RTStrPrintf(szDefaultIPV4Addr, sizeof(szDefaultIPV4Addr), "%s%d.%d", VBOXNET_IPV4NET_DEFAULT, Instance, VBOXNET_IPV4NETHOST_DEFAULT);
    28642863                hrc = hostInterface->EnableStaticIpConfig(Bstr(szDefaultIPV4Addr),
    28652864                                                          Bstr(VBOXNET_IPV4MASK_DEFAULT));
  • trunk/src/VBox/Main/include/netif.h

    r25826 r25829  
    2828
    2929#define VBOXNET_IPV4ADDR_DEFAULT      "192.168.56.1"
    30 #define VBOXNET_IPV4NETPREFIX_DEFAULT "192.168.56."
     30#define VBOXNET_IPV4NET_DEFAULT       "192.168."
     31#define VBOXNET_IPV4NETPREFIX_DEFAULT 56
     32#define VBOXNET_IPV4NETHOST_DEFAULT   1
    3133#define VBOXNET_IPV4MASK_DEFAULT      "255.255.255.0"
    3234
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