NdisCopyLookaheadData

This function safely copies receive data indicated in a look-ahead buffer to the transport protocol by the underlying NDIS driver.

VOID NdisCopyLookaheadData(
  PVOID Destination,
  PVOID Source,
  ULONG Length,
  ULONG MacOptions
);

Parameters

  • Destination
    [in] Points to a caller-supplied buffer into which to copy the data.
  • Source
    [in] Points to the source buffer from which to copy the data.
  • Length
    [in] Specifies how many bytes of data to copy.
  • MacOptions
    [in] Specifies a combination (ORed) of flags, which should be identical to the bit mask that the underlying driver returned in response to the protocol's binding-time call to NdisRequest with the OID_GEN_MAC_OPTIONS query.

Return Values

None.

Remarks

A transport's ProtocolReceive function can call NdisCopyLookaheadData to copy receive data from a look-ahead buffer indicated by the underlying NIC driver. In particular, NdisCopyLookaheadData 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, NdisCopyLookaheadData 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 NdisCopyLookaheadData.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.

See Also

NdisRequest | ProtocolReceive | OID_GEN_MAC_OPTIONS

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.