From d0917c6faf71d914e4e97825eaaec41722ea52f6 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 13 Nov 2004 12:28:08 +0000 Subject: [PATCH] - Add NdisCopyLookaheadData macro. svn path=/trunk/; revision=11642 --- reactos/w32api/include/ddk/ndis.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/reactos/w32api/include/ddk/ndis.h b/reactos/w32api/include/ddk/ndis.h index f2fdc2a2e28..3b645480485 100644 --- a/reactos/w32api/include/ddk/ndis.h +++ b/reactos/w32api/include/ddk/ndis.h @@ -1597,6 +1597,36 @@ NdisCopyFromPacketToPacket( IN UINT SourceOffset, OUT PUINT BytesCopied); +/* + * VOID + * NdisCopyLookaheadData( + * IN PVOID Destination, + * IN PVOID Source, + * IN ULONG Length, + * IN ULONG ReceiveFlags); + */ + +#ifdef _M_IX86 +#define NdisCopyLookaheadData(Destination, Source, Length, MacOptions) \ + RtlCopyMemory(Destination, Source, Length) +#else +#define NdisCopyLookaheadData(Destination, Source, Length, MacOptions) \ + { \ + if ((MacOptions) & NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA) \ + { \ + RtlCopyMemory(_Destination, _Source, _Length); \ + } \ + else \ + { \ + PUCHAR _Src = (PUCHAR)(Source); \ + PUCHAR _Dest = (PUCHAR)(Destination); \ + PUCHAR _End = _Dest + (Length); \ + while (_Dest < _End) \ + *_Dest++ = *_Src++; \ + } \ + } +#endif + NDISAPI VOID DDKAPI