次の方法で共有


FilterCancelSendNetBufferLists (Compact 2013)

3/26/2014

NDIS calls a filter driver's FilterCancelSendNetBufferLists function to cancel the transmission of all NET_BUFFER_LIST structures that are marked with a specified cancellation identifier.

Syntax

VOID
  FilterCancelSendNetBufferLists(
    IN NDIS_HANDLE  FilterModuleContext,
    IN PVOID  CancelId
    );

Parameters

  • FilterModuleContext
    A handle to a context area that the filter driver allocated in its FilterAttach function. The filter driver uses this context area to maintain state information for a filter module.
  • CancelId
    A cancellation identifier. This identifier specifies the NET_BUFFER_LIST structures that are being canceled.

Return Value

None

Remarks

The FilterCancelSendNetBufferLists function is optional. If a filter driver does not filter send requests, it can set the entry point for this function to NULL when it calls the NdisFRegisterFilterDriver function.

Filter drivers that queue NET_BUFFER_LIST structures before it sends should export a FilterCancelSendNetBufferLists function. The FilterCancelSendNetBufferLists function cancels the pending transmission of the specified NET_BUFFER_LIST structures.

When an overlying NDIS driver calls the NdisCancelSendNetBufferLists or NdisFCancelSendNetBufferLists function, NDIS calls the FilterCancelSendNetBufferLists function of the filter modules on the binding.

A filter driver's FilterCancelSendNetBufferLists function performs the following operations:

  1. Traverses its list of queued NET_BUFFER_LIST structures for the specified filter module and calls the NDIS_GET_NET_BUFFER_LIST_CANCEL_ID macro to obtain the cancellation identifier for each queued NET_BUFFER_LIST structure. The filter driver compares the cancellation ID that NDIS_GET_NET_BUFFER_LIST_CANCEL_ID returns with the cancellation ID that NDIS passed to FilterCancelSendNetBufferLists .
  2. Removes from the send queue (unlinks) all NET_BUFFER_LIST structures whose cancellation identifiers match the specified cancellation identifier.
  3. Calls the NdisFSendNetBufferListsComplete function for all unlinked NET_BUFFER_LIST structures to return the structures. The filter driver sets the status field of the NET_BUFFER_LIST structures to NDIS_STATUS_SEND_ABORTED.
  4. Calls the NdisFCancelSendNetBufferLists function to pass the cancel send request to underlying drivers.

NDIS calls FilterCancelSendNetBufferLists at IRQL <= DISPATCH_LEVEL.

Requirements

Header

filter.h

See Also

Reference

NDIS Filter Driver Functions
FilterAttach
NDIS_GET_NET_BUFFER_LIST_CANCEL_ID
NdisCancelSendNetBufferLists
NdisFCancelSendNetBufferLists
NdisFRegisterFilterDriver
NdisFSendNetBufferListsComplete
NET_BUFFER
NET_BUFFER_LIST