NdisCopyLookaheadData (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

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 Value

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

Header ndis.h
Library ndis.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
NdisRequest
ProtocolReceive
OID_GEN_MAC_OPTIONS