Changeset 26574 in vbox for trunk/src/VBox/NetworkServices/NetLib/VBoxNetUDP.cpp
- Timestamp:
- Feb 16, 2010 12:44:10 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NetLib/VBoxNetUDP.cpp
r18463 r26574 29 29 #include <iprt/rand.h> 30 30 #include <VBox/log.h> 31 #include <VBox/intnetinline.h> 31 32 32 33 … … 46 47 * @param pcb Where to return the size of the data on success. 47 48 */ 48 void *VBoxNetUDPMatch(P CINTNETBUF pBuf, unsigned uDstPort, PCRTMAC pDstMac, uint32_t fFlags, PVBOXNETUDPHDRS pHdrs, size_t *pcb)49 void *VBoxNetUDPMatch(PINTNETBUF pBuf, unsigned uDstPort, PCRTMAC pDstMac, uint32_t fFlags, PVBOXNETUDPHDRS pHdrs, size_t *pcb) 49 50 { 50 51 /* … … 62 63 * Valid IntNet Ethernet frame? 63 64 */ 64 PCINTNETHDR pHdr = (PINTNETHDR)((uintptr_t)pBuf + pBuf->Recv.offRead);65 if ( pHdr->u16Type != INTNETHDR_TYPE_FRAME)66 return NULL; 67 68 size_t cbFrame = pHdr->cbFrame;69 const void *pvFrame = INTNETHdrGetFramePtr(pHdr, pBuf);65 PCINTNETHDR pHdr = INTNETRingGetNextFrameToRead(&pBuf->Recv); 66 if (!pHdr || pHdr->u16Type != INTNETHDR_TYPE_FRAME) 67 return NULL; 68 69 size_t cbFrame = pHdr->cbFrame; 70 const void *pvFrame = INTNETHdrGetFramePtr(pHdr, pBuf); 70 71 PCRTNETETHERHDR pEthHdr = (PCRTNETETHERHDR)pvFrame; 71 72 if (pHdrs)
Note:
See TracChangeset
for help on using the changeset viewer.