Changeset 22599 in vbox
- Timestamp:
- Aug 31, 2009 12:10:12 PM (15 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
r22441 r22599 195 195 /** Filter driver device context. */ 196 196 ADAPT IfAdaptor; 197 /** since the driver is able to work in different modes (NetFlt or PassThru) 198 * we need to wait for the old-mode operations to complete before switching to the new mode 199 * The most trickiest here is NetFlt->PassThru switch as we can not block in PtSent/Receive 200 * because they typically run at DPC level 201 * we also not allowed to re-order packets, so on NetFlt-PassThru switch (kVBoxNetDevMode_NetFltDeinitializing mode) 202 * we put them to the pending queue to process them in order on final mode activation stage */ 203 volatile VBOXNETDEVMODE_TYPE enmModeMP; 204 volatile VBOXNETDEVMODE_TYPE enmModePT; 197 205 198 volatile uint32_t cModeNetFltRefs; 206 199 volatile uint32_t cModePassThruRefs; -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h
r22441 r22599 232 232 pList->pTail->Next = pEntry; 233 233 pList->pTail = pEntry; 234 pEntry->Next = NULL; 234 235 } 235 236 -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h
r22441 r22599 297 297 /* NDIS_HANDLE hHandle; */ 298 298 } ADAPT_DEVICE, *PADAPT_DEVICE; 299 300 301 typedef enum VBOXNETDEVMODE_TYPE302 {303 kVBoxNetDevMode_InvalidValue = 0,304 kVBoxNetDevMode_NetFltInitializing,305 kVBoxNetDevMode_NetFltInitialized,306 kVBoxNetDevMode_NetFltDeinitializing,307 kVBoxNetDevMode_NetFltWaitDeinitialized,308 kVBoxNetDevMode_NetFltDeinitialized,309 310 } VBOXNETDEVMODE_TYPE;311 299 312 300 /* packet filter processing mode constants */ … … 481 469 } TRANSFERDATA_RSVD, *PTRANSFERDATA_RSVD; 482 470 483 typedef struct _PT_RSVD484 {485 union486 {487 SEND_RSVD SendRsvd;488 TRANSFERDATA_RSVD TransferDataRsvd;489 };490 } PT_RSVD, *PPT_RSVD;491 492 493 #ifndef VBOX_NETFLT_ONDEMAND_BIND494 471 /** Miniport reserved part of a received packet that is allocated by 495 472 * us. Note that this should fit into the MiniportReserved space … … 505 482 } RECV_RSVD, *PRECV_RSVD; 506 483 484 typedef struct _PT_RSVD 485 { 486 union 487 { 488 RECV_RSVD RecvRsvd; 489 TRANSFERDATA_RSVD TransferDataRsvd; 490 } u; 491 } PT_RSVD, *PPT_RSVD; 492 493 494 #ifndef VBOX_NETFLT_ONDEMAND_BIND 495 507 496 C_ASSERT(sizeof(RECV_RSVD) <= sizeof(((PNDIS_PACKET)0)->MiniportReserved)); 508 497 #endif -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c
r22441 r22599 799 799 static bool vboxNetFltWinRemovePacketFromList(PINTERLOCKED_SINGLE_LIST pList, PNDIS_PACKET pPacket) 800 800 { 801 PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)-> TransferDataRsvd;801 PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd; 802 802 return vboxNetFltWinInterlockedSearchListEntry(pList, &pTDR->ListEntry, 803 803 true /* remove*/); … … 809 809 static void vboxNetFltWinPutPacketToList(PINTERLOCKED_SINGLE_LIST pList, PNDIS_PACKET pPacket, PNDIS_BUFFER pOrigBuffer) 810 810 { 811 PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)-> TransferDataRsvd;811 PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd; 812 812 pTDR->pOriginalBuffer = pOrigBuffer; 813 813 vboxNetFltWinInterlockedPutTail(pList, &pTDR->ListEntry); … … 827 827 return false; 828 828 829 pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)-> TransferDataRsvd;829 pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd; 830 830 Assert(pTDR); 831 831 Assert(pTDR->pOriginalBuffer);
Note:
See TracChangeset
for help on using the changeset viewer.