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.
Syntax
FILTER_SEND_NET_BUFFER_LISTS_COMPLETE FilterSendNetBufferListsComplete;
void FilterSendNetBufferListsComplete(
[in] NDIS_HANDLE FilterModuleContext,
PNET_BUFFER_LIST NetBufferList,
[in] ULONG SendCompleteFlags
)
{...}
Parameters
[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.
NetBufferList
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:
NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL
Specifies that the current IRQL is DISPATCH_LEVEL. For more information about this flag, see Dispatch IRQL Tracking.
NDIS_SEND_COMPLETE_FLAGS_SWITCH_SINGLE_SOURCE
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.
Return value
None
Remarks
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.
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.
Examples
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:
FILTER_SEND_NET_BUFFER_LISTS_COMPLETE MySendNetBufferListsComplete;
Then, implement your function as follows:
_Use_decl_annotations_
VOID
MySendNetBufferListsComplete(
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.
Requirements
Minimum supported client | Supported in NDIS 6.0 and later. |
Target Platform | Windows |
Header | ndis.h (include Ndis.h) |
IRQL | <= DISPATCH_LEVEL |
See also
NdisFSendNetBufferListsCompleteFeedback
Submit and view feedback for