Partager via


Implement Receive Data Handling for NDIS 6.0 (Compact 7)

3/12/2014

When your miniport driver receives packets, it indicates to NDIS a linked list of NET_BUFFER_LIST structures instead of NDIS_PACKET structures. NDIS forwards the NET_BUFFER_LIST structures to the appropriate overlying drivers. To maximize performance, we recommend that you use NET_BUFFER_LIST to buffer bursts of receive packet data in the driver before indicating receive data to NDIS.

With the exception of indicating the completion status of a receive operation in a NET_BUFFER_LIST structure, the semantics of indicating data to NDIS 6.0 are very similar to that of NDIS 5.x miniport drivers that call the NdisMIndicateReceivePacket function. In NDIS 6.0, your miniport driver calls the NdisMIndicateReceiveNetBufferLists function to indicate a linked list of NET_BUFFER_LIST structures.

The following table shows which API elements have been renamed and/or changed for NDIS 6.0.

NDIS 5.x NDIS 6.0

NDIS_PACKET

NET_BUFFER_LIST

NdisMIndicateReceivePacket

NdisMIndicateReceiveNetBufferLists

MiniportReturnPacket

MiniportReturnNetBufferLists

To implement receive data handling for NDIS 6.0

  1. Replace calls to NdisMIndicateReceivePacket with calls to NdisMIndicateReceiveNetBufferLists.

  2. Replace NDIS_PACKET structures with NET_BUFFER_LIST structures.

  3. Reclaim NET_BUFFER_LIST structures after your driver indicates receive data to NDIS. If your miniport driver sets the Status member of the NET_BUFFER_LIST structure to NDIS_STATUS_RESOURCES, it can reclaim ownership of the NET_BUFFER_LIST structures as soon as NdisMIndicateReceiveNetBufferLists returns. If your miniport driver sets the Status member of the NET_BUFFER_LIST structure to NDIS_STATUS_SUCCESS, NDIS returns ownership of the NET_BUFFER_LIST structure by calling the miniport driver's MiniportReturnNetBufferLists function. This behavior is analogous to calling an NDIS 5.x miniport driver's MiniportReturnPacket function.

See Also

Concepts

Update Miniport Driver Send and Receive Functionality for NDIS 6.0