ReactOS  0.4.13-dev-241-g63286c6
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
63  UINT Length;
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 }
signed char * PCHAR
Definition: retypes.h:7
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
#define DPFLTR_MASK
Definition: kdtypes.h:34
PVOID Header
Definition: ip.h:83
#define DEBUG_IP
Definition: debug.h:26
UINT TotalSize
Definition: ip.h:86
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define DEBUG_PBUFFER
Definition: debug.h:20
UINT HeaderSize
Definition: ip.h:84
unsigned int UINT
Definition: ndis.h:50
PNDIS_PACKET NdisPacket
Definition: ip.h:88
#define MIN_TRACE
Definition: debug.h:14
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(), and PrepareICMPPacket().

Variable Documentation

◆ RandomNumber

UINT RandomNumber = 0x12345678
static

Definition at line 13 of file routines.c.

Referenced by Random().