Compartilhar via


NdisFIndicateReceiveNetBufferLists (Compact 2013)

3/26/2014

Filter drivers call this function to indicate the receipt of network data.

Syntax

VOID
  NdisFIndicateReceiveNetBufferLists(
    IN NDIS_HANDLE  NdisFilterHandle,
    IN PNET_BUFFER_LIST  NetBufferLists,
    IN NDIS_PORT_NUMBER  PortNumber,
    IN ULONG  NumberOfNetBufferLists,
    IN ULONG  ReceiveFlags
    );

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 linked list of NET_BUFFER_LIST structures. Each NET_BUFFER_LIST structure contains one NET_BUFFER structure.
  • 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.
  • NumberOfNetBufferLists
    The number of NET_BUFFER_LIST structures that are in the linked list of structures at NetBufferLists.
  • ReceiveFlags
    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_RECEIVE_FLAGS_DISPATCH_LEVEL
      Specifies that the current IRQL is DISPATCH_LEVEL.
    • NDIS_RECEIVE_FLAGS_RESOURCES
      Specifies that the filter driver reclaims ownership of the NET_BUFFER_LIST structures and any attached NET_BUFFER structures immediately after the call to NdisFIndicateReceiveNetBufferLists returns.
    • NDIS_RECEIVE_FLAGS_SINGLE_ETHER_TYPE
      Specifies that all the NET_BUFFER_LIST structures in the list at NetBufferLists have the same protocol type (EtherType).
    • NDIS_RECEIVE_FLAGS_SINGLE_VLAN
      Specifies that all the NET_BUFFER_LIST structures in the list at NetBufferLists belong to the same VLAN.
    • NDIS_RECEIVE_FLAGS_PERFECT_FILTERED
      Specifies that all the NET_BUFFER_LIST structures in the list at NetBufferLists include only data that matches the packet filter and multicast list that are assigned to the miniport adapter.

Return Value

None

Remarks

When a filter driver calls the NdisFIndicateReceiveNetBufferLists function, it specifies a list of NET_BUFFER_LIST structures in the NetBufferLists parameter. NDIS passes the NET_BUFFER_LIST structures to the overlying drivers.

Filter drivers can call NdisFIndicateReceiveNetBufferLists to originate a receive indication.

Filter drivers can also filter receive indications that are originated by underlying drivers. NDIS calls the FilterReceiveNetBufferLists function to filter such receive indications.

A filter driver must set the SourceHandle member of each NET_BUFFER_LIST structure that it originates to the same value as the NdisFilterHandle parameter so that NDIS can return the NET_BUFFER_LIST structures to the correct filter driver. The filter driver must not modify the SourceHandle member in any NET_BUFFER_LIST structures that it did not originate.

The filter driver must suitably initialize the NET_BUFFER_LIST structures, attached NET_BUFFER structures, and any attached MDLs.

If a filter driver calls the NdisFIndicateReceiveNetBufferLists function and clears the NDIS_RECEIVE_FLAG_RESOURCES flag in the ReceiveFlags parameter, NDIS returns the indicated NET_BUFFER_LIST structures to the filter driver's FilterReturnNetBufferLists function. In this case, the filter driver must not reclaim the NET_BUFFER_LIST structures until NDIS returns the NET_BUFFER_LIST structures to FilterReturnNetBufferLists.

If a filter driver calls NdisFIndicateReceiveNetBufferLists, and sets the NDIS_RECEIVE_FLAG_RESOURCES flag in the ReceiveFlags parameter, this indicates that the filter driver must regain ownership of the NET_BUFFER_LIST structures immediately. In this case, NDIS does not call the filter driver's FilterReturnNetBufferLists function to return the NET_BUFFER_LIST structures. Instead, NDIS returns the NET_BUFFER_LIST structures to the filter driver upon return from NdisFIndicateReceiveNetBufferLists. The filter driver should reclaim the NET_BUFFER_LIST structures immediately after NdisFIndicateReceiveNetBufferLists returns. To reclaim the NET_BUFFER_LIST structures, a filter driver can call its own FilterReturnNetBufferLists function.

Setting the NDIS_RECEIVE_FLAG_RESOURCES flag in the ReceiveFlags parameter forces the overlying drivers to copy the network data and release the NET_BUFFER_LIST structures to the filter driver.

Requirements

Header

ndis.h

See Also

Reference

NDIS Functions for Filter Drivers
FilterAttach
FilterReceiveNetBufferLists
FilterReturnNetBufferLists
NET_BUFFER
NET_BUFFER_LIST
NDIS Filter Driver Functions