BOOL __stdcall ReadPacket (HANDLE hOpen, PETH_REQUEST pPacket);
Return Value:TRUE if call was successful, FALSE otherwise
Parameters:hOpen
Specifies driver object open handle.
pPacket
Pointer to the user allocated and initialized ETH_REQUEST structure.
Remarks:
The following fields of ETH_REQUEST must be initialized:
ETH_REQUEST::hAdapterHandlemust be set to the interface handle (obtained via call to GetTcpipBoundAdaptersInfo). The packet will be extracted from the network interface associated packet queue. Remember that packets queued only when network interface is in filter mode.ETH_REQUEST::EthPacket.Buffermust point to the user allocated INTERMEDIATE_BUFFER structure
The following fields of the INTERMEDIATE_BUFFER are initialized by helper driver in case of success:
INTERMEDIATE_BUFFER::m_IBuffercontains Ethernet packetINTERMEDIATE_BUFFER::m_Lengthcontains the actual length of the packetINTERMEDIATE_BUFFER::m_Flagsis a combination ofNDIS_FLAGS_XXX(defined in ndis.h). These flags are copied from theNDIS_PACKET.Private.Flags.INTERMEDIATE_BUFFER::m_dwDeviceFlagsisPACKET_FLAG_ON_SENDif packet goes from MSTCP to network interface orPACKET_FLAG_ON_RECEIVEotherwise.
This member is a wrapper for CNdisApi::ReadPacket.
