Changeset 59056 in vbox for trunk/src/VBox/Main/src-server/win
- Timestamp:
- Dec 8, 2015 12:45:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
r59033 r59056 1474 1474 1475 1475 1476 #define netIfLog Log Rel1476 #define netIfLog Log 1477 1477 1478 1478 struct BoundAdapter … … 1491 1491 1492 1492 if ((hr = pNetCfg->EnumComponents(&GUID_DEVCLASS_NET, &pEnumComponent)) != S_OK) 1493 netIfLog(("netIfGetUnboundHostOnlyAdapters: failed to enumerate network adapter components (0x%x)\n", hr));1493 LogRel(("netIfGetUnboundHostOnlyAdapters: failed to enumerate network adapter components (0x%x)\n", hr)); 1494 1494 else 1495 1495 { … … 1501 1501 memset(&adapter, 0, sizeof(adapter)); 1502 1502 if ((hr = pMiniport->GetDisplayName(&adapter.pName)) != S_OK) 1503 netIfLog(("netIfGetUnboundHostOnlyAdapters: failed to get device display name (0x%x)\n", hr));1503 LogRel(("netIfGetUnboundHostOnlyAdapters: failed to get device display name (0x%x)\n", hr)); 1504 1504 else if ((hr = pMiniport->GetDeviceStatus(&uComponentStatus)) != S_OK) 1505 1505 netIfLog(("netIfGetUnboundHostOnlyAdapters: failed to get device status (0x%x)\n", hr)); … … 1507 1507 netIfLog(("netIfGetUnboundHostOnlyAdapters: wrong device status (0x%x)\n", uComponentStatus)); 1508 1508 else if ((hr = pMiniport->GetId(&adapter.pHwId)) != S_OK) 1509 netIfLog(("netIfGetUnboundHostOnlyAdapters: failed to get device id (0x%x)\n", hr));1509 LogRel(("netIfGetUnboundHostOnlyAdapters: failed to get device id (0x%x)\n", hr)); 1510 1510 else if (_wcsnicmp(adapter.pHwId, L"sun_VBoxNetAdp", sizeof(L"sun_VBoxNetAdp")/2)) 1511 1511 netIfLog(("netIfGetUnboundHostOnlyAdapters: not host-only id = %ls, ignored\n", adapter.pHwId)); 1512 1512 else if ((hr = pMiniport->GetInstanceGuid(&guid)) != S_OK) 1513 netIfLog(("netIfGetUnboundHostOnlyAdapters: failed to get instance id (0x%x)\n", hr));1513 LogRel(("netIfGetUnboundHostOnlyAdapters: failed to get instance id (0x%x)\n", hr)); 1514 1514 else 1515 1515 { … … 1549 1549 if (hr != S_OK) 1550 1550 { 1551 netIfLog(("netIfGetBoundAdapters: failed to query INetCfg (0x%x)\n", hr));1551 LogRel(("netIfGetBoundAdapters: failed to query INetCfg (0x%x)\n", hr)); 1552 1552 return hr; 1553 1553 } … … 1556 1556 /* fall back to NDIS5 miniport lookup */ 1557 1557 && (hr = pNetCfg->FindComponent(L"sun_VBoxNetFlt", &pFilter))) 1558 netIfLog(("netIfGetBoundAdapters: could not find either 'oracle_VBoxNetLwf' or 'sun_VBoxNetFlt' components (0x%x)\n", hr));1558 LogRel(("netIfGetBoundAdapters: could not find either 'oracle_VBoxNetLwf' or 'sun_VBoxNetFlt' components (0x%x)\n", hr)); 1559 1559 else 1560 1560 { 1561 1561 INetCfgComponentBindings *pFilterBindings; 1562 1562 if ((pFilter->QueryInterface(IID_INetCfgComponentBindings, (PVOID*)&pFilterBindings)) != S_OK) 1563 netIfLog(("netIfGetBoundAdapters: failed to query INetCfgComponentBindings (0x%x)\n", hr));1563 LogRel(("netIfGetBoundAdapters: failed to query INetCfgComponentBindings (0x%x)\n", hr)); 1564 1564 else 1565 1565 { … … 1567 1567 INetCfgBindingPath *pBp; 1568 1568 if ((pFilterBindings->EnumBindingPaths(EBP_BELOW, &pEnumBp)) != S_OK) 1569 netIfLog(("netIfGetBoundAdapters: failed to enumerate binding paths (0x%x)\n", hr));1569 LogRel(("netIfGetBoundAdapters: failed to enumerate binding paths (0x%x)\n", hr)); 1570 1570 else 1571 1571 { … … 1583 1583 } 1584 1584 if ((pBp->EnumBindingInterfaces(&pEnumBi)) != S_OK) 1585 netIfLog(("netIfGetBoundAdapters: failed to enumerate binding interfaces (0x%x)\n", hr));1585 LogRel(("netIfGetBoundAdapters: failed to enumerate binding interfaces (0x%x)\n", hr)); 1586 1586 else 1587 1587 { … … 1591 1591 INetCfgComponent *pAdapter; 1592 1592 if ((hr = pBi->GetLowerComponent(&pAdapter)) != S_OK) 1593 netIfLog(("netIfGetBoundAdapters: failed to get lower component (0x%x)\n", hr));1593 LogRel(("netIfGetBoundAdapters: failed to get lower component (0x%x)\n", hr)); 1594 1594 else 1595 1595 { 1596 1596 LPWSTR pwszName = NULL; 1597 1597 if ((hr = pAdapter->GetDisplayName(&pwszName)) != S_OK) 1598 netIfLog(("netIfGetBoundAdapters: failed to get display name (0x%x)\n", hr));1598 LogRel(("netIfGetBoundAdapters: failed to get display name (0x%x)\n", hr)); 1599 1599 else 1600 1600 { … … 1618 1618 LPWSTR pwszHwId = NULL; 1619 1619 if ((hr = pAdapter->GetId(&pwszHwId)) != S_OK) 1620 netIfLog(("netIfGetBoundAdapters: %ls: failed to get hardware id (0x%x)\n",1620 LogRel(("netIfGetBoundAdapters: %ls: failed to get hardware id (0x%x)\n", 1621 1621 pwszName, hr)); 1622 1622 else if (!_wcsnicmp(pwszHwId, L"sun_VBoxNetAdp", sizeof(L"sun_VBoxNetAdp")/2)) 1623 1623 netIfLog(("netIfGetBoundAdapters: host-only adapter %ls, ignored\n", pwszName)); 1624 1624 else if ((hr = pAdapter->GetInstanceGuid(&guid)) != S_OK) 1625 netIfLog(("netIfGetBoundAdapters: %ls: failed to get instance GUID (0x%x)\n",1625 LogRel(("netIfGetBoundAdapters: %ls: failed to get instance GUID (0x%x)\n", 1626 1626 pwszName, hr)); 1627 1627 else … … 1834 1834 if (dwRc != NO_ERROR) 1835 1835 { 1836 netIfLog(("NetIfList: GetAdaptersAddresses failed (0x%x)\n", dwRc));1836 LogRel(("NetIfList: GetAdaptersAddresses failed (0x%x)\n", dwRc)); 1837 1837 hr = HRESULT_FROM_WIN32(dwRc); 1838 1838 } … … 1846 1846 #endif 1847 1847 if (hr != S_OK) 1848 netIfLog(("NetIfList: netIfGetBoundAdapters failed (0x%x)\n", hr));1848 LogRel(("NetIfList: netIfGetBoundAdapters failed (0x%x)\n", hr)); 1849 1849 else 1850 1850 { … … 1856 1856 if (!pszUuid) 1857 1857 { 1858 netIfLog(("NetIfList: out of memory\n"));1858 LogRel(("NetIfList: out of memory\n")); 1859 1859 break; 1860 1860 } 1861 1861 size_t len = strlen(pszUuid) - 1; 1862 1862 if (pszUuid[0] != '{' || pszUuid[len] != '}') 1863 netIfLog(("NetIfList: ignoring invalid GUID %s\n", pAdapter->AdapterName));1863 LogRel(("NetIfList: ignoring invalid GUID %s\n", pAdapter->AdapterName)); 1864 1864 else 1865 1865 { … … 1905 1905 int rc = iface->init((*it).pName, enmType, &info); 1906 1906 if (FAILED(rc)) 1907 netIfLog(("NetIfList: HostNetworkInterface::init() -> %Rrc\n", rc));1907 LogRel(("NetIfList: HostNetworkInterface::init() -> %Rrc\n", rc)); 1908 1908 else 1909 1909 {
Note:
See TracChangeset
for help on using the changeset viewer.