2.3.2.8 Send and Receive Functions

A miniport driver sends an array of packets on the network in its MiniportSendPackets function or sends a single packet in its MiniportSend function.

A miniport NIC driver transfers one or more received packets by calling NdisMIndicateReceivePacket and passing a complete packet or packets. Or, a miniport calls a filter-specific NdisMXxxIndicateReceive function, forcing interested upper layer drivers to copy the data for a single received frame, either in NdisMXxxIndicateReceive if the entire packet is passed as lookahead data, or by calling its MiniportTransferData function if the frame is larger than the lookahead buffer.

If the NIC driver indicates up an entire packet, the miniport’s MiniportReturnPacket function will subsequently be called to return the packet(s). The following table describes NDIS library functions that the miniport driver calls when sending and receiving packets.

Function

Definition

NdisMIndicateReceivePacket

Indicates up one or more packets to interested upper layers.

NdisMArcIndicateReceive
NdisMEthIndicateReceive
NdisMFddiIndicateReceive
NdisMTrIndicateReceive

Indicates that a packet of a specific media type is being received.

NdisMArcIndicateReceiveComplete
NdisMEthIndicateReceiveComplete
NdisMFddiIndicateReceiveComplete
NdisMTrIndicateReceiveComplete

Indicates that the previous packet receive operation is complete.

NdisMSendComplete

Indicates that the previous packet send operation is complete. This function is used when the previous MiniportSend function operated asynchronously.

NdisMSendResourcesAvailable

Indicates to the NDIS library that the miniport driver has available resources for send operations. A miniport calls this function in its MiniportSend function if it completes a send synchronously or in its MiniportHandleInterrupt when it detects that an asynchronous send has completed. NdisMSendResourcesAvailable can only be called when the driver has not called NdisMSendComplete for a pending send.

NdisMTransferDataComplete

Informs the NDIS library that the previous MiniportTransferData request is complete. This function is used when the previous call to the MiniportTransferData function returned NDIS_STATUS_PENDING.