다음을 통해 공유


TdiCopyLookaheadData macro

The TdiCopyLookaheadData function safely copies receive data indicated in a lookahead buffer to the transport protocol by the underlying NDIS driver.

Syntax

VOID TdiCopyLookaheadData(
  [in] PVOID Destination,
  [in] PVOID Source,
  [in] ULONG Length,
  [in] ULONG ReceiveFlags
);

Parameters

  • Destination [in]
    Pointer to a caller-supplied buffer into which to copy the data.

  • Source [in]
    Pointer to the source buffer from which to copy the data.

  • Length [in]
    Specifies how many bytes of data to copy.

  • ReceiveFlags [in]
    Specifies a combination (ORed) of TDI_RECEIVE_XXX flags of which only the following is pertinent to this call:

    • TDI_RECEIVE_COPY_LOOKAHEAD
      Must be set if the underlying NIC driver set the NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA flag in response to the protocol's binding-time call to NdisRequest with the OID_GEN_MAC_OPTIONS query. Otherwise, this flag must be clear in the given ReceiveFlags.

Return value

None

Remarks

TdiCopyLookaheadData can be called by a transport's ProtocolReceive function to copy receive data from a lookahead buffer that was indicated up by the underlying NIC driver. In particular, TdiCopyLookaheadData must be called if the underlying NIC driver did not set the NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA flag in response to the transport's OID_GEN_MAC_OPTIONS query

However, TdiCopyLookaheadData can be called by any NDIS driver's ProtocolReceive function, whatever the nature of the receive buffers on the underlying NIC.

Any driver that exports a ProtocolReceive function can call TdiCopyLookaheadData.

Callers of TdiCopyLookaheadData can be running at any IRQL if the buffer at Destination was allocated from nonpaged pool. Otherwise, a caller must be running at IRQL < DISPATCH_LEVEL.

Note   The TDI feature is deprecated and will be removed in future versions of Microsoft Windows. Depending on how you use TDI, use either the Winsock Kernel (WSK) or Windows Filtering Platform (WFP). For more information about WFP and WSK, see Windows Filtering Platform and Winsock Kernel. For a Windows Core Networking blog entry about WSK and TDI, see Introduction to Winsock Kernel (WSK).

 

Requirements

Target platform

Desktop

Header

Tdikrnl.h (include TdiKrnl.h)

IRQL

See Remarks section.

See also

NdisRequest

ProtocolReceive

 

 

Send comments about this topic to Microsoft