3.1.3.4 Choosing a Receive Function

Miniports choose between two methods of passing incoming packets to upper layers.

If a miniport indicates an array of packets by calling NdisMIndicateReceivePacket, ownership of the packets can pass to the receiving protocol driver. Such a miniport must provide a MiniportReturnPacket function. MiniportReturnPacket will be called for each packet passed up to a protocol driver for which the protocol driver returns NDIS_STATUS_PENDING in order to return ownership of the packet resources to the miniport after the protocol has consumed the data. Any miniport that supports multipacket receive indications:

If a miniport uses NdisMXxxIndicateReceive to indicate a receive packet up to an upper-layer, that miniport must provide a MiniportTransferData function. The miniport retains ownership of the memory containing the indicated data and MiniportTransferData will be called to move the received data from the miniport’s buffer to a packet supplied by the receiving protocol driver. The buffer containing the received data can be either a staging buffer or can be buffer space on the NIC.

A miniport chooses to indicate an array of packets by calling NdisMIndicateReceivePacket