summaryrefslogtreecommitdiff
path: root/src/VBox/Main/src-server/win/NetIf-win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Main/src-server/win/NetIf-win.cpp')
-rw-r--r--src/VBox/Main/src-server/win/NetIf-win.cpp37
1 files changed, 32 insertions, 5 deletions
diff --git a/src/VBox/Main/src-server/win/NetIf-win.cpp b/src/VBox/Main/src-server/win/NetIf-win.cpp
index cce820da..3b86dabd 100644
--- a/src/VBox/Main/src-server/win/NetIf-win.cpp
+++ b/src/VBox/Main/src-server/win/NetIf-win.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2008-2010 Oracle Corporation
+ * Copyright (C) 2008-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -954,7 +954,7 @@ static int vboxNetWinAddComponent(std::list<ComObjPtr<HostNetworkInterface> > *
if (hr == S_OK)
{
NETIFINFO Info;
- memset(&Info, 0, sizeof(Info));
+ RT_ZERO(Info);
Info.Uuid = *(Guid(IfGuid).raw());
rc = collectNetIfInfo(name, Guid(IfGuid), &Info, iDefaultInterface);
if (RT_FAILURE(rc))
@@ -1082,6 +1082,33 @@ int NetIfGetConfigByName(PNETIFINFO)
return VERR_NOT_IMPLEMENTED;
}
+/**
+ * Obtain the current state of the interface.
+ *
+ * @returns VBox status code.
+ *
+ * @param pcszIfName Interface name.
+ * @param penmState Where to store the retrieved state.
+ */
+int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState)
+{
+ return VERR_NOT_IMPLEMENTED;
+}
+
+/**
+ * Retrieve the physical link speed in megabits per second. If the interface is
+ * not up or otherwise unavailable the zero speed is returned.
+ *
+ * @returns VBox status code.
+ *
+ * @param pcszIfName Interface name.
+ * @param puMbits Where to store the link speed.
+ */
+int NetIfGetLinkSpeed(const char * /*pcszIfName*/, uint32_t * /*puMbits*/)
+{
+ return VERR_NOT_IMPLEMENTED;
+}
+
int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pVBox,
IHostNetworkInterface **aHostNetworkInterface,
IProgress **aProgress,
@@ -1485,7 +1512,7 @@ int NetIfList(std::list<ComObjPtr<HostNetworkInterface> > &list)
{
hr = pBp->EnumBindingInterfaces(&pEnumBi);
Assert(hr == S_OK);
- if ( hr == S_OK )
+ if (hr == S_OK)
{
hr = pEnumBi->Reset();
Assert(hr == S_OK);
@@ -1493,7 +1520,7 @@ int NetIfList(std::list<ComObjPtr<HostNetworkInterface> > &list)
{
while ((hr = pEnumBi->Next(1, &pBi, NULL)) == S_OK)
{
- hr = pBi->GetLowerComponent( &pMpNcc );
+ hr = pBi->GetLowerComponent(&pMpNcc);
Assert(hr == S_OK);
if (hr == S_OK)
{
@@ -1527,7 +1554,7 @@ int NetIfList(std::list<ComObjPtr<HostNetworkInterface> > &list)
}
else
{
- LogRel(("failed to get the sun_VBoxNetFlt component, error (0x%x)", hr));
+ LogRel(("failed to get the sun_VBoxNetFlt component, error (0x%x)\n", hr));
}
VBoxNetCfgWinReleaseINetCfg(pNc, FALSE);