Changeset 24217 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Oct 30, 2009 8:24:36 PM (15 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt/win
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c
r24190 r24217 2365 2365 MIN_PACKET_POOL_SIZE, 2366 2366 MAX_PACKET_POOL_SIZE - MIN_PACKET_POOL_SIZE, 2367 sizeof( PT_RSVD));2367 sizeof(SEND_RSVD)); 2368 2368 2369 2369 if (Status != NDIS_STATUS_SUCCESS) -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h
r24190 r24217 464 464 465 465 /** obtains the PTRANSFERDATA_RSVD given a single list entry it contains */ 466 #define PT_SLE_2_TRANSFERDATA_RSVD(_pl) \467 ( (PTRANSFERDATA_RSVD)((uint8_t *)(_pl) - RT_OFFSETOF(TRANSFERDATA_RSVD, ListEntry)))468 469 / ** obtains the ndis packet given a single list entry assuming it is stored in ProtocolReserved field of the packet */470 #define PT_SLE_2_NDIS_PACKET(_pl) \471 ( (PNDIS_PACKET)((uint8_t *)PT_SLE_2_TRANSFERDATA_RSVD(_pl) - RT_OFFSETOF(NDIS_PACKET, ProtocolReserved)))466 //#define PT_SLE_2_TRANSFERDATA_RSVD(_pl) \ 467 // ( (PTRANSFERDATA_RSVD)((uint8_t *)(_pl) - RT_OFFSETOF(TRANSFERDATA_RSVD, ListEntry))) 468 469 ///** obtains the ndis packet given a single list entry assuming it is stored in ProtocolReserved field of the packet */ 470 //#define PT_SLE_2_NDIS_PACKET(_pl) \ 471 // ( (PNDIS_PACKET)((uint8_t *)PT_SLE_2_TRANSFERDATA_RSVD(_pl) - RT_OFFSETOF(NDIS_PACKET, ProtocolReserved))) 472 472 473 473 /************************************************************************** -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h
r23927 r24217 471 471 } RECV_RSVD, *PRECV_RSVD; 472 472 473 typedef struct _PT_RSVD474 {475 union476 {477 RECV_RSVD RecvRsvd;478 TRANSFERDATA_RSVD TransferDataRsvd;479 } u;480 } PT_RSVD, *PPT_RSVD;481 482 483 473 #ifndef VBOX_NETFLT_ONDEMAND_BIND 484 474 485 475 C_ASSERT(sizeof(RECV_RSVD) <= sizeof(((PNDIS_PACKET)0)->MiniportReserved)); 476 C_ASSERT(sizeof(TRANSFERDATA_RSVD) <= PROTOCOL_RESERVED_SIZE_IN_PACKET); 486 477 #endif 487 478 -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c
r24212 r24217 814 814 static bool vboxNetFltWinRemovePacketFromList(PINTERLOCKED_SINGLE_LIST pList, PNDIS_PACKET pPacket) 815 815 { 816 PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd;816 PTRANSFERDATA_RSVD pTDR = (PTRANSFERDATA_RSVD)pPacket->ProtocolReserved; 817 817 return vboxNetFltWinInterlockedSearchListEntry(pList, &pTDR->ListEntry, 818 818 true /* remove*/); … … 824 824 static void vboxNetFltWinPutPacketToList(PINTERLOCKED_SINGLE_LIST pList, PNDIS_PACKET pPacket, PNDIS_BUFFER pOrigBuffer) 825 825 { 826 PTRANSFERDATA_RSVD pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd;826 PTRANSFERDATA_RSVD pTDR = (PTRANSFERDATA_RSVD)pPacket->ProtocolReserved; 827 827 pTDR->pOriginalBuffer = pOrigBuffer; 828 828 vboxNetFltWinInterlockedPutTail(pList, &pTDR->ListEntry); … … 933 933 return false; 934 934 935 pTDR = &((PPT_RSVD)pPacket->ProtocolReserved)->u.TransferDataRsvd;935 pTDR = (PTRANSFERDATA_RSVD)pPacket->ProtocolReserved; 936 936 Assert(pTDR); 937 937 Assert(pTDR->pOriginalBuffer);
Note:
See TracChangeset
for help on using the changeset viewer.