81 if (
SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == 0xFFFFFFFF)
138 if (
SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
231 UINT DstSize, SrcSize;
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));
238 if (
SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == 0xFFFFFFFF)
242 if (
SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
291#undef NdisAdjustBufferLength
311#undef NDIS_BUFFER_TO_SPAN_PAGES
358 (*Buffer)->Next =
NULL;
467 "NumberOfDescriptors (%d) ProtocolReservedLength (%d).\n",
527#undef NdisBufferLength
550#undef NdisBufferVirtualAddress
592 UINT DstSize, SrcSize;
710 if (
Pool->FreeList) {
711 Temp =
Pool->FreeList;
847#undef NdisGetBufferPhysicalArraySize
870#undef NdisGetFirstBufferFromPacket
900 *_FirstBufferLength = 0;
901 *_FirstBufferVA =
NULL;
904 *_TotalBufferLength = *_FirstBufferLength;
912#undef NdisGetFirstBufferFromPacketSafe
937 *_FirstBufferLength = 0;
938 *_FirstBufferVA =
NULL;
941 *_TotalBufferLength = *_FirstBufferLength;
952#undef NdisQueryBuffer
978#undef NdisQueryBufferSafe
1002#undef NdisQueryBufferOffset
1045 while (NdisBuffer->Next) {
1046 Previous = NdisBuffer;
1047 NdisBuffer = NdisBuffer->Next;
1051 Previous->Next =
NULL;
1052 Packet->Private.Tail = Previous;
1093 Packet->Private.Head = NdisBuffer->Next;
1095 if (!NdisBuffer->Next)
1098 NdisBuffer->Next =
NULL;
1145 (*Buffer)->Next =
NULL;
1157 return Packet->Private.Pool;
1166 IN UINT ProtocolReservedSize)
1175#undef NdisGetPacketCancelId
1187#undef NdisSetPacketCancelId
1214 UINT DstSize, SrcSize;
1236 if (DstSize <
Count)
struct _NDISI_PACKET_POOL * PNDISI_PACKET_POOL
struct _NDISI_PACKET_POOL NDISI_PACKET_POOL
#define NDIS_DbgPrint(_t_, _x_)
VOID EXPORT NdisDprFreePacket(IN PNDIS_PACKET Packet)
VOID EXPORT NdisUnchainBufferAtBack(IN OUT PNDIS_PACKET Packet, OUT PNDIS_BUFFER *Buffer)
VOID EXPORT NdisAllocateBuffer(OUT PNDIS_STATUS Status, OUT PNDIS_BUFFER *Buffer, IN NDIS_HANDLE PoolHandle, IN PVOID VirtualAddress, IN UINT Length)
UINT CopyBufferToBufferChain(PNDIS_BUFFER DstBuffer, UINT DstOffset, PUCHAR SrcData, UINT Length)
FORCEINLINE ULONG SkipToOffset(IN PNDIS_BUFFER Buffer, IN UINT Offset, IN OUT PUCHAR *Data, IN OUT PUINT Size)
UINT CopyBufferChainToBuffer(PUCHAR DstData, PNDIS_BUFFER SrcBuffer, UINT SrcOffset, UINT Length)
VOID EXPORT NdisDprFreePacketNonInterlocked(IN PNDIS_PACKET Packet)
VOID EXPORT NdisIMCopySendCompletePerPacketInfo(IN PNDIS_PACKET DstPacket, IN PNDIS_PACKET SrcPacket)
VOID EXPORT NdisFreePacket(IN PNDIS_PACKET Packet)
VOID EXPORT NdisIMCopySendPerPacketInfo(IN PNDIS_PACKET DstPacket, IN PNDIS_PACKET SrcPacket)
VOID EXPORT NdisAllocateBufferPool(OUT PNDIS_STATUS Status, OUT PNDIS_HANDLE PoolHandle, IN UINT NumberOfDescriptors)
VOID EXPORT NdisCopyFromPacketToPacket(IN PNDIS_PACKET Destination, IN UINT DestinationOffset, IN UINT BytesToCopy, IN PNDIS_PACKET Source, IN UINT SourceOffset, OUT PUINT BytesCopied)
VOID EXPORT NdisDprAllocatePacket(OUT PNDIS_STATUS Status, OUT PNDIS_PACKET *Packet, IN NDIS_HANDLE PoolHandle)
VOID EXPORT NdisFreeBufferPool(IN NDIS_HANDLE PoolHandle)
UINT CopyPacketToBufferChain(PNDIS_BUFFER DstBuffer, UINT DstOffset, PNDIS_PACKET SrcPacket, UINT SrcOffset, UINT Length)
VOID EXPORT NdisAllocatePacketPoolEx(OUT PNDIS_STATUS Status, OUT PNDIS_HANDLE PoolHandle, IN UINT NumberOfDescriptors, IN UINT NumberOfOverflowDescriptors, IN UINT ProtocolReservedLength)
VOID EXPORT NdisAllocatePacket(OUT PNDIS_STATUS Status, OUT PNDIS_PACKET *Packet, IN NDIS_HANDLE PoolHandle)
VOID EXPORT NdisDprAllocatePacketNonInterlocked(OUT PNDIS_STATUS Status, OUT PNDIS_PACKET *Packet, IN NDIS_HANDLE PoolHandle)
UINT CopyPacketToBuffer(PUCHAR DstData, PNDIS_PACKET SrcPacket, UINT SrcOffset, UINT Length)
ULONG EXPORT NDIS_BUFFER_TO_SPAN_PAGES(IN PNDIS_BUFFER Buffer)
VOID EXPORT NdisUnchainBufferAtFront(IN OUT PNDIS_PACKET Packet, OUT PNDIS_BUFFER *Buffer)
UINT EXPORT NdisPacketSize(IN UINT ProtocolReservedSize)
NDIS_HANDLE EXPORT NdisGetPoolFromPacket(IN PNDIS_PACKET Packet)
VOID EXPORT NdisFreePacketPool(IN NDIS_HANDLE PoolHandle)
VOID EXPORT NdisGetFirstBufferFromPacket(IN PNDIS_PACKET _Packet, OUT PNDIS_BUFFER *_FirstBuffer, OUT PVOID *_FirstBufferVA, OUT PUINT _FirstBufferLength, OUT PUINT _TotalBufferLength)
VOID EXPORT NdisCopyBuffer(OUT PNDIS_STATUS Status, OUT PNDIS_BUFFER *Buffer, IN NDIS_HANDLE PoolHandle, IN PVOID MemoryDescriptor, IN UINT Offset, IN UINT Length)
VOID EXPORT NdisAllocatePacketPool(OUT PNDIS_STATUS Status, OUT PNDIS_HANDLE PoolHandle, IN UINT NumberOfDescriptors, IN UINT ProtocolReservedLength)
VOID EXPORT NdisCopyFromPacketToPacketSafe(IN PNDIS_PACKET Destination, IN UINT DestinationOffset, IN UINT BytesToCopy, IN PNDIS_PACKET Source, IN UINT SourceOffset, OUT PUINT BytesCopied, IN MM_PAGE_PRIORITY Priority)
#define KeReleaseSpinLock(sl, irql)
#define KeAcquireSpinLock(sl, irql)
#define KeGetCurrentIrql()
#define KeInitializeSpinLock(sl)
#define ExAllocatePool(type, size)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID NTAPI IoBuildPartialMdl(IN PMDL SourceMdl, IN PMDL TargetMdl, IN PVOID VirtualAddress, IN ULONG Length)
VOID NTAPI MmBuildMdlForNonPagedPool(IN PMDL Mdl)
enum _MM_PAGE_PRIORITY MM_PAGE_PRIORITY
struct _NDIS_PACKET * PNDIS_PACKET
#define fPACKET_ALLOCATED_BY_NDIS
#define NdisGetNextBuffer(CurrentBuffer, NextBuffer)
_Out_ PNDIS_HANDLE _In_ UINT _In_ UINT ProtocolReservedLength
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
struct _NDIS_PACKET_OOB_DATA NDIS_PACKET_OOB_DATA
struct _NDIS_PACKET_EXTENSION NDIS_PACKET_EXTENSION
_Out_ PNDIS_HANDLE _In_ UINT _In_ UINT NumberOfOverflowDescriptors
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)
_Out_ PNDIS_BUFFER _In_opt_ NDIS_HANDLE PoolHandle
#define NdisGetPacketCancelId(_Packet)
_Out_ PNDIS_HANDLE _In_ UINT NumberOfDescriptors
#define NDIS_PACKET_EXTENSION_FROM_PACKET(Packet)
#define NDIS_STATUS_FAILURE
#define NdisSetPacketCancelId(_Packet, _CancelId)
#define NdisQueryBufferOffset(_Buffer, _Offset, _Length)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET _In_ UINT _Out_ PUINT BytesCopied
#define NdisQueryBufferSafe(_Buffer, _VirtualAddress, _Length, _Priority)
#define NdisAdjustBufferLength(Buffer, Length)
_In_ UINT _In_ UINT BytesToCopy
#define NDIS_STATUS_SUCCESS
#define NdisGetFirstBufferFromPacketSafe(_Packet, _FirstBuffer, _FirstBufferVA, _FirstBufferLength, _TotalBufferLength, _Priority)
#define NdisGetBufferPhysicalArraySize(Buffer, ArraySize)
#define NdisQueryBuffer(_Buffer, _VirtualAddress, _Length)
#define NDIS_GET_PACKET_CANCEL_ID(Packet)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
#define NdisBufferVirtualAddress
#define NDIS_SET_PACKET_CANCEL_ID(Packet, CancelId)
struct _NDIS_PACKET NDIS_PACKET
#define NDIS_STATUS_RESOURCES
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
static UCHAR _Packet[1024]
#define KeAcquireSpinLockAtDpcLevel(SpinLock)
#define KeReleaseSpinLockFromDpcLevel(SpinLock)
PULONG MinorVersion OPTIONAL
USHORT NdisPacketOobOffset
NDIS_PACKET_PRIVATE Private
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, 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
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
_Must_inspect_result_ _In_ WDFMEMORY _In_ size_t SourceOffset
_Must_inspect_result_ _In_ WDFMEMORY _In_ size_t DestinationOffset
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
#define MmGetMdlByteOffset(_Mdl)
#define MmGetMdlByteCount(_Mdl)
#define MmGetSystemAddressForMdl(Mdl)
#define MmGetMdlVirtualAddress(_Mdl)
#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority)
#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, _Size)