Bewerken

Delen via


NdisMCoIndicateReceiveNetBufferLists function (ndis.h)

The NdisMCoIndicateReceiveNetBufferLists function indicates that the miniport driver received data from the network.

Syntax

void NdisMCoIndicateReceiveNetBufferLists(
  [in] IN NDIS_HANDLE      NdisVcHandle,
  [in] IN PNET_BUFFER_LIST NetBufferLists,
  [in] IN ULONG            NumberOfNetBufferLists,
  [in] IN ULONG            CoReceiveFlags
);

Parameters

[in] NdisVcHandle

A handle that identifies a virtual connection (VC). The miniport driver obtained this handle as an input parameter to its MiniportCoCreateVc function, either when a client set up an outgoing call or when the call manager created a VC for a client-registered service access point (SAP) to indicate an incoming-call notification on.

[in] NetBufferLists

A linked list of NET_BUFFER_LIST structures that the miniport driver allocated.

[in] NumberOfNetBufferLists

The number of NET_BUFFER_LIST structures that are in the linked list of structures that NetBufferLists specifies.

[in] CoReceiveFlags

Flags that define attributes for the send operation. The flags can be combined with a bitwise OR operation. To clear all of the flags, set this parameter to zero. NdisMCoIndicateReceiveNetBufferLists supports the following flags:

NDIS_RECEIVE_FLAGS_DISPATCH_LEVEL

The current IRQL is DISPATCH_LEVEL. For more information about this flag, see Dispatch IRQL Tracking.

NDIS_RECEIVE_FLAGS_RESOURCES

The miniport driver reclaims ownership of the NET_BUFFER_LIST structures and any attached NET_BUFFER structures immediately after NdisMCoIndicateReceiveNetBufferLists returns.

Return value

None

Remarks

A miniport driver typically calls the NdisMCoIndicateReceiveNetBufferLists function from its MiniportInterruptDPC function. When a miniport driver calls NdisMCoIndicateReceiveNetBufferLists, it specifies a list of NET_BUFFER_LIST structures at the NetBufferLists parameter. NDIS then passes the NET_BUFFER_LIST structures to bound protocol drivers.

Miniport drivers must set the SourceHandle member of each NET_BUFFER_LIST structure to the same value as the NdisVcHandle parameter so that NDIS can return the NET_BUFFER_LIST structures to the correct miniport driver.

If a miniport driver calls NdisMCoIndicateReceiveNetBufferLists and clears the NDIS_RECEIVE_FLAGS_RESOURCES flag in the CoReceiveFlags parameter, NDIS returns the NET_BUFFER_LIST structures that NetBufferLists specifies 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 NdisMCoIndicateReceiveNetBufferLists and sets the NDIS_RECEIVE_FLAGS_RESOURCES flag in the CoReceiveFlags parameter, 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 when NdisMCoIndicateReceiveNetBufferLists returns. The miniport driver should reclaim the NET_BUFFER_LIST structures immediately after NdisMCoIndicateReceiveNetBufferLists returns. To reclaim the NET_BUFFER_LIST structures, a miniport driver can call its own MiniportReturnNetBufferLists function.

If a miniport driver sets the NDIS_RECEIVE_FLAGS_RESOURCES flag in the CoReceiveFlags parameter, the protocol drivers must copy the network data and release the NET_BUFFER_LIST structures to the miniport driver. You should design your miniport drivers with enough preallocated NET_BUFFER_LIST structures to avoid unnecessary copying.

The caller of NdisMCoIndicateReceiveNetBufferLists must properly initialize the NET_BUFFER_LIST structures, the attached NET_BUFFER structures, and any attached memory descriptor lists (MDLs).

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL <= DISPATCH_LEVEL
DDI compliance rules Irql_MCO_Function(ndis)

See also

MiniportCoCreateVc

MiniportInterruptDPC

MiniportReturnNetBufferLists

NET_BUFFER

NET_BUFFER_LIST