NdisMEthIndicateReceive notifies NDIS that an Ethernet packet (or some initial lookahead portion of the packet) has arrived so NDIS can forward the packet to bound protocols.
VOID
NdisMEthIndicateReceive(
IN NDIS_HANDLE MiniportAdapterHandle,
IN NDIS_HANDLE MiniportReceiveContext,
IN PVOID HeaderBuffer,
IN UINT HeaderBufferSize,
IN PVOID LookaheadBuffer,
IN UINT LookaheadBufferSize,
IN UINT PacketSize
);
A miniport driver can (and should) set LookaheadBufferSize to something larger than the minimum required if sufficient received data is available on its NIC.
When PacketSize is larger than the given LookaheadBufferSize, a protocol driver call to NdisTransferData causes a subsequent call to the MiniportTransferData function, which transfers the remaining data in the packet.
Declared in Ndis.h. Include Ndis.h.
A miniport driver calls NdisMEthIndicateReceive if it designates its NIC as of type NdisMedium802_3 or NdisMediumDix in response to the OID_GEN_MEDIA_IN_USE query, unless the miniport driver indicates receives with NdisMIndicateReceivePacket.
When a miniport driver calls NdisMEthIndicateReceive, NDIS passes a pointer to the header of the packet and a pointer to some or all of the data in the packet to the ProtocolReceive function(s) of bound protocol driver(s). Each protocol that receives the indication can do the following:
For any protocol driver that receives an indication through NdisMEthIndicateReceive, the HeaderBuffer and LookaheadBuffer addresses are valid only during the current call to its ProtocolReceive function, and these buffers are read-only. A protocol driver cannot retain a pointer to the indicated packet with these associated buffers nor can it retain any pointers to these buffers for later use. Any data that a protocol driver needs from such a packet must be copied and saved during the receive indication.
The data in the header is the same as that received on the NIC. A miniport driver need not remove any headers or trailers from the data its NIC receives.
The transmitting driver adds padding to any packet that is too short for the requirements of the medium. The receiving miniport driver can include such padding in the data and length it subsequently indicates. Each bound protocol is responsible for detecting any such padding and ignoring it.
Serialized callers of NdisMEthIndicateReceive run at IRQL = DISPATCH_LEVEL. Deserialized callers of NdisMEthIndicateReceive can run at IRQL <= DISPATCH_LEVEL.
MiniportHandleInterrupt, MiniportInitialize, MiniportQueryInformation, MiniportSetInformation, MiniportTimer, MiniportTransferData, NdisMEthIndicateReceiveComplete, NdisMIndicateReceivePacket, NdisMoveMemory, NdisTransferData, ProtocolReceive