Miniport drivers call the NdisMIndicateReceiveNetBufferLists function to indicate the receipt of data from the network.
VOID NdisMIndicateReceiveNetBufferLists( _In_ NDIS_HANDLE MiniportAdapterHandle, _In_ PNET_BUFFER_LIST NetBufferLists, _In_ NDIS_PORT_NUMBER PortNumber, _In_ ULONG NumberOfNetBufferLists, _In_ ULONG ReceiveFlags );
The miniport handle that NDIS passed to the MiniportInitializeEx function.
A port number that identifies a miniport adapter port. To assign a miniport adapter port number, call the NdisMAllocatePort function. A zero value identifies the default port of a miniport adapter. Use the default port if the miniport driver has not allocated ports for the specified adapter.
The number of NET_BUFFER_LIST structures that are in the linked list of structures at NetBufferLists .
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 the miniport driver reclaims ownership of the NET_BUFFER_LIST structures and any attached NET_BUFFER structures immediately after the call to NdisMIndicateReceiveNetBufferLists returns.
Specifies that all of the NET_BUFFER_LIST structures in the list at NetBufferLists have the same protocol type (EtherType).
Specifies that all of the NET_BUFFER_LIST structures in the list at NetBufferLists belong to the same VLAN.
Specifies that all of the NET_BUFFER_LIST structures in the list at NetBufferLists include only data that matches the packet filter and multicast address list that are assigned to the miniport adapter.
Specifies that all the NET_BUFFER_LIST structures in the list at NetBufferLists belong to the same VM queue. A miniport driver must set this flag for all receive indications on a queue if the NDIS_RECEIVE_QUEUE_PARAMETERS_PER_QUEUE_RECEIVE_INDICATION flag was set in the Flags member of the NDIS_RECEIVE_QUEUE_PARAMETERS structure when that queue was allocated.
Specifies that all the NET_BUFFER_LIST structures in the list at NetBufferLists contain shared memory information that is valid. When this flag is set on a received NET_BUFFER_LIST, NDIS treats the shared memory information as valid. When this flag is not set, NDIS and drivers ignore the shared memory information. For example, intermediate drivers that modify packet data can use this flag to determine if data should be copied. Miniport drivers can use the flag to determine how to free the memory that is associated with a VM queue when a queue is deleted.
A miniport driver typically calls the NdisMIndicateReceiveNetBufferLists function from its MiniportInterruptDPC function. When a miniport driver calls NdisMIndicateReceiveNetBufferLists, it specifies a list of NET_BUFFER_LIST structures in the NetBufferLists parameter. NDIS passes the NET_BUFFER_LIST structures to the ProtocolReceiveNetBufferLists function of bound protocol drivers.
Miniport drivers must set the SourceHandle member of each NET_BUFFER_LIST structure to the same value as the MiniportAdapterHandle parameter.
If a miniport driver calls NdisMIndicateReceiveNetBufferLists and clears the NDIS_RECEIVE_FLAG_RESOURCES flag in the ReceiveFlags parameter, NDIS returns the indicated NET_BUFFER_LIST structures to the miniport driver's MiniportReturnNetBufferLists function. In this case, the miniport driver must not reclaim the NET_BUFFER_LIST structures until NDIS returns the NET_BUFFER_LIST structures to the miniport driver's MiniportReturnNetBufferLists function.
If a miniport driver calls NdisMIndicateReceiveNetBufferLists and sets the NDIS_RECEIVE_FLAG_RESOURCES flag in the ReceiveFlags parameter, this indicates that the miniport driver must regain ownership of the NET_BUFFER_LIST structures immediately. In this case, NDIS does not call the miniport driver's MiniportReturnNetBufferLists function to return the NET_BUFFER_LIST structures. Instead, NDIS returns the NET_BUFFER_LIST structures to the miniport driver upon return from NdisMIndicateReceiveNetBufferLists. The miniport driver should reclaim the NET_BUFFER_LIST structures immediately after NdisMIndicateReceiveNetBufferLists returns. To reclaim the NET_BUFFER_LIST structures, a miniport driver can call its own MiniportReturnNetBufferLists function.
Setting the NDIS_RECEIVE_FLAG_RESOURCES flag in the ReceiveFlags parameter forces the protocol drivers to copy the network data and release the NET_BUFFER_LIST structures to the miniport driver. Driver writers should design their miniport drivers with enough preallocated NET_BUFFER_LIST structures to avoid unnecessary copying.
|Windows version||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_SendRcv_Function|