NdisFSendNetBufferLists function

Filter drivers call the NdisFSendNetBufferLists function to send a list of network data buffers.


void NdisFSendNetBufferLists(
  NDIS_HANDLE                       NdisFilterHandle,
  __drv_aliasesMem PNET_BUFFER_LIST NetBufferList,
  NDIS_PORT_NUMBER                  PortNumber,
  ULONG                             SendFlags



The NDIS handle that identifies this filter module. NDIS passed the handle to the filter driver in a call to the FilterAttach function.


A pointer to a linked list of NET_BUFFER_LIST structures. Each NET_BUFFER_LIST structure describes a list of NET_BUFFER structures.


A port number that identifies a miniport adapter port. Miniport adapter port numbers are assigned by calling the NdisMAllocatePort function. A zero value identifies the default port of a miniport adapter.


Flags that define attributes for the send operation. The flags 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.


Specifies that NDIS should check for loopback. By default, NDIS does not loop back data to the driver that submitted the send request. An overlying driver can override this behavior by setting this flag. When this flag is set, NDIS identifies all the NET_BUFFER structures that contain data that matches the receive criteria for the binding. NDIS indicates NET_BUFFER structures that match the criteria to the overlying driver. This flag has no affect on checking for loopback, or looping back, on other bindings.


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_COMPLETE_FLAGS_SWITCH_SINGLE_SOURCE flag in the SendCompleteFlags parameter of NdisFSendNetBufferListsComplete when it completes the send request.
Note  This flag is available in NDIS 6.30 and later.


If this flag is set, all packets in a linked list of NET_BUFFER_LIST structures are to be forwarded to the same extensible switch destination port.

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

Note  This flag is available in NDIS 6.30 and later.

Return value



After a filter driver calls the NdisFSendNetBufferLists function, NDIS submits the NET_BUFFER_LIST structures to the underlying drivers.

A filter driver can originate send requests or it can filter the requests that it receives from overlying drivers. If the filter driver originates send requests, the driver must allocate buffers pools. The filter driver allocates each NET_BUFFER_LIST structure from a pool.

The filter driver can preallocate NET_BUFFER_LIST structures or it can allocate the structures just before calling NdisFSendNetBufferLists and then free them when the send operation is complete.

A filter driver must set the SourceHandle member of each NET_BUFFER_LIST structure that it originates to the same value that it passes to the NdisFilterHandle parameter. The filter handle provides the information that NDIS requires to return the NET_BUFFER_LIST structure to the filter driver. The filter driver must not modify the SourceHandle member in any NET_BUFFER_LIST structures that it did not originate.

Before calling NdisFSendNetBufferLists, a filter driver can set information that accompanies the send request with the NET_BUFFER_LIST_INFO macro. The underlying drivers can retrieve this information with the NET_BUFFER_LIST_INFO macro.

NDIS calls a filter driver's FilterSendNetBufferLists function to pass on send requests from overlying drivers. A filter driver can pass on such requests by passing the NET_BUFFER_LISTT structures that it received in FilterSendNetBufferLists to NdisFSendNetBufferLists.

As soon as a filter driver calls the NdisFSendNetBufferLists function, it relinquishes ownership of the NET_BUFFER_LIST structures and all associated resources. NDIS calls the FilterSendNetBufferListsComplete function to return the structures and data to the filter driver. NDIS can collect the structures and data from multiple send requests into a single linked list of NET_BUFFER_LIST structures before it passes the list to FilterSendNetBufferListsComplete.

Until NDIS calls FilterSendNetBufferListsComplete, the current status of the send request is not available to the filter driver. A filter driver temporarily releases ownership of all resources that are associated with a send request when it calls NdisFSendNetBufferLists. A filter driver should never try to examine the NET_BUFFER_LIST structures or any associated data after calling NdisFSendNetBufferLists.

Note  A filter driver should keep track of send requests that it originates and make sure that it does not call the NdisFSendNetBufferListsComplete function when such requests are complete.


Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
DDI compliance rules Irql_Filter_Driver_Function

See also