Partager via


Implement Send Data Handling for NDIS 6.0 (Compact 7)

3/12/2014

In NDIS 6.0, the MiniportSendNetBufferLists function replaces the NDIS 5.xMiniportSendPackets function. MiniportSendNetBufferLists receives a pointer to a linked list of NET_BUFFER_LIST structures, each of which contains a linked list of NET_BUFFER structures. MiniportSendNetBufferLists does not return a completion status. Therefore, we recommend that your miniport driver always complete a send operation asynchronously by calling the NdisMSendNetBufferListsComplete function.

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

NDIS 5.x NDIS 6.0

MiniportSendPackets

MiniportSendNetBufferLists

NdisMSendComplete

NdisMSendNetBufferListsComplete

To implement send data handing for NDIS 6.0

  1. Replace calls to MiniportSendPackets with calls to MiniportSendNetBufferLists.

  2. Specify completion status of a send operation to NDIS when the send operation completes. NDIS 5.x miniport drivers specify the completion status of a send operation as a parameter to the NdisMSendComplete function. NDIS 6.0 miniport drivers, however, specify the completion status in the NET_BUFFER_LIST structure by calling the NET_BUFFER_LIST_STATUS macro, as illustrated in the following example:

    NET_BUFFER_LIST_STATUS(myNetBufferList) = NDIS_STATUS_SUCCESS;
    

    The completion status applies to all of the NET_BUFFER structures associated with the NET_BUFFER_LIST structure. Therefore, your miniport driver should set the completion status to NDIS_STATUS_SUCCESS only if the data in all the NET_BUFFER structures associated with the NET_BUFFER_LIST structure is transmitted successfully.

  3. Update your direct memory access (DMA) handling functionality to work with NET_BUFFER structures. If your miniport driver uses scatter/gather DMA, it must call the NdisMAllocateNetBufferSGList function once for each NET_BUFFER structure for which it must obtain a scatter/gather DMA list. For more information about DMA operations, see Update Miniport Driver DMA Functionality for NDIS 6.0.

See Also

Concepts

Update Miniport Driver Send and Receive Functionality for NDIS 6.0