次の方法で共有


MiniportCancelSendPackets (Windows Embedded CE 6.0)

1/6/2010

TheMiniportCancelSendPackets function is optional. For a specified adapter, MiniportCancelSendPackets cancels the transmission of all packets that are marked with a specified cancellation identifier.

Syntax

VOID MiniportCancelSendPackets(
  NDIS_HANDLE MiniportAdapterContext,
  ULONG_PTR CancelId
);

Parameters

  • MiniportAdapterContext
    [in] Specifies the handle to a miniport driver-allocated context area in which the miniport driver maintains per-NIC state, set up by MiniportInitialize.
  • CancelId
    [in] A cancellation identifier. This identifier specifies the packet or group of packets whose transmission is being canceled.

Return Value

None.

Remarks

Miniport drivers and intermediate drivers that queue send packets for more than one second should export a MiniportCancelSendPackets function. The MiniportCancelSendPackets function allows the miniport driver or intermediate driver to cancel the pending transmission of specified send packets.

When a protocol driver or intermediate driver calls the NdisCancelSendPackets function, NDIS calls the MiniportCancelSendPackets function of the appropriate lower-level driver (miniport driver or intermediate driver) on the binding, provided that the lower-lever driver exports a MiniportCancelSendPackets function.

A miniport driver's MiniportCancelSendPackets function performs the following operations:

  1. Traverses its list of queued packets for the specified adapter and calls NdisGetPacketCancelId to obtain the cancellation identifier for each queued packet. The miniport driver compares the cancellation ID returned by NdisGetPacketCancelId with the cancellation ID supplied to MiniportCancelSendPackets.
  2. Unlinks all packets whose cancellation identifiers match the specified cancellation identifier.
  3. Calls the NdisMSendComplete or NdisMWanSendComplete function for all unlinked packets to return the packet with a completion status of NDIS_STATUS_REQUEST_ABORTED.

An intermediate driver's MiniportCancelSendPackets function performs the following operations:

  1. Performs the operations listed abovefor a miniport driver'sMiniportCancelSendPackets function.
  2. Calls the NdisCancelSendPackets function, specifying the binding that maps to the adapter specified in the call to MiniportCancelSendPackets. In the call to NdisCancelSendPackets, the intermediate miniport driver passes the appropriate NdisBindingHandle and cancellation identifier (CancelId) passed to its MiniportCancelSendPackets function.

An intermediate driver performs these operations regardless of whether it supports packet stacking.

Requirements

Header externs.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Upper-Edge Functions
NdisCancelSendPackets
NdisGetPacketCancelId
NdisGeneratePartialCancelId
NdisMSendComplete
NdisMWanSendComplete