FILTER_SEND_NET_BUFFER_LISTS_COMPLETE callback function (ndis.h)

NDIS calls the FilterSendNetBufferListsComplete function to complete a send request that a filter driver started by calling the NdisFSendNetBufferLists function.

Note  You must declare the function by using the FILTER_SEND_NET_BUFFER_LISTS_COMPLETE type. For more information, see the following Examples section.



void FilterSendNetBufferListsComplete(
  [in] NDIS_HANDLE FilterModuleContext,
       PNET_BUFFER_LIST NetBufferList,
  [in] ULONG SendCompleteFlags


[in] FilterModuleContext

A handle to the context area for the filter module. The filter driver created and initialized this context area in the FilterAttach function.


A pointer to a linked list of NET_BUFFER_LIST structures that the filter driver passed to NdisFSendNetBufferLists.

[in] SendCompleteFlags

NDIS flags that can be combined with an OR operation. To clear all the flags, set this member to zero. This function supports the following flags:


Specifies that the current IRQL is DISPATCH_LEVEL. For more information about this flag, see Dispatch IRQL Tracking.


If this flag is set, all packets in a linked list of NET_BUFFER_LIST structures originated from the same Hyper-V extensible switch source port.

For more information, see Hyper-V Extensible Switch Send and Receive Flags.

Note  If each packet in the linked list of NET_BUFFER_LIST structures uses the same source port, the extension should set the NDIS_SEND_FLAGS_SWITCH_SINGLE_SOURCE flag in the SendFlags parameter of SendNetBufferLists when it sends the request.
Note  This flag is available in NDIS 6.30 and later.

Return value



FilterSendNetBufferListsComplete is an optional function. 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.

The filter driver can call the NdisSetOptionalHandlers function, from the FilterSetModuleOptions function, to specify a FilterSendNetBufferListsComplete function for a filter module.

Note  A filter driver that does not provide a FilterSendNetBufferListsComplete function cannot call the NdisFSendNetBufferLists function.
When NDIS calls FilterSendNetBufferListsComplete, the filter driver regains ownership of the NET_BUFFER_LIST structures and associated data.

If an overlying driver initiated the send request, the filter driver should call the NdisFSendNetBufferListsComplete function to complete the send request.

If the filter driver originated the send request, FilterSendNetBufferListsComplete can either release the NET_BUFFER_LIST structures and associated data or prepare them for reuse in a subsequent call to NdisFSendNetBufferLists.

Note  A filter driver should keep track of send requests that it initiates and make sure that it does not call NdisFSendNetBufferListsComplete when NDIS calls FilterSendNetBufferListsComplete for such requests.
NDIS calls FilterSendNetBufferListsComplete at IRQL <= DISPATCH_LEVEL.


To define a FilterSendNetBufferListsComplete function, you must first provide a function declaration that identifies the type of function you're defining. Windows provides a set of function types for drivers. Declaring a function using the function types helps Code Analysis for Drivers, Static Driver Verifier (SDV), and other verification tools find errors, and it's a requirement for writing drivers for the Windows operating system.

For example, to define a FilterSendNetBufferListsComplete function that is named "MySendNetBufferListsComplete", use the FILTER_SEND_NET_BUFFER_LISTS_COMPLETE type as shown in this code example:


Then, implement your function as follows:

    NDIS_HANDLE  FilterModuleContext,
    PNET_BUFFER_LIST  NetBufferLists,
    ULONG  SendCompleteFlags

The FILTER_SEND_NET_BUFFER_LISTS_COMPLETE function type is defined in the Ndis.h header file. To more accurately identify errors when you run the code analysis tools, be sure to add the Use_decl_annotations annotation to your function definition. The Use_decl_annotations annotation ensures that the annotations that are applied to the FILTER_SEND_NET_BUFFER_LISTS_COMPLETE function type in the header file are used. For more information about the requirements for function declarations, see Declaring Functions by Using Function Role Types for NDIS Drivers.

For information about Use_decl_annotations, see Annotating Function Behavior.


Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Windows
Header ndis.h (include Ndis.h)

See also