Go to the source code of this file.
|
UINT | CopyBufferToBufferChain (PNDIS_BUFFER DstBuffer, UINT DstOffset, PUCHAR SrcData, UINT Length) |
|
UINT | CopyBufferChainToBuffer (PUCHAR DstData, PNDIS_BUFFER SrcBuffer, UINT SrcOffset, UINT Length) |
|
UINT | CopyPacketToBuffer (PUCHAR DstData, PNDIS_PACKET SrcPacket, UINT SrcOffset, UINT Length) |
|
UINT | CopyPacketToBufferChain (PNDIS_BUFFER DstBuffer, UINT DstOffset, PNDIS_PACKET SrcPacket, UINT SrcOffset, UINT Length) |
|
◆ NDIS_BUFFER_POOL
◆ NDISI_PACKET_POOL
◆ NETWORK_HEADER
◆ PNDIS_BUFFER_POOL
◆ PNDISI_PACKET_POOL
◆ PNETWORK_HEADER
◆ CopyBufferChainToBuffer()
Definition at line 113 of file buffer.c.
131{
134
136
137
138 if (
SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
139 return 0;
140
141
143 for (;;) {
145
147
151
154 break;
155
157 if (SrcSize == 0) {
158
159
161 if (!SrcBuffer)
162 break;
163
165 }
166 }
167
169}
#define NDIS_DbgPrint(_t_, _x_)
FORCEINLINE ULONG SkipToOffset(IN PNDIS_BUFFER Buffer, IN UINT Offset, IN OUT PUCHAR *Data, IN OUT PUINT Size)
#define NdisGetNextBuffer(CurrentBuffer, NextBuffer)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET _In_ UINT _Out_ PUINT BytesCopied
_In_ UINT _In_ UINT BytesToCopy
#define NdisQueryBuffer(_Buffer, _VirtualAddress, _Length)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define RtlCopyMemory(Destination, Source, Length)
Referenced by CopyPacketToBuffer(), and MiniIndicateReceivePacket().
◆ CopyBufferToBufferChain()
◆ CopyPacketToBuffer()
Definition at line 172 of file buffer.c.
190{
195
197
199 &FirstBuffer,
201 &FirstLength,
203
205}
UINT CopyBufferChainToBuffer(PUCHAR DstData, PNDIS_BUFFER SrcBuffer, UINT SrcOffset, UINT Length)
VOID EXPORT NdisGetFirstBufferFromPacket(IN PNDIS_PACKET _Packet, OUT PNDIS_BUFFER *_FirstBuffer, OUT PVOID *_FirstBufferVA, OUT PUINT _FirstBufferLength, OUT PUINT _TotalBufferLength)
Referenced by ARPReceive(), GetPacketTypeFromNdisPacket(), IPReceive(), IPv4Receive(), ProIndicatePacket(), and ReassembleDatagram().
◆ CopyPacketToBufferChain()
Definition at line 208 of file buffer.c.
228{
231 UINT DstSize, SrcSize;
233
234 NDIS_DbgPrint(
MAX_TRACE, (
"DstBuffer (0x%X) DstOffset (0x%X) SrcPacket (0x%X) SrcOffset (0x%X) Length (%d)\n", DstBuffer, DstOffset, SrcPacket, SrcOffset,
Length));
235
236
238 if (
SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == 0xFFFFFFFF)
239 return 0;
240
242 if (
SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
243 return 0;
244
245 for (Total = 0;;) {
246
249 else
253
255
259 break;
260
262 if (DstSize == 0) {
263
264
266 if (!DstBuffer)
267 break;
268
270 }
271
273 if (SrcSize == 0) {
274
275
277 if (!SrcBuffer)
278 break;
279
281 }
282 }
283
284 return Total;
285}