ReactOS 0.4.15-dev-8231-g29a56f3
util.h File Reference
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ETH_HEADER
 

Macros

#define ETH_IS_LOCALLY_ADMINISTERED(Address)    ((BOOLEAN)(((PUCHAR)(Address))[0] & ((UCHAR)0x02)))
 
#define ETH_IS_EMPTY(Address)
 
#define DC_WRITE_BARRIER()   KeMemoryBarrier()
 
#define DC_PG_DATA
 

Typedefs

typedef struct _ETH_HEADER ETH_HEADER
 
typedef struct _ETH_HEADERPETH_HEADER
 

Functions

FORCEINLINE USHORT DcRetrieveWord (_In_ const VOID *Data)
 
FORCEINLINE PSINGLE_LIST_ENTRY DcPopEntryList (_Inout_ PSINGLE_LIST_ENTRY ListHead)
 

Macro Definition Documentation

◆ DC_PG_DATA

#define DC_PG_DATA

Definition at line 41 of file util.h.

◆ DC_WRITE_BARRIER

#define DC_WRITE_BARRIER ( )    KeMemoryBarrier()

Definition at line 30 of file util.h.

◆ ETH_IS_EMPTY

#define ETH_IS_EMPTY (   Address)
Value:
((BOOLEAN)((((PUCHAR)(Address))[0] | ((PUCHAR)(Address))[1] | ((PUCHAR)(Address))[2] | \
((PUCHAR)(Address))[3] | ((PUCHAR)(Address))[4] | ((PUCHAR)(Address))[5]) == 0))
#define BOOLEAN
Definition: pedump.c:73
static WCHAR Address[46]
Definition: ping.c:68
unsigned char * PUCHAR
Definition: typedefs.h:53

Definition at line 22 of file util.h.

◆ ETH_IS_LOCALLY_ADMINISTERED

#define ETH_IS_LOCALLY_ADMINISTERED (   Address)     ((BOOLEAN)(((PUCHAR)(Address))[0] & ((UCHAR)0x02)))

Definition at line 19 of file util.h.

Typedef Documentation

◆ ETH_HEADER

◆ PETH_HEADER

Function Documentation

◆ DcPopEntryList()

Definition at line 71 of file util.h.

73{
74 PSINGLE_LIST_ENTRY FirstEntry;
75
76 FirstEntry = ListHead->Next;
77
78 ASSERT(FirstEntry);
79
80 ListHead->Next = FirstEntry->Next;
81
82 return FirstEntry;
83}
#define ASSERT(a)
Definition: mode.c:44
Definition: ntbasedef.h:628
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629

Referenced by DcHandleRxReceivedFrames().

◆ DcRetrieveWord()

FORCEINLINE USHORT DcRetrieveWord ( _In_ const VOID Data)

Definition at line 47 of file util.h.

49{
50#if defined(_M_IX86) || defined(_M_AMD64)
51 /* Supported by ISA */
52 return *(const UNALIGNED USHORT*)Data;
53#else
55
56 NdisMoveMemory(&Result, Data, sizeof(Result));
57 return Result;
58#endif
59}
#define UNALIGNED
Definition: crtdefs.h:144
#define NdisMoveMemory(Destination, Source, Length)
Definition: ndis.h:3896
unsigned short USHORT
Definition: pedump.c:61
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by SRomChecksumValid(), SRomDecodeBlockGpr(), SRomDecodeBlockHmr(), SRomDecodeBlockMii(), SRomDecodeBlockReset(), SRomDecodeBlockSia(), SRomDecodeBlockSym(), SRomParse(), SRomParse21041Block(), and SRomParseHeader().