vbox的更動 59065 路徑 trunk/src/VBox/HostDrivers
- 時間撮記:
- 2015-12-9 上午08:43:53 (9 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp
r58651 r59065 68 68 RT_C_DECLS_END 69 69 70 #define LogError(x) DbgPrint x 71 70 72 #if 0 71 73 #undef Log … … 547 549 else 548 550 { 549 Log (("ERROR!vboxNetLwfWinOidRequest: NdisAllocateCloneOidRequest failed with 0x%x\n", Status));551 LogError(("vboxNetLwfWinOidRequest: NdisAllocateCloneOidRequest failed with 0x%x\n", Status)); 550 552 } 551 553 LogFlow(("<==vboxNetLwfWinOidRequest: Status=0x%x\n", Status)); … … 610 612 if (Status != NDIS_STATUS_SUCCESS) 611 613 { 612 Log (("ERROR!vboxNetLwfWinGetPacketFilter: vboxNetLwfWinSyncOidRequest(query, OID_GEN_CURRENT_PACKET_FILTER) failed with 0x%x\n", Status));614 LogError(("vboxNetLwfWinGetPacketFilter: vboxNetLwfWinSyncOidRequest(query, OID_GEN_CURRENT_PACKET_FILTER) failed with 0x%x\n", Status)); 613 615 return FALSE; 614 616 } 615 617 if (Rq.Request.DATA.QUERY_INFORMATION.BytesWritten != sizeof(pModuleCtx->uPacketFilter)) 616 618 { 617 Log (("ERROR!vboxNetLwfWinGetPacketFilter: vboxNetLwfWinSyncOidRequest(query, OID_GEN_CURRENT_PACKET_FILTER) failed to write neccessary amount (%d bytes), actually written %d bytes\n", sizeof(pModuleCtx->uPacketFilter), Rq.Request.DATA.QUERY_INFORMATION.BytesWritten));619 LogError(("vboxNetLwfWinGetPacketFilter: vboxNetLwfWinSyncOidRequest(query, OID_GEN_CURRENT_PACKET_FILTER) failed to write neccessary amount (%d bytes), actually written %d bytes\n", sizeof(pModuleCtx->uPacketFilter), Rq.Request.DATA.QUERY_INFORMATION.BytesWritten)); 618 620 } 619 621 … … 639 641 if (Status != NDIS_STATUS_SUCCESS) 640 642 { 641 Log (("ERROR!vboxNetLwfWinSetPacketFilter: vboxNetLwfWinSyncOidRequest(query, OID_GEN_CURRENT_PACKET_FILTER) failed with 0x%x\n", Status));643 LogError(("vboxNetLwfWinSetPacketFilter: vboxNetLwfWinSyncOidRequest(query, OID_GEN_CURRENT_PACKET_FILTER) failed with 0x%x\n", Status)); 642 644 return Status; 643 645 } 644 646 if (Rq.Request.DATA.QUERY_INFORMATION.BytesWritten != sizeof(uFilter)) 645 647 { 646 Log (("ERROR!vboxNetLwfWinSetPacketFilter: vboxNetLwfWinSyncOidRequest(query, OID_GEN_CURRENT_PACKET_FILTER) failed to write neccessary amount (%d bytes), actually written %d bytes\n", sizeof(uFilter), Rq.Request.DATA.QUERY_INFORMATION.BytesWritten));648 LogError(("vboxNetLwfWinSetPacketFilter: vboxNetLwfWinSyncOidRequest(query, OID_GEN_CURRENT_PACKET_FILTER) failed to write neccessary amount (%d bytes), actually written %d bytes\n", sizeof(uFilter), Rq.Request.DATA.QUERY_INFORMATION.BytesWritten)); 647 649 return NDIS_STATUS_FAILURE; 648 650 } … … 675 677 if (Status != NDIS_STATUS_SUCCESS) 676 678 { 677 Log (("ERROR!vboxNetLwfWinSetPacketFilter: vboxNetLwfWinSyncOidRequest(set, OID_GEN_CURRENT_PACKET_FILTER, vvv below vvv) failed with 0x%x\n", Status));679 LogError(("vboxNetLwfWinSetPacketFilter: vboxNetLwfWinSyncOidRequest(set, OID_GEN_CURRENT_PACKET_FILTER, vvv below vvv) failed with 0x%x\n", Status)); 678 680 vboxNetLwfWinDumpFilterTypes(uFilter); 679 681 } … … 782 784 if (rc != STATUS_SUCCESS) 783 785 { 784 Log (("ERROR!vboxNetLwfWinAttach: RtlUnicodeStringToAnsiString(%ls) failed with 0x%x\n",786 LogError(("vboxNetLwfWinAttach: RtlUnicodeStringToAnsiString(%ls) failed with 0x%x\n", 785 787 pParameters->BaseMiniportName, rc)); 786 788 return NDIS_STATUS_FAILURE; 787 789 } 788 790 DbgPrint("vboxNetLwfWinAttach: friendly name=%wZ\n", pParameters->BaseMiniportInstanceName); 789 DbgPrint("vboxNetLwfWinAttach: name=%Z\n", strMiniportName);791 DbgPrint("vboxNetLwfWinAttach: name=%Z\n", &strMiniportName); 790 792 791 793 UINT cbModuleWithNameExtra = sizeof(VBOXNETLWF_MODULE) + strMiniportName.Length; … … 796 798 if (!pModuleCtx) 797 799 { 800 LogError(("vboxNetLwfWinAttach: Failed to allocate module context for %ls\n", pParameters->BaseMiniportName)); 798 801 RtlFreeAnsiString(&strMiniportName); 799 802 return NDIS_STATUS_RESOURCES; … … 808 811 if (!pModuleCtx->hWorkItem) 809 812 { 810 Log (("ERROR!vboxNetLwfWinAttach: Failed to allocate work item for %ls\n",811 pParameters->BaseMiniportName));813 LogError(("vboxNetLwfWinAttach: Failed to allocate work item for %ls\n", 814 pParameters->BaseMiniportName)); 812 815 NdisFreeMemory(pModuleCtx, 0, 0); 813 816 return NDIS_STATUS_RESOURCES; … … 848 851 if (!pModuleCtx->hPool) 849 852 { 850 Log (("ERROR!vboxNetLwfWinAttach: NdisAllocateNetBufferListPool failed\n"));853 LogError(("vboxNetLwfWinAttach: NdisAllocateNetBufferListPool failed\n")); 851 854 NdisFreeIoWorkItem(pModuleCtx->hWorkItem); 852 855 NdisFreeMemory(pModuleCtx, 0, 0); … … 864 867 if (Status != NDIS_STATUS_SUCCESS) 865 868 { 866 Log (("ERROR!vboxNetLwfWinAttach: NdisFSetAttributes failed with 0x%x\n", Status));869 LogError(("vboxNetLwfWinAttach: NdisFSetAttributes failed with 0x%x\n", Status)); 867 870 NdisFreeNetBufferListPool(pModuleCtx->hPool); 868 871 Log4(("vboxNetLwfWinAttach: freed NBL+NB pool 0x%p\n", pModuleCtx->hPool)); … … 1173 1176 if (!pMdl) 1174 1177 { 1175 Log (("ERROR!vboxNetLwfWinSGtoNB: failed to allocate an MDL\n"));1178 LogError(("vboxNetLwfWinSGtoNB: failed to allocate an MDL\n")); 1176 1179 LogFlow(("<==vboxNetLwfWinSGtoNB: return NULL\n")); 1177 1180 return NULL; … … 1185 1188 if (!pMdlCurr->Next) 1186 1189 { 1187 Log (("ERROR!vboxNetLwfWinSGtoNB: failed to allocate an MDL\n"));1190 LogError(("vboxNetLwfWinSGtoNB: failed to allocate an MDL\n")); 1188 1191 /* Tear down all MDL we chained so far */ 1189 1192 vboxNetLwfWinFreeMdlChain(pMdl); … … 1207 1210 else 1208 1211 { 1209 Log (("ERROR!vboxNetLwfWinSGtoNB: failed to allocate an NBL+NB\n"));1212 LogError(("vboxNetLwfWinSGtoNB: failed to allocate an NBL+NB\n")); 1210 1213 vboxNetLwfWinFreeMdlChain(pMdl); 1211 1214 } … … 1234 1237 else 1235 1238 { 1236 Log (("ERROR!vboxNetLwfWinSGtoNB: failed to obtain the buffer pointer (size=%u)\n", pSG->cbTotal));1239 LogError(("vboxNetLwfWinSGtoNB: failed to obtain the buffer pointer (size=%u)\n", pSG->cbTotal)); 1237 1240 NdisAdvanceNetBufferDataStart(pBuffer, pSG->cbTotal, false, NULL); /** @todo why bother? */ 1238 1241 NdisFreeNetBufferList(pBufList); … … 1242 1245 else 1243 1246 { 1244 Log (("ERROR!vboxNetLwfWinSGtoNB: NdisRetreatNetBufferDataStart failed with 0x%x (size=%u)\n", Status, pSG->cbTotal));1247 LogError(("vboxNetLwfWinSGtoNB: NdisRetreatNetBufferDataStart failed with 0x%x (size=%u)\n", Status, pSG->cbTotal)); 1245 1248 NdisFreeNetBufferList(pBufList); 1246 1249 pBufList = NULL; … … 1779 1782 else 1780 1783 { 1781 Log (("ERROR!vboxNetLwfWinRegister: failed to register filter driver, status=0x%x", Status));1784 LogError(("vboxNetLwfWinRegister: failed to register filter driver, status=0x%x", Status)); 1782 1785 } 1783 1786 return Status; … … 1802 1805 if (Status != STATUS_SUCCESS) 1803 1806 { 1804 Log Rel(("NETLWF: IDC initialization failed (system thread creation, status=0x%x)\n", Status));1807 LogError(("vboxNetLwfWinStartInitIdcThread: IDC initialization failed (system thread creation, status=0x%x)\n", Status)); 1805 1808 /* 1806 1809 * We failed to init IDC and there will be no second chance. … … 1937 1940 case LwfIdcState_Stopping: 1938 1941 /* Impossible, but another thread is alreading doing FiniIdc, bail out */ 1939 Log (("ERROR!vboxNetLwfWinTryFiniIdc: called in 'Stopping' state\n"));1942 LogError(("vboxNetLwfWinTryFiniIdc: called in 'Stopping' state\n")); 1940 1943 rc = VERR_INVALID_STATE; 1941 1944 break; … … 1952 1955 else 1953 1956 { 1954 Log (("ERROR!vboxNetLwfWinTryFiniIdc: ObReferenceObjectByHandle(%p) failed with 0x%x\n",1957 LogError(("vboxNetLwfWinTryFiniIdc: ObReferenceObjectByHandle(%p) failed with 0x%x\n", 1955 1958 g_VBoxNetLwfGlobals.hInitIdcThread, Status)); 1956 1959 } … … 2095 2098 if (Status != STATUS_SUCCESS) 2096 2099 { 2097 Log (("ERROR!vboxNetFltPortOsXmit: KeWaitForMultipleObjects() failed with 0x%x\n", Status));2100 LogError(("vboxNetFltPortOsXmit: KeWaitForMultipleObjects() failed with 0x%x\n", Status)); 2098 2101 if (Status == STATUS_TIMEOUT) 2099 2102 rc = VERR_TIMEOUT; … … 2277 2280 } 2278 2281 else 2279 Log (("ERROR!vboxNetLwfWinRegisterIpAddrNotifier: GetUnicastIpAddressTable failed with %x\n", Status));2282 LogError(("vboxNetLwfWinRegisterIpAddrNotifier: GetUnicastIpAddressTable failed with %x\n", Status)); 2280 2283 /* Now we can register a callback function to keep track of address changes. */ 2281 2284 Status = NotifyUnicastIpAddressChange(AF_UNSPEC, vboxNetLwfWinIpAddrChangeCallback, … … 2284 2287 Log(("vboxNetLwfWinRegisterIpAddrNotifier: notifier=%p\n", pThis->u.s.WinIf.hNotifier)); 2285 2288 else 2286 Log (("ERROR!vboxNetLwfWinRegisterIpAddrNotifier: NotifyUnicastIpAddressChange failed with %x\n", Status));2289 LogError(("vboxNetLwfWinRegisterIpAddrNotifier: NotifyUnicastIpAddressChange failed with %x\n", Status)); 2287 2290 } 2288 2291 else
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器