ReactOS 0.4.15-dev-8145-ga541a46
pool.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

NDIS_STATUS PrependPacket (PNDIS_PACKET Packet, PCHAR Data, UINT Len, BOOLEAN Copy)
 

Function Documentation

◆ PrependPacket()

NDIS_STATUS PrependPacket ( PNDIS_PACKET  Packet,
PCHAR  Data,
UINT  Len,
BOOLEAN  Copy 
)

Definition at line 394 of file mockbuffer.c.

395 {
398 PCHAR NewBuf;
399
400 if( Copy ) {
401 NewBuf = PoolAllocateBuffer( Length );
402 if( !NewBuf ) return STATUS_NO_MEMORY;
403 RtlCopyMemory( NewBuf, Data, Length );
404 } else NewBuf = Data;
405
407 if( Status != NDIS_STATUS_SUCCESS ) return Status;
408
410
411 return STATUS_SUCCESS;
412}
Definition: bufpool.h:45
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
Definition: mmixer.c:126
VOID EXPORT NdisAllocateBuffer(OUT PNDIS_STATUS Status, OUT PNDIS_BUFFER *Buffer, IN NDIS_HANDLE PoolHandle, IN PVOID VirtualAddress, IN UINT Length)
Definition: buffer.c:336
Status
Definition: gdiplustypes.h:25
NDIS_HANDLE GlobalBufferPool
Definition: routines.c:4
PVOID PoolAllocateBuffer(ULONG Size)
Definition: mockpool.c:13
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1549
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
MDL * PNDIS_BUFFER
Definition: ndis.h:343
#define NdisChainBufferAtFront(Packet, Buffer)
Definition: ndis.h:3106
int NDIS_STATUS
Definition: ntddndis.h:475
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
#define STATUS_SUCCESS
Definition: shellext.h:65
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
char * PCHAR
Definition: typedefs.h:51