BOOL CNdisApi::ReadPacket (PETH_REQUEST pPacket);
Return Value:TRUE
if call was successful, FALSE
otherwise
Parameters:pPacket
Pointer to the user allocated and initialized ETH_REQUEST structure.
Remarks:
For this call the following fields of ETH_REQUEST must be initialized:
ETH_REQUEST::hAdapterHandle
must be set to the interface handle (obtained via call to CNdisApi::GetTcpipBoundAdaptersInfo). The packet will be extracted from the network interface associated packet queue. Remember that packets queued only when network interface is in the filter mode.ETH_REQUEST::EthPacket.Buffer
must 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_IBuffer
contains Ethernet packetINTERMEDIATE_BUFFER::m_Length
contains the actual length of the packetINTERMEDIATE_BUFFER::m_Flags
is a combination ofNDIS_FLAGS_XXX
(defined in ndis.h). These flags are copied from theNDIS_PACKET.Private.Flags
.INTERMEDIATE_BUFFER::m_dwDeviceFlags
isPACKET_FLAG_ON_SEND
if packet goes from MSTCP to network interface, orPACKET_FLAG_ON_RECEIVE
otherwise.
This member calls the filter driver with IOCTL_NDISRD_READ_PACKET
control code (see details below).
IOCTL_NDISRD_READ_PACKET
Input Buffer | _ETH_REQUEST |
Input Buffer Size | sizeof (_ETH_REQUEST) |
Output Buffer | _ETH_REQUEST |
Output Buffer Size | sizeof (_ETH_REQUEST) |