Changeset 62708 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Jul 29, 2016 8:38:18 PM (8 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c
r62490 r62708 1334 1334 * @param pszInterfaceUuid The factory interface id. 1335 1335 */ 1336 static DECLCALLBACK(void *) vboxNetFltQueryFactoryInterface(PCSUPDRVFACTORY pSupDrvFactory, PSUPDRVSESSION pSession, const char *pszInterfaceUuid) 1336 static DECLCALLBACK(void *) vboxNetFltQueryFactoryInterface(PCSUPDRVFACTORY pSupDrvFactory, PSUPDRVSESSION pSession, 1337 const char *pszInterfaceUuid) 1337 1338 { 1338 1339 PVBOXNETFLTGLOBALS pGlobals = (PVBOXNETFLTGLOBALS)((uint8_t *)pSupDrvFactory - RT_OFFSETOF(VBOXNETFLTGLOBALS, SupDrvFactory)); … … 1362 1363 Log(("VBoxNetFlt: rc=%Rrc, uuid=%s\n", rc, pszInterfaceUuid)); 1363 1364 1365 RT_NOREF1(pSession); 1364 1366 return NULL; 1365 1367 } -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.cpp
r62490 r62708 113 113 { 114 114 LogFlowFuncEnter(); 115 RT_NOREF2(hBindContext, pvSystemSpecific2); 115 116 116 117 NDIS_STATUS Status; … … 142 143 static VOID vboxNetFltWinPtOpenAdapterComplete(IN NDIS_HANDLE hProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus) 143 144 { 144 PVBOXNETFLTINS pNetFlt =(PVBOXNETFLTINS)hProtocolBindingContext; 145 PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hProtocolBindingContext; 146 RT_NOREF1(OpenErrorStatus); 145 147 146 148 LogFlowFunc(("ENTER: pNetFlt (0x%p), Status (0x%x), OpenErrorStatus(0x%x)\n", pNetFlt, Status, OpenErrorStatus)); … … 254 256 { 255 257 PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hContext; 258 RT_NOREF1(hUnbindContext); 256 259 257 260 LogFlowFunc(("ENTER: pNetFlt (0x%p)\n", pNetFlt)); … … 267 270 LogFlowFuncEnter(); 268 271 NDIS_STATUS Status = vboxNetFltWinPtDeregister(&g_VBoxNetFltGlobalsWin.Pt); 269 Assert(Status == NDIS_STATUS_SUCCESS); 272 Assert(Status == NDIS_STATUS_SUCCESS); NOREF(Status); 270 273 LogFlowFunc(("LEAVE: PtDeregister Status (0x%x)\n", Status)); 271 274 } … … 290 293 static VOID vboxNetFltWinPtResetComplete(IN NDIS_HANDLE hProtocolBindingContext, IN NDIS_STATUS Status) 291 294 { 295 RT_NOREF2(hProtocolBindingContext, Status); 292 296 LogFlowFunc(("ENTER: pNetFlt 0x%p, Status 0x%x\n", hProtocolBindingContext, Status)); 293 297 /* 294 298 * should never be here 295 299 */ 296 Assert (0);300 AssertFailed(); 297 301 LogFlowFunc(("LEAVE: pNetFlt 0x%p, Status 0x%x\n", hProtocolBindingContext, Status)); 298 302 } … … 484 488 PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hContext; 485 489 PNDIS_REQUEST pSynchRequest = pNetFlt->u.s.WinIf.pSynchRequest; 486 NDIS_OID Oid = pNetFlt->u.s.WinIf.PassDownRequest.DATA.SET_INFORMATION.Oid;487 490 488 491 LogFlowFunc(("ENTER: pNetFlt (0x%p), pNdisRequest (0x%p), Status (0x%x)\n", pNetFlt, pNdisRequest, Status)); … … 763 766 } 764 767 765 static INT vboxNetFltWinRecvPacketPassThru(PVBOXNETFLTINS pNetFlt, PNDIS_PACKET pPacket , BOOLEAN bForceIndicate)768 static INT vboxNetFltWinRecvPacketPassThru(PVBOXNETFLTINS pNetFlt, PNDIS_PACKET pPacket) 766 769 { 767 770 Assert(KeGetCurrentIrql() == DISPATCH_LEVEL); … … 1224 1227 { 1225 1228 PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hProtocolBindingContext; 1226 ULONG cPackets = 0; 1227 bool bNetFltActive; 1228 bool fWinIfActive = vboxNetFltWinReferenceWinIfNetFlt(pNetFlt, &bNetFltActive); 1229 bool fNetFltActive; 1230 bool fWinIfActive = vboxNetFltWinReferenceWinIfNetFlt(pNetFlt, &fNetFltActive); 1229 1231 NDIS_HANDLE hMiniport = pNetFlt->u.s.WinIf.hMiniport; 1230 1232 /* Note: we're using KeGetCurrentProcessorNumber, which is not entirely correct in case … … 1255 1257 if (fWinIfActive) 1256 1258 { 1257 if (bNetFltActive) 1258 { 1259 if (fNetFltActive) 1259 1260 vboxNetFltWinDereferenceNetFlt(pNetFlt); 1260 }1261 1261 else 1262 {1263 1262 vboxNetFltWinDereferenceModePassThru(pNetFlt); 1264 }1265 1263 vboxNetFltWinDereferenceWinIf(pNetFlt); 1266 1264 } … … 1308 1306 NDIS_STATUS fStatus; 1309 1307 #endif 1310 bool bResources = NDIS_GET_PACKET_STATUS(pPacket) == NDIS_STATUS_RESOURCES;1308 bool fResources = NDIS_GET_PACKET_STATUS(pPacket) == NDIS_STATUS_RESOURCES; NOREF(fResources); 1311 1309 1312 1310 VBOXNETFLT_LBVERIFY(pNetFlt, pPacket); … … 1315 1313 * this is a temporary assert for debugging purposes: 1316 1314 * we're probably doing something wrong with the packets if the miniport reports NDIS_STATUS_RESOURCES */ 1317 Assert(! bResources);1315 Assert(!fResources); 1318 1316 #endif 1319 1317 … … 1327 1325 1328 1326 #else 1329 fStatus = vboxNetFltWinQuEnqueuePacket(pNetFlt, pPacket, bResources ? PACKET_COPY : 0);1327 fStatus = vboxNetFltWinQuEnqueuePacket(pNetFlt, pPacket, fResources ? PACKET_COPY : 0); 1330 1328 if (fStatus == NDIS_STATUS_SUCCESS) 1331 1329 { 1332 1330 bNetFltActive = false; 1333 1331 fWinIfActive = false; 1334 if ( bResources)1332 if (fResources) 1335 1333 { 1336 1334 cRefCount = 0; … … 1338 1336 } 1339 1337 else 1340 {1341 1338 cRefCount = 1; 1342 }1343 1339 break; 1344 1340 } … … 1362 1358 } 1363 1359 1364 cRefCount = vboxNetFltWinRecvPacketPassThru(pNetFlt, pPacket , bNetFltActive);1360 cRefCount = vboxNetFltWinRecvPacketPassThru(pNetFlt, pPacket); 1365 1361 if (cRefCount) 1366 1362 { … … 1519 1515 * register the protocol edge 1520 1516 */ 1521 DECLHIDDEN(NDIS_STATUS) vboxNetFltWinPtRegister(PVBOXNETFLTGLOBALS_PT pGlobalsPt, PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPathStr) 1522 { 1517 DECLHIDDEN(NDIS_STATUS) vboxNetFltWinPtRegister(PVBOXNETFLTGLOBALS_PT pGlobalsPt, PDRIVER_OBJECT pDriverObject, 1518 PUNICODE_STRING pRegistryPathStr) 1519 { 1520 RT_NOREF2(pDriverObject, pRegistryPathStr); 1523 1521 NDIS_PROTOCOL_CHARACTERISTICS PtChars; 1524 1522 NDIS_STRING NameStr;
Note:
See TracChangeset
for help on using the changeset viewer.