VirtualBox

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


Ignore:
Timestamp:
Jan 14, 2010 10:59:36 AM (15 years ago)
Author:
vboxsync
Message:

VBoxNetAdpCtl, Main/NetIf: multiple vboxnet instance fixes for Solaris.

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

Legend:

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

    r25819 r25826  
    28532853            }
    28542854            else
     2855            {
     2856#ifdef RT_OS_SOLARIS
     2857                /** Grab the IP number from the 'vboxnetX' instance number and add one (at least on Solaris) */
     2858                const char *pszInstance = pszHifName;
     2859                pszInstance += sizeof("vboxnet") - 1;
     2860                int Instance = atoi(pszInstance);
     2861                Instance++;
     2862                char szDefaultIPV4Addr[sizeof(VBOXNET_IPV4ADDR_DEFAULT) + 1];
     2863                RTStrPrintf(szDefaultIPV4Addr, sizeof(szDefaultIPV4Addr), "%s%d", VBOXNET_IPV4NETPREFIX_DEFAULT, Instance);
     2864                hrc = hostInterface->EnableStaticIpConfig(Bstr(szDefaultIPV4Addr),
     2865                                                          Bstr(VBOXNET_IPV4MASK_DEFAULT));
     2866#else
    28552867                hrc = hostInterface->EnableStaticIpConfig(Bstr(VBOXNET_IPV4ADDR_DEFAULT),
    28562868                                                          Bstr(VBOXNET_IPV4MASK_DEFAULT));
     2869#endif
     2870            }
     2871           
    28572872            ComAssertComRC(hrc); /** @todo r=bird: Why this isn't fatal? (H()) */
    28582873
  • trunk/src/VBox/Main/include/netif.h

    r22211 r25826  
    2727#include <iprt/asm.h>
    2828
    29 #define VBOXNET_IPV4ADDR_DEFAULT "192.168.56.1"
    30 #define VBOXNET_IPV4MASK_DEFAULT "255.255.255.0"
     29#define VBOXNET_IPV4ADDR_DEFAULT      "192.168.56.1"
     30#define VBOXNET_IPV4NETPREFIX_DEFAULT "192.168.56."
     31#define VBOXNET_IPV4MASK_DEFAULT      "255.255.255.0"
    3132
    3233#define VBOXNET_MAX_SHORT_NAME 50
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