ReactOS 0.4.16-dev-297-gc569aee
routines.c File Reference
#include "precomp.h"
Include dependency graph for routines.c:

Go to the source code of this file.

Functions

UINT Random (VOID)
 
VOID DisplayIPPacket (PIP_PACKET IPPacket)
 

Variables

static UINT RandomNumber = 0x12345678
 

Function Documentation

◆ DisplayIPPacket()

VOID DisplayIPPacket ( PIP_PACKET  IPPacket)

Definition at line 59 of file routines.c.

61{
62#if DBG
64 PCHAR CharBuffer;
65
66 /* DbgQueryDebugFilterState returns (NTSTATUS)TRUE, (NTSTATUS)FALSE or a failure status code */
69 return;
70 }
71
72 if (!IPPacket) {
73 TI_DbgPrint(MIN_TRACE, ("Cannot display null packet.\n"));
74 return;
75 }
76
77 TI_DbgPrint(MIN_TRACE, ("IPPacket is at (0x%X).\n", IPPacket));
78 TI_DbgPrint(MIN_TRACE, ("Header buffer is at (0x%X).\n", IPPacket->Header));
79 TI_DbgPrint(MIN_TRACE, ("Header size is (%d).\n", IPPacket->HeaderSize));
80 TI_DbgPrint(MIN_TRACE, ("TotalSize (%d).\n", IPPacket->TotalSize));
81 TI_DbgPrint(MIN_TRACE, ("NdisPacket (0x%X).\n", IPPacket->NdisPacket));
82
83 CharBuffer = IPPacket->Header;
84 Length = IPPacket->HeaderSize;
85 DisplayIPHeader(CharBuffer, Length);
86#endif
87}
LONG NTSTATUS
Definition: precomp.h:26
#define MIN_TRACE
Definition: debug.h:14
#define TRUE
Definition: types.h:120
@ DPFLTR_TCPIP_ID
Definition: dpfilter.h:58
#define DEBUG_PBUFFER
Definition: debug.h:20
#define DEBUG_IP
Definition: debug.h:26
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
unsigned int UINT
Definition: ndis.h:50
#define DPFLTR_MASK
Definition: kdtypes.h:34
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
PNDIS_PACKET NdisPacket
Definition: ip.h:88
UINT HeaderSize
Definition: ip.h:84
PVOID Header
Definition: ip.h:83
UINT TotalSize
Definition: ip.h:86
char * PCHAR
Definition: typedefs.h:51
NTSYSAPI NTSTATUS NTAPI DbgQueryDebugFilterState(_In_ ULONG ComponentId, _In_ ULONG Level)

◆ Random()

UINT Random ( VOID  )

Definition at line 16 of file routines.c.

23{
24 RandomNumber ^= 0x78563412;
25
26 return RandomNumber;
27}
static UINT RandomNumber
Definition: routines.c:13

Referenced by AddGenericHeaderIPv4().

Variable Documentation

◆ RandomNumber

UINT RandomNumber = 0x12345678
static

Definition at line 13 of file routines.c.

Referenced by Random().