Share via


NdisMSendComplete

This function returns the packet and final status of a completed send request for which the driver previously returned NDIS_STATUS_PENDING.

VOID NdisMSendComplete(
IN NDIS_HANDLE MiniportAdapterHandle, 
IN PNDIS_PACKET Packet, 
IN NDIS_STATUS Status );

Parameters

  • MiniportAdapterHandle
    Handle originally input to the MiniportInitialize function.
  • Packet
    Pointer to the protocol-allocated packet originally input to the MiniportSend function.
  • Status
    Specifies the final status of the transmit request that has just been completed.

Remarks

The NDIS library queues incoming send packets on behalf of miniports so that each NIC driver can deal with one device-transmit operation at a time, although a miniport can transmit several packets per operation, depending on the capabilities of its NIC. NDIS serializes the submission of incoming packet arrays to each miniport's MiniportSendPackets function, and it serializes the submission of packets to each miniport's MiniportSend function. NDIS queues incoming send requests in first-in, first-out (FIFO) order when it cannot pass on each such request immediately because the underlying NIC driver is already busy.

If MiniportSendPackets sets the Status in the out-of-band data block for a packet to NDIS_STATUS_PENDING or if MiniportSend returns NDIS_STATUS_PENDING for an incoming packet, the miniport must eventually call this function with the original packet to indicate which send request it has completed. While the status of such a send packet is pending, the miniport retains ownership of that packet.

A call to this function causes NDIS to call the ProtocolSendComplete function of the driver that initiated the request with its call to NdisSend. The miniport's call to this function releases ownership of the specified packet to the protocol driver that originally allocated it.

If MiniportSend returns a status other than NDIS_STATUS_PENDING for a specified packet, the miniport never calls this function with that packet. The return from MiniportSend releases ownership of such a packet.

Consequently, a miniport must not call this function with any packet for which its MiniportSend function did not return NDIS_STATUS_PENDING. Any send packet for which an NIC driver returns something other than NDIS_STATUS_PENDING should be considered inaccessible by that miniport as soon as its MiniportSend function returns control.

A miniport's call to this function does not necessarily mean that a particular packet has been transmitted over the wire. Usually, such a packet has been transmitted except, possibly, by the driver of an NIC in which packets can be queued in the hardware.

Miniport drivers that declared their devices of type NdisMediumWan in response to a preceding OID_GEN_MEDIA_SUPPORTED or OID_GEN_MEDIA_IN_USE request call NdisMWanSendComplete, rather than this function.

A driver that calls this function runs at IRQL DISPATCH_LEVEL.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

NdisMSendResourcesAvailable, NdisSend

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.