NetIf-win.cpp revision ffe41d8fd189739c2595031a4f5a0a4dc51435a5
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Main - NetIfList, Windows implementation.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Copyright (C) 2008 Sun Microsystems, Inc.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * available from http://www.virtualbox.org. This file is free software;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * you can redistribute it and/or modify it under the terms of the GNU
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * General Public License (GPL) as published by the Free Software
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync * additional information or have any questions.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/*******************************************************************************
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync* Header Files *
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync*******************************************************************************/
#include <comdef.h>
#include "svchlp.h"
#include <shellapi.h>
#define INITGUID
#include <guiddef.h>
#include <devguid.h>
#include <objbase.h>
#include <setupapi.h>
#include <shlobj.h>
#include <cfgmgr32.h>
if (!pAddresses)
return VERR_NO_MEMORY;
if (!pAddresses)
return VERR_NO_MEMORY;
case AF_INET:
if (!fIPFound)
fIPFound = true;
case AF_INET6:
if (!fIPv6Found)
fIPv6Found = true;
case AF_INET:
if (!fIPFound)
fIPFound = true;
case AF_INET6:
if (!fIPv6Found)
fIPv6Found = true;
Log(("collectNetIfInfo: Unexpected physical address length: %u\n", pAdapter->PhysicalAddressLength));
return VINF_SUCCESS;
struct StaticIpConfig
struct StaticIpV6Config
return S_OK;
switch (d->msgCode)
bool endLoop = false;
while (!endLoop)
switch (reply)
endLoop = true;
endLoop = true;
endLoop = true;
bool endLoop = false;
while (!endLoop)
switch (reply)
endLoop = true;
endLoop = true;
endLoop = true;
bool endLoop = false;
while (!endLoop)
switch (reply)
endLoop = true;
endLoop = true;
endLoop = true;
bool endLoop = false;
while (!endLoop)
switch (reply)
endLoop = true;
endLoop = true;
endLoop = true;
bool endLoop = false;
while (!endLoop)
switch (reply)
endLoop = true;
endLoop = true;
endLoop = true;
bool endLoop = false;
while (!endLoop)
switch (reply)
endLoop = true;
endLoop = true;
endLoop = true;
if (aVrc)
return rc;
switch (aMsgCode)
hrc = VBoxNetCfgWinCreateHostOnlyNetworkInterface (guid.asOutParam(), name.asOutParam(), bstrErr.asOutParam());
return vrc;
return FALSE;
static int vboxNetWinAddComponent(std::list <ComObjPtr<HostNetworkInterface> > * pPist, INetCfgComponent * pncc, HostNetworkInterfaceType enmType)
Assert(0);
return rc;
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
&pNc,
&lpszApp );
if(uComponentStatus == 0)
else if(lpszApp)
return VINF_SUCCESS;
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
return VERR_GENERAL_FAILURE;
return VERR_NOT_IMPLEMENTED;
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
d (new NetworkInterfaceHelperClientData());
static_cast <void *> (d.get()),
progress);
d.release();
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
d (new NetworkInterfaceHelperClientData());
static_cast <void *> (d.get()),
progress);
d.release();
int NetIfEnableStaticIpConfig(VirtualBox *vBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG ip, ULONG mask)
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
d (new NetworkInterfaceHelperClientData());
static_cast <void *> (d.get()),
progress);
d.release();
int NetIfEnableStaticIpConfigV6(VirtualBox *vBox, HostNetworkInterface * pIf, IN_BSTR aOldIPV6Address, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
d (new NetworkInterfaceHelperClientData());
static_cast <void *> (d.get()),
progress);
d.release();
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
d (new NetworkInterfaceHelperClientData());
static_cast <void *> (d.get()),
progress);
d.release();
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
d (new NetworkInterfaceHelperClientData());
static_cast <void *> (d.get()),
progress);
d.release();
#ifndef VBOX_WITH_NETFLT
return VERR_NOT_IMPLEMENTED;
&pNc,
&lpszApp );
# ifdef VBOX_NETFLT_ONDEMAND_BIND
/* for the protocol-based approach for now we just get all miniports the MS_TCPIP protocol binds to */
# ifndef VBOX_WITH_HARDENING
if(uComponentStatus == 0)
return VINF_SUCCESS;