Freigeben über


FilterSendNetBufferLists (Compact 2013)

3/26/2014

NDIS calls this function to allow a filter driver to filter a linked list of NET_BUFFER_LIST structures.

Syntax

VOID
  FilterSendNetBufferLists(
    IN NDIS_HANDLE  FilterModuleContext,
    IN PNET_BUFFER_LIST  NetBufferLists,
    IN  NDIS_PORT_NUMBER  PortNumber,
    IN ULONG  SendFlags
    );

Parameters

  • FilterModuleContext
    A handle to the context area for the filter module. The filter driver created and initialized this context area in the FilterAttach function.
  • NetBufferLists
    A pointer to a linked list of NET_BUFFER_LIST structures that specify lists of NET_BUFFER structures. Each NET_BUFFER in the list maps a chain of MDLs that contain the transmit data.
  • 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.

Return Value

None

Remarks

FilterSendNetBufferLists 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.

If a filter driver specifies a FilterSendNetBufferLists function and it queues send requests, it must also specify a FilterCancelSendNetBufferLists function.

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

If the filter driver specifies a FilterSendNetBufferLists function, NDIS calls this function to filter the data that is contained in a list of NET_BUFFER structures over the network. NDIS specifies a list of NET_BUFFER structures in each NET_BUFFER_LIST structure.

If the filter driver did not specify FilterSendNetBufferLists, NDIS calls the next filter driver that is lower in the driver stack that did specify a FilterSendNetBufferLists function. If there are no such underlying filter drivers, NDIS calls an underlying driver's MiniportSendNetBufferLists function.

The filter driver can filter the data and send the filtered data to underlying drivers. For each NET_BUFFER structure submitted to FilterSendNetBufferLists, a filter driver can do the following:

  • Pass the buffer on to the next underlying driver by calling the NdisFSendNetBufferLists function. The filter driver can modify the buffer contents before it calls NdisFSendNetBufferLists. In this case NDIS calls the FilterSendNetBufferListsComplete function after the underlying drivers complete the send request.
  • Reject the buffer by calling the NdisFSendNetBufferListsComplete function.
  • Queue the buffer in a local data structure for later processing.
  • Copy the buffer and originate a send request with the copy. The send operation resembles a filter-driver initiated send request. In this case, the driver must return the original buffer to the overlying driver by calling the NdisFSendNetBufferListsComplete function.

After the send operation is complete, a filter driver reverses the modifications, if any, to the buffer descriptors that it made in the FilterSendNetBufferLists function. The driver calls the NdisFSendNetBufferListsComplete function to return the linked list of NET_BUFFER_LIST structures to the overlying drivers and to return the final status of the send request.

If a filter module is in the Paused state, the filter driver must not originate any send requests for that filter module. If NDIS calls FilterSendNetBufferLists , the driver must not call NdisFSendNetBufferLists to pass on the data until the driver is restarted. The driver should call NdisFSendNetBufferListsComplete immediately to complete the send operation. It should set the complete status in each NET_BUFFER_LIST structure to NDIS_STATUS_PAUSED.

NDIS calls FilterSendNetBufferLists at IRQL <= DISPATCH_LEVEL.

Requirements

Header

filter.h

See Also

Reference

NDIS Filter Driver Functions
FilterAttach
FilterCancelSendNetBufferLists
FilterSendNetBufferListsComplete
FilterSetModuleOptions
NdisFSendNetBufferLists
NdisFSendNetBufferListsComplete
NdisFRegisterFilterDriver
NdisSetOptionalHandlers
NET_BUFFER
NET_BUFFER_LIST