Поделиться через


NdisMSendComplete (Compact 2013)

3/26/2014

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

Syntax

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

Parameters

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

Return Value

None.

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. That miniport should consider any send packet for which an NIC driver returns something other than NDIS_STATUS_PENDING inaccessible 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, the driver of an NIC in which packets can be queued in the hardware has transmitted except, such a packet possibly.

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.

Requirements

Header

ndis.h

Library

ndis.dll

See Also

Reference

NDIS 5.x Legacy Functions
MiniportInitialize
MiniportSend
MiniportSendPackets
NdisMWanSendComplete
NdisSend
OID_GEN_MEDIA_IN_USE
OID_GEN_MEDIA_SUPPORTED
ProtocolSendComplete