Note NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.
NdisCopyLookaheadData safely copies receive data indicated in a lookahead buffer to the transport protocol by the underlying NDIS driver.
VOID NdisCopyLookaheadData( _In_ PVOID Destination, _In_ PVOID Source, _In_ ULONG Length, _In_ ULONG MacOptions );
- 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.
- MacOptions [in]
Specifies a combination (ORed) of flags, which should be identical to the bitmask that the underlying driver returned in response to the protocol's binding-time call to NdisRequest with the OID_GEN_MAC_OPTIONS query.
NdisCopyLookaheadData 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, 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. For more information about this OID request, see NDIS Object Identifiers.
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.
Callers of NdisCopyLookaheadData 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.
|Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.|
|See Remarks section|