Index: trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk	(revision 17418)
+++ trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk	(revision 17419)
@@ -58,4 +58,5 @@
  	VBoxManageUSB.cpp \
  	VBoxInternalManage.cpp \
+ 	VBoxManageHostonly.cpp \
  	$(if $(VBOX_WITH_GUEST_PROPS),VBoxManageGuestProp.cpp) \
  	VBoxManageSVN.cpp
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 17418)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 17419)
@@ -1724,4 +1724,5 @@
         { "import",           handleImportAppliance },
         { "export",           handleExportAppliance },
+        { "hostonlyif",       handleHostonlyIf },
         { NULL,               NULL }
     };
Index: trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
===================================================================
--- trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 17418)
+++ trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 17419)
@@ -188,4 +188,7 @@
 int handleUSBFilter(HandlerArg *a);
 
+/* VBoxManageHostonly.cpp */
+int handleHostonlyIf(HandlerArg *a);
+
 #endif /* !VBOX_ONLY_DOCS */
 unsigned long VBoxSVNRev();
Index: trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp
===================================================================
--- trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp	(revision 17418)
+++ trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp	(revision 17419)
@@ -80,8 +80,6 @@
     m.IPAddress = pIf->IPAddress.u;
     m.networkMask = pIf->IPNetMask.u;
-    m.defaultGateway = pIf->IPDefaultGateway.u;
     m.IPV6Address = composeIPv6Address(&pIf->IPv6Address);
     m.IPV6NetworkMask = composeIPv6Address(&pIf->IPv6NetMask);
-    m.IPV6DefaultGateway = composeIPv6Address(&pIf->IPV6DefaultGateway);
     m.hardwareAddress = composeHardwareAddress(&pIf->MACAddress);
 #ifdef RT_OS_WINDOWS
@@ -205,22 +203,4 @@
 }
 
-/**
- * Returns the default gateway of the host network interface.
- *
- * @returns COM status code
- * @param   aNetworkMask address of result pointer
- */
-STDMETHODIMP HostNetworkInterface::COMGETTER(DefaultGateway) (ULONG *aDefaultGateway)
-{
-    CheckComArgOutPointerValid(aDefaultGateway);
-
-    AutoCaller autoCaller (this);
-    CheckComRCReturnRC (autoCaller.rc());
-
-    *aDefaultGateway = m.defaultGateway;
-
-    return S_OK;
-}
-
 STDMETHODIMP HostNetworkInterface::COMGETTER(IPV6Supported) (BOOL *aIPV6Supported)
 {
@@ -269,22 +249,4 @@
 
 /**
- * Returns the IP V6 default gateway of the host network interface.
- *
- * @returns COM status code
- * @param   aIPV6DefaultGateway address of result pointer
- */
-STDMETHODIMP HostNetworkInterface::COMGETTER(IPV6DefaultGateway) (BSTR *aIPV6DefaultGateway)
-{
-    CheckComArgOutPointerValid(aIPV6DefaultGateway);
-
-    AutoCaller autoCaller (this);
-    CheckComRCReturnRC (autoCaller.rc());
-
-    m.IPV6DefaultGateway.cloneTo (aIPV6DefaultGateway);
-
-    return S_OK;
-}
-
-/**
  * Returns the hardware address of the host network interface.
  *
@@ -359,5 +321,5 @@
 }
 
-STDMETHODIMP HostNetworkInterface::EnableStaticIpConfig (ULONG aIPAddress, ULONG aNetworkMask, ULONG aDefaultGateway)
+STDMETHODIMP HostNetworkInterface::EnableStaticIpConfig (ULONG aIPAddress, ULONG aNetworkMask)
 {
 #ifndef VBOX_WITH_HOSTNETIF_API
@@ -367,5 +329,5 @@
     CheckComRCReturnRC (autoCaller.rc());
 
-    int rc = NetIfEnableStaticIpConfig(this, aIPAddress, aNetworkMask, aDefaultGateway);
+    int rc = NetIfEnableStaticIpConfig(this, aIPAddress, aNetworkMask);
     if (RT_FAILURE(rc))
     {
@@ -377,5 +339,5 @@
 }
 
-STDMETHODIMP HostNetworkInterface::EnableStaticIpConfigV6 (IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength, IN_BSTR aIPV6DefaultGateway)
+STDMETHODIMP HostNetworkInterface::EnableStaticIpConfigV6 (IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
 {
 #ifndef VBOX_WITH_HOSTNETIF_API
@@ -384,6 +346,4 @@
     if (!aIPV6Address)
         return E_INVALIDARG;
-    if (!aIPV6DefaultGateway)
-        return E_INVALIDARG;
     if (aIPV6MaskPrefixLength > 128)
         return E_INVALIDARG;
@@ -392,5 +352,5 @@
     CheckComRCReturnRC (autoCaller.rc());
 
-    int rc = NetIfEnableStaticIpConfigV6(this, aIPV6Address, aIPV6MaskPrefixLength, aIPV6DefaultGateway);
+    int rc = NetIfEnableStaticIpConfigV6(this, aIPV6Address, aIPV6MaskPrefixLength);
     if (RT_FAILURE(rc))
     {
Index: trunk/src/VBox/Main/darwin/NetIfList-darwin.cpp
===================================================================
--- trunk/src/VBox/Main/darwin/NetIfList-darwin.cpp	(revision 17418)
+++ trunk/src/VBox/Main/darwin/NetIfList-darwin.cpp	(revision 17419)
@@ -141,10 +141,10 @@
 }
 
-int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask, ULONG gw)
+int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask)
 {
     return VERR_NOT_IMPLEMENTED;
 }
 
-int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength, IN_BSTR aIPV6DefaultGateway)
+int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
 {
     return VERR_NOT_IMPLEMENTED;
Index: trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 17418)
+++ trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 17419)
@@ -6449,5 +6449,5 @@
   <interface
      name="IHostNetworkInterface" extends="$unknown"
-     uuid="b4467af7-9b16-479a-a812-c132cbd886a3"
+     uuid="a82f7de2-695b-4bb9-ac13-f033e5fd75c2"
      wsmap="managed"
      >
@@ -6474,8 +6474,4 @@
     </attribute>
 
-    <attribute name="defaultGateway" type="unsigned long" readonly="yes">
-      <desc>Returns the network mask of the interface.</desc>
-    </attribute>
-
     <attribute name="IPV6Supported" type="boolean" readonly="yes">
       <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
@@ -6487,8 +6483,4 @@
 
     <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
-      <desc>Returns the IP V6 network mask of the interface.</desc>
-    </attribute>
-
-    <attribute name="IPV6DefaultGateway" type="wstring" readonly="yes">
       <desc>Returns the IP V6 network mask of the interface.</desc>
     </attribute>
@@ -6522,9 +6514,4 @@
         </desc>
       </param>
-      <param name="defaultGateway" type="unsigned long" dir="in">
-        <desc>
-          default gateway.
-        </desc>
-      </param>
     </method>
 
@@ -6537,9 +6524,4 @@
       </param>
       <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
-        <desc>
-          network mask.
-        </desc>
-      </param>
-      <param name="IPV6DefaultGateway" type="wstring" dir="in">
         <desc>
           network mask.
Index: trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h
===================================================================
--- trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h	(revision 17418)
+++ trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h	(revision 17419)
@@ -71,9 +71,7 @@
     STDMETHOD(COMGETTER(IPAddress)) (ULONG *aIPAddress);
     STDMETHOD(COMGETTER(NetworkMask)) (ULONG *aNetworkMask);
-    STDMETHOD(COMGETTER(DefaultGateway)) (ULONG *aDefaultGateway);
     STDMETHOD(COMGETTER(IPV6Supported)) (BOOL *aIPV6Supported);
     STDMETHOD(COMGETTER(IPV6Address)) (BSTR *aIPV6Address);
     STDMETHOD(COMGETTER(IPV6NetworkMask)) (BSTR *aIPV6Mask);
-    STDMETHOD(COMGETTER(IPV6DefaultGateway)) (BSTR *aDefaultGateway);
     STDMETHOD(COMGETTER(HardwareAddress)) (BSTR *aHardwareAddress);
     STDMETHOD(COMGETTER(MediumType)) (HostNetworkInterfaceMediumType_T *aType);
@@ -81,6 +79,6 @@
     STDMETHOD(COMGETTER(InterfaceType)) (HostNetworkInterfaceType_T *aType);
 
-    STDMETHOD(EnableStaticIpConfig) (ULONG aIPAddress, ULONG aNetworkMask, ULONG aDefaultGateway);
-    STDMETHOD(EnableStaticIpConfigV6) (IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength, IN_BSTR aIPV6DefaultGateway);
+    STDMETHOD(EnableStaticIpConfig) (ULONG aIPAddress, ULONG aNetworkMask);
+    STDMETHOD(EnableStaticIpConfigV6) (IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength);
     STDMETHOD(EnableDynamicIpConfig) ();
 
@@ -95,5 +93,5 @@
     struct Data
     {
-        Data() : IPAddress (0), networkMask (0), defaultGateway(0),
+        Data() : IPAddress (0), networkMask (0),
             mediumType (HostNetworkInterfaceMediumType_Unknown),
             status(HostNetworkInterfaceStatus_Down){}
@@ -101,8 +99,6 @@
         ULONG IPAddress;
         ULONG networkMask;
-        ULONG defaultGateway;
         Bstr IPV6Address;
         Bstr IPV6NetworkMask;
-        Bstr IPV6DefaultGateway;
         Bstr hardwareAddress;
         HostNetworkInterfaceMediumType_T mediumType;
Index: trunk/src/VBox/Main/include/netif.h
===================================================================
--- trunk/src/VBox/Main/include/netif.h	(revision 17418)
+++ trunk/src/VBox/Main/include/netif.h	(revision 17419)
@@ -59,8 +59,6 @@
     RTNETADDRIPV4  IPAddress;
     RTNETADDRIPV4  IPNetMask;
-    RTNETADDRIPV4  IPDefaultGateway;
     RTNETADDRIPV6  IPv6Address;
     RTNETADDRIPV6  IPv6NetMask;
-    RTNETADDRIPV6  IPV6DefaultGateway;
     RTMAC          MACAddress;
     NETIFTYPE      enmMediumType;
@@ -78,6 +76,6 @@
 
 int NetIfList(std::list <ComObjPtr <HostNetworkInterface> > &list);
-int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask, ULONG gw);
-int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength, IN_BSTR aIPV6DefaultGateway);
+int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask);
+int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength);
 int NetIfEnableDynamicIpConfig(HostNetworkInterface * pIf);
 
Index: trunk/src/VBox/Main/linux/NetIfList-linux.cpp
===================================================================
--- trunk/src/VBox/Main/linux/NetIfList-linux.cpp	(revision 17418)
+++ trunk/src/VBox/Main/linux/NetIfList-linux.cpp	(revision 17419)
@@ -159,10 +159,10 @@
 }
 
-int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask, ULONG gw)
+int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask)
 {
     return VERR_NOT_IMPLEMENTED;
 }
 
-int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength, IN_BSTR aIPV6DefaultGateway)
+int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
 {
     return VERR_NOT_IMPLEMENTED;
Index: trunk/src/VBox/Main/os2/NetIfList-os2.cpp
===================================================================
--- trunk/src/VBox/Main/os2/NetIfList-os2.cpp	(revision 17418)
+++ trunk/src/VBox/Main/os2/NetIfList-os2.cpp	(revision 17419)
@@ -38,10 +38,10 @@
 }
 
-int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask, ULONG gw)
+int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask)
 {
     return VERR_NOT_IMPLEMENTED;
 }
 
-int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength, IN_BSTR aIPV6DefaultGateway)
+int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
 {
     return VERR_NOT_IMPLEMENTED;
Index: trunk/src/VBox/Main/solaris/NetIfList-solaris.cpp
===================================================================
--- trunk/src/VBox/Main/solaris/NetIfList-solaris.cpp	(revision 17418)
+++ trunk/src/VBox/Main/solaris/NetIfList-solaris.cpp	(revision 17419)
@@ -383,10 +383,10 @@
 #endif
 
-int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask, ULONG gw)
+int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask)
 {
     return VERR_NOT_IMPLEMENTED;
 }
 
-int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength, IN_BSTR aIPV6DefaultGateway)
+int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
 {
     return VERR_NOT_IMPLEMENTED;
Index: trunk/src/VBox/Main/win/NetIfList-win.cpp
===================================================================
--- trunk/src/VBox/Main/win/NetIfList-win.cpp	(revision 17418)
+++ trunk/src/VBox/Main/win/NetIfList-win.cpp	(revision 17419)
@@ -650,5 +650,5 @@
 }
 
-int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask, ULONG gw)
+int NetIfEnableStaticIpConfig(HostNetworkInterface * pIf, ULONG ip, ULONG mask)
 {
     HRESULT hr;
@@ -677,7 +677,49 @@
                     if(SUCCEEDED(hr))
                     {
+#if 0
                         in_addr aGw[1];
                         aGw[0].S_un.S_addr = gw;
                         hr = netIfWinSetGatewaysV4(pSvc, ObjPath, aGw, 1);
+                        if(SUCCEEDED(hr))
+#endif
+                        {
+                            hr = netIfWinUpdateConfig(pIf);
+                        }
+                    }
+                    SysFreeString(ObjPath);
+                }
+            }
+        }
+    }
+
+    return SUCCEEDED(hr) ? VINF_SUCCESS : VERR_GENERAL_FAILURE;
+}
+
+int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, IN_BSTR aIPV6Mask, IN_BSTR aIPV6DefaultGateway)
+{
+    HRESULT hr;
+    GUID guid;
+    hr = pIf->COMGETTER(Id) (&guid);
+    if(SUCCEEDED(hr))
+    {
+        ComPtr <IWbemServices> pSvc;
+        hr = netIfWinCreateIWbemServices(pSvc.asOutParam());
+        if(SUCCEEDED(hr))
+        {
+            ComPtr <IWbemClassObject> pAdapterConfig;
+            hr = netIfWinFindAdapterClassById(pSvc, &guid, pAdapterConfig.asOutParam());
+            if(SUCCEEDED(hr))
+            {
+                BSTR ObjPath;
+                hr = netIfWinAdapterConfigPath(pAdapterConfig, &ObjPath);
+                if(SUCCEEDED(hr))
+                {
+                    hr = netIfWinEnableStaticV4V6(pSvc, ObjPath, aIPV6Address, aIPV6Mask);
+                    if(SUCCEEDED(hr))
+                    {
+                        if(aIPV6DefaultGateway)
+                        {
+                            hr = netIfWinSetGatewaysV4V6(pSvc, ObjPath, aIPV6DefaultGateway);
+                        }
                         if(SUCCEEDED(hr))
                         {
@@ -694,42 +736,5 @@
 }
 
-int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, IN_BSTR aIPV6Mask, IN_BSTR aIPV6DefaultGateway)
-{
-    HRESULT hr;
-    GUID guid;
-    hr = pIf->COMGETTER(Id) (&guid);
-    if(SUCCEEDED(hr))
-    {
-        ComPtr <IWbemServices> pSvc;
-        hr = netIfWinCreateIWbemServices(pSvc.asOutParam());
-        if(SUCCEEDED(hr))
-        {
-            ComPtr <IWbemClassObject> pAdapterConfig;
-            hr = netIfWinFindAdapterClassById(pSvc, &guid, pAdapterConfig.asOutParam());
-            if(SUCCEEDED(hr))
-            {
-                BSTR ObjPath;
-                hr = netIfWinAdapterConfigPath(pAdapterConfig, &ObjPath);
-                if(SUCCEEDED(hr))
-                {
-                    hr = netIfWinEnableStaticV4V6(pSvc, ObjPath, aIPV6Address, aIPV6Mask);
-                    if(SUCCEEDED(hr))
-                    {
-                        hr = netIfWinSetGatewaysV4V6(pSvc, ObjPath, aIPV6DefaultGateway);
-                        if(SUCCEEDED(hr))
-                        {
-                            hr = netIfWinUpdateConfig(pIf);
-                        }
-                    }
-                    SysFreeString(ObjPath);
-                }
-            }
-        }
-    }
-
-    return SUCCEEDED(hr) ? VINF_SUCCESS : VERR_GENERAL_FAILURE;
-}
-
-int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength, IN_BSTR aIPV6DefaultGateway)
+int NetIfEnableStaticIpConfigV6(HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
 {
     RTNETADDRIPV6 Mask;
@@ -738,5 +743,5 @@
     {
         Bstr maskStr = composeIPv6Address(&Mask);
-        rc = NetIfEnableStaticIpConfigV6(pIf, aIPV6Address, maskStr, aIPV6DefaultGateway);
+        rc = NetIfEnableStaticIpConfigV6(pIf, aIPV6Address, maskStr, NULL);
     }
     return rc;
