ReactOS  0.4.14-dev-315-gbb6fece
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 }
signed char * PCHAR
Definition: retypes.h:7
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1548
MDL * PNDIS_BUFFER
Definition: ndis.h:343
#define NdisChainBufferAtFront(Packet, Buffer)
Definition: ndis.h:3106
PVOID PoolAllocateBuffer(ULONG Size)
Definition: mockpool.c:13
int NDIS_STATUS
Definition: ntddndis.h:471
_In_ LPGUID _In_ PVOID Data
Definition: classpnp.h:778
Definition: bufpool.h:45
VOID EXPORT NdisAllocateBuffer(OUT PNDIS_STATUS Status, OUT PNDIS_BUFFER *Buffer, IN NDIS_HANDLE PoolHandle, IN PVOID VirtualAddress, IN UINT Length)
Definition: buffer.c:334
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
NDIS_HANDLE GlobalBufferPool
Definition: routines.c:4
Status
Definition: gdiplustypes.h:24
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
Definition: mmixer.c:131
#define STATUS_NO_MEMORY
Definition: ntstatus.h:246
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
return STATUS_SUCCESS
Definition: btrfs.c:2938