16 PUINT FirstBufferLength,
17 PUINT TotalBufferLength)
21 _Buffer = (
Packet)->Private.Head;
22 *(FirstBuffer) = _Buffer;
24 if (_Buffer !=
NULL) {
26 _Buffer = _Buffer->Next;
28 *(FirstBufferLength) = 0;
29 *(TotalBufferLength) = *(FirstBufferLength);
30 while (_Buffer !=
NULL) {
32 _Buffer = _Buffer->Next;
125 if (
SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == -1)
182 if (
SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == -1)
274 PCHAR DstData, SrcData;
275 UINT DstSize, SrcSize;
278 TI_DbgPrint(
DEBUG_PBUFFER, (
"DstBuffer (0x%X) DstOffset (0x%X) SrcPacket (0x%X) SrcOffset (0x%X) Length (%d)\n", DstBuffer, DstOffset, SrcPacket, SrcOffset,
Length));
282 if (
SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == -1)
287 if (
SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == -1)
353 Adjust = Available - Needed;
361 NdisBuffer->ByteOffset +=
Adjust;
362 NdisBuffer->ByteCount -=
Adjust;
365 return NdisBuffer->MappedSystemVa;
386 OldSize = NdisBuffer->ByteCount;
389 NdisBuffer->ByteCount =
Size;
404 }
else NewBuf =
Data;
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
VOID EXPORT NdisAllocateBuffer(OUT PNDIS_STATUS Status, OUT PNDIS_BUFFER *Buffer, IN NDIS_HANDLE PoolHandle, IN PVOID VirtualAddress, IN UINT Length)
VOID EXPORT NdisFreePacket(IN PNDIS_PACKET Packet)
VOID EXPORT NdisAllocatePacket(OUT PNDIS_STATUS Status, OUT PNDIS_PACKET *Packet, IN NDIS_HANDLE PoolHandle)
#define TI_DbgPrint(_t_, _x_)
NDIS_HANDLE GlobalBufferPool
NDIS_HANDLE GlobalPacketPool
#define exAllocatePool(x, y)
#define UntrackFL(x, y, z)
#define TrackWithTag(w, x, y, z)
#define FreeNdisPacket(x)
UINT CopyBufferToBufferChain(PNDIS_BUFFER DstBuffer, UINT DstOffset, PCHAR SrcData, UINT Length)
void GetDataPtr(PNDIS_PACKET Packet, UINT Offset, PCHAR *DataOut, PUINT Size)
UINT CopyPacketToBuffer(PCHAR DstData, PNDIS_PACKET SrcPacket, UINT SrcOffset, UINT Length)
NDIS_STATUS PrependPacket(PNDIS_PACKET Packet, PCHAR Data, UINT Length, BOOLEAN Copy)
UINT CopyBufferChainToBuffer(PCHAR DstData, PNDIS_BUFFER SrcBuffer, UINT SrcOffset, UINT Length)
NDIS_STATUS AllocatePacketWithBufferX(PNDIS_PACKET *NdisPacket, PCHAR Data, UINT Len, PCHAR File, UINT Line)
UINT CopyPacketToBufferChain(PNDIS_BUFFER DstBuffer, UINT DstOffset, PNDIS_PACKET SrcPacket, UINT SrcOffset, UINT Length)
VOID XNdisQueryBuffer(PNDIS_BUFFER Buffer, PVOID *VirtualAddress, PUINT Length)
UINT ResizePacket(PNDIS_PACKET Packet, UINT Size)
PVOID AdjustPacket(PNDIS_PACKET Packet, UINT Available, UINT Needed)
__inline INT SkipToOffset(PNDIS_BUFFER Buffer, UINT Offset, PCHAR *Data, PUINT Size)
VOID XNdisGetFirstBufferFromPacket(PNDIS_PACKET Packet, PNDIS_BUFFER *FirstBuffer, PVOID *FirstBufferVA, PUINT FirstBufferLength, PUINT TotalBufferLength)
VOID FreeNdisPacketX(PNDIS_PACKET Packet, PCHAR File, UINT Line)
PVOID PoolAllocateBuffer(ULONG Size)
#define NdisGetNextBuffer(CurrentBuffer, NextBuffer)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
static __inline VOID NdisQueryPacket(IN PNDIS_PACKET Packet, OUT PUINT PhysicalBufferCount OPTIONAL, OUT PUINT BufferCount OPTIONAL, OUT PNDIS_BUFFER *FirstBuffer OPTIONAL, OUT PUINT TotalPacketLength OPTIONAL)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET _In_ UINT _Out_ PUINT BytesCopied
_In_ UINT _In_ UINT BytesToCopy
#define NDIS_STATUS_SUCCESS
#define NDIS_STATUS_NOT_ACCEPTED
#define NdisChainBufferAtFront(Packet, Buffer)
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
static LONGLONG Adjust(LONGLONG value, const LONGLONG *pModifier, DWORD dwFlags)
#define RtlCopyMemory(Destination, Source, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
#define MmGetMdlByteCount(_Mdl)
#define MmGetMdlVirtualAddress(_Mdl)