NdisMCoSendComplete returns a packet descriptor and its associated resources to the protocol that requested the send.
VOID
NdisMCoSendComplete(
IN NDIS_STATUS Status,
IN NDIS_HANDLE NdisVcHandle,
IN PNDIS_PACKET Packet
);
Declared in Ndis.h. Include Ndis.h.
NDIS assumes that any connection-oriented NIC driver is a deserialized miniport driver; that is, NDIS neither serializes nor queues incoming sends for drivers that have a MiniportCoSendPackets function.
Such a connection-oriented NIC driver must call NdisMCoSendComplete with each packet descriptor that NDIS forwards to its MiniportCoSendPackets function eventually, thereby returning the packet descriptor and associated resources to the allocating protocol that initiated the send operation. The miniport driver's call to NdisMCoSendComplete does not necessarily mean that all data associated with a packet descriptor has been transmitted over the network to its destination. Possibly the MiniportCoSendPackets function actually completes each input send packet with NdisMCoSendComplete after copying the protocol-supplied data into the NIC's transmit buffers, or perhaps the miniport driver holds send packets in an internal queue until the packet data has been transmitted over the network before it calls NdisMCoSendComplete.
If the VC identified by NdisVcHandle was activated by the NIC driver's MiniportCoActivateVc function with INDICATE_END_OF_TX set in the Flags member of the CO_MEDIA_PARAMETERS structure, the miniport driver cannot call NdisMCoSendComplete until the transmission of the packet data actually is completed.
In any case, a call to NdisMCoSendComplete causes NDIS to call the ProtocolCoSendComplete function of the driver that originally called NdisCoSendPackets with the packet descriptor at Packet.
With NdisMCoSendComplete, the miniport driver restores ownership of the given packet descriptor and of all resources associated with it to the protocol that originally allocated these resources. The NIC driver can no longer access the packet descriptor, any buffer descriptors chained to the packet descriptor or the buffers they map, and the out-of-band data block associated with the packet descriptor after calling NdisMCoSendComplete.
Callers of NdisMCoSendComplete can be running at IRQL = DISPATCH_LEVEL.
CO_MEDIA_PARAMETERS, MiniportCoActivateVc, MiniportCoSendPackets, NdisCoSendPackets, ProtocolCoSendComplete