다음을 통해 공유


NdisCancelSendNetBufferLists (Compact 2013)

3/26/2014

Protocol drivers call this function to cancel the transmission of network data.

Syntax

VOID
  NdisCancelSendNetBufferLists(
    IN NDIS_HANDLE  NdisBindingHandle,
    IN ULONG_PTR  CancelId
    );

Parameters

  • NdisBindingHandle
    The handle returned by the NdisOpenAdapterEx function that identifies the miniport driver or virtual miniport to which the cancellation applies.
  • CancelId
    The cancellation identifier. This identifier specifies the network data for which transmission is being canceled.

Return Value

None

Remarks

A protocol driver maps IRPs that it receives from higher-level software to NDIS network data. A list of NET_BUFFER_LIST structures describes the network data that the protocol driver sends to lower-level drivers for transmission. If an IRP is canceled, a protocol driver can call the NdisCancelSendNetBufferLists function to cancel the pending transmission of the corresponding NDIS network data.

Call the NDIS_SET_NET_BUFFER_LIST_CANCEL_ID macro for each NET_BUFFER_LIST structure that is passed to lower-level drivers for transmission. The NDIS_SET_NET_BUFFER_LIST_CANCEL_ID macro marks the specified packet with a cancellation identifier.

NdisCancelSendNetBufferLists cancels the transmission of all data that is marked with the specified cancellation identifier and is associated with the specified miniport driver. The binding handle that is specified in the NdisBindingHandle parameter identifies the miniport driver.

The NdisCancelSendNetBufferLists function cancels network data transmissions on a single binding. To cancel network data transmissions on more than one binding, a protocol driver must call the NdisCancelSendNetBufferLists function one time for each binding.

The protocol driver must make sure that the handle that the NdisBindingHandle parameter specifies remains valid during the call to NdisCancelSendNetBufferLists. That is, the protocol driver must not call the NdisCloseAdapterEx function to close the binding before NdisCancelSendNetBufferLists returns.

There is no guarantee that calling NdisCancelSendNetBufferLists will cancel the pending transmission of all network data with the specified cancellation identifier. For example, if the next-lower driver to which the protocol driver is bound does not provide a MiniportCancelSend function, a call to NdisCancelSendNetBufferLists does nothing.

In every case, NDIS returns network data that was submitted for transmission to the originating protocol driver's ProtocolSendNetBufferListsComplete function. NDIS returns canceled send data with a completion status of NDIS_STATUS_SEND_ABORTED. The delay between calling NdisCancelSendNetBufferLists and the return of the canceled NET_BUFFER_LIST structures can vary and therefore cannot be exactly specified.

Requirements

Header

ndis.h

See Also

Reference

NDIS Send and Receive Functions for Protocol Drivers
NDIS_SET_NET_BUFFER_LIST_CANCEL_ID
NdisCloseAdapterEx
NdisOpenAdapterEx
NET_BUFFER_LIST