NdisFSendNetBufferLists (Compact 7)
3/12/2014
Filter drivers call this function to send a list of network data buffers.
Syntax
VOID
NdisFSendNetBufferLists(
IN NDIS_HANDLE NdisFilterHandle,
IN PNET_BUFFER_LIST NetBufferLists,
IN NDIS_PORT_NUMBER PortNumber,
IN ULONG SendFlags
);
Parameters
- NdisFilterHandle
The NDIS handle that identifies this filter module. NDIS passed the handle to the filter driver in a call to the FilterAttach function.
- NetBufferLists
A pointer to a linked list of NET_BUFFER_LIST structures. Each NET_BUFFER_LIST structure describes a list of NET_BUFFER structures.
- PortNumber
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.
SendFlags
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:- NDIS_SEND_FLAGS_DISPATCH_LEVEL
Specifies that the current IRQL is DISPATCH_LEVEL.
- NDIS_SEND_FLAGS_CHECK_FOR_LOOPBACK
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.
- NDIS_SEND_FLAGS_DISPATCH_LEVEL
Return Value
None
Remarks
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 by using 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_LIST 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.
Requirements
Header |
ndis.h |
See Also
Reference
NDIS Functions for Filter Drivers
FilterAttach
FilterSendNetBufferLists
FilterSendNetBufferListsComplete
NET_BUFFER
NET_BUFFER_LIST
NET_BUFFER_LIST_INFO