ReactOS  0.4.15-dev-1197-g8081ba9
ParaNdis-Debug.c File Reference
#include "ndis56common.h"
#include "stdarg.h"
#include "ntstrsafe.h"
Include dependency graph for ParaNdis-Debug.c:

Go to the source code of this file.

Classes

struct  _tagBugCheckStaticData
 
struct  _tagBugCheckData
 

Macros

#define MAX_CONTEXTS   4
 
#define MAX_HISTORY   2
 

Typedefs

typedef BOOLEAN(* KeRegisterBugCheckReasonCallbackType) (__out PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord, __in PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine, __in KBUGCHECK_CALLBACK_REASON Reason, __in PUCHAR Component)
 
typedef BOOLEAN(* KeDeregisterBugCheckReasonCallbackType) (__inout PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord)
 
typedef ULONG(* vDbgPrintExType) (__in ULONG ComponentId, __in ULONG Level, __in PCCH Format, __in va_list arglist)
 
typedef struct _tagBugCheckStaticData tBugCheckStaticData
 
typedef struct _tagBugCheckData tBugCheckData
 

Functions

static VOID NTAPI ParaNdis_OnBugCheck (IN KBUGCHECK_CALLBACK_REASON Reason, IN PKBUGCHECK_REASON_CALLBACK_RECORD Record, IN OUT PVOID ReasonSpecificData, IN ULONG ReasonSpecificDataLength)
 
static VOID ParaNdis_PrepareBugCheckData ()
 
static ULONG DummyPrintProcedure (__in ULONG ComponentId, __in ULONG Level, __in PCCH Format, __in va_list arglist)
 
static BOOLEAN KeRegisterBugCheckReasonCallbackDummyProc (__out PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord, __in PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine, __in KBUGCHECK_CALLBACK_REASON Reason, __in PUCHAR Component)
 
BOOLEAN KeDeregisterBugCheckReasonCallbackDummyProc (__inout PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord)
 
void _LogOutEntry (int level, const char *s)
 defined(WPP_EVENT_TRACING) || defined(WPP_USE_BYPASS) More...
 
void _LogOutExitValue (int level, const char *s, ULONG value)
 
void _LogOutString (int level, const char *s)
 
VOID WppEnableCallback (__in LPCGUID Guid, __in __int64 Logger, __in BOOLEAN Enable, __in ULONG Flags, __in UCHAR Level)
 
void ParaNdis_DebugInitialize (PVOID DriverObject, PVOID RegistryPath)
 
void ParaNdis_DebugCleanup (PDRIVER_OBJECT pDriverObject)
 
void ParaNdis_DebugRegisterMiniport (PARANDIS_ADAPTER *pContext, BOOLEAN bRegister)
 
static UINT FillDataOnBugCheck ()
 

Variables

int virtioDebugLevel = 1
 
int nDebugLevel = 1
 
int bDebugPrint = 1
 
static NDIS_SPIN_LOCK CrashLock
 
static KBUGCHECK_REASON_CALLBACK_ROUTINE ParaNdis_OnBugCheck
 
static vDbgPrintExType PrintProcedure = DummyPrintProcedure
 
static KeRegisterBugCheckReasonCallbackType BugCheckRegisterCallback = KeRegisterBugCheckReasonCallbackDummyProc
 
static KeDeregisterBugCheckReasonCallbackType BugCheckDeregisterCallback = KeDeregisterBugCheckReasonCallbackDummyProc
 
KBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord
 
DEBUGPRINTFUNC pDebugPrint = DbgPrint
 
DEBUGPRINTFUNC VirtioDebugPrintProc = DbgPrint
 
static tBugCheckData BugCheckData
 
static BOOLEAN bNative = TRUE
 

Macro Definition Documentation

◆ MAX_CONTEXTS

#define MAX_CONTEXTS   4

Definition at line 253 of file ParaNdis-Debug.c.

◆ MAX_HISTORY

#define MAX_HISTORY   2

Definition at line 257 of file ParaNdis-Debug.c.

Typedef Documentation

◆ KeDeregisterBugCheckReasonCallbackType

typedef BOOLEAN(* KeDeregisterBugCheckReasonCallbackType) (__inout PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord)

Definition at line 61 of file ParaNdis-Debug.c.

◆ KeRegisterBugCheckReasonCallbackType

◆ tBugCheckData

◆ tBugCheckStaticData

◆ vDbgPrintExType

Definition at line 65 of file ParaNdis-Debug.c.

Function Documentation

◆ _LogOutEntry()

void _LogOutEntry ( int  level,
const char s 
)

defined(WPP_EVENT_TRACING) || defined(WPP_USE_BYPASS)

Definition at line 153 of file ParaNdis-Debug.c.

154 {
155  DPrintf(level, ("[%s]=>", s));
156 }
GLint level
Definition: gl.h:1546
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
GLdouble s
Definition: gl.h:2039

◆ _LogOutExitValue()

void _LogOutExitValue ( int  level,
const char s,
ULONG  value 
)

Definition at line 158 of file ParaNdis-Debug.c.

159 {
160  DPrintf(level, ("[%s]<=0x%X", s, value));
161 }
GLint level
Definition: gl.h:1546
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
GLdouble s
Definition: gl.h:2039

◆ _LogOutString()

void _LogOutString ( int  level,
const char s 
)

Definition at line 163 of file ParaNdis-Debug.c.

164 {
165  DPrintf(level, ("[%s]", s));
166 }
GLint level
Definition: gl.h:1546
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
GLdouble s
Definition: gl.h:2039

Referenced by DriverEntry().

◆ DummyPrintProcedure()

static ULONG DummyPrintProcedure ( __in ULONG  ComponentId,
__in ULONG  Level,
__in PCCH  Format,
__in va_list  arglist 
)
static

Definition at line 72 of file ParaNdis-Debug.c.

78 {
79  return 0;
80 }

◆ FillDataOnBugCheck()

static UINT FillDataOnBugCheck ( )
static

Definition at line 309 of file ParaNdis-Debug.c.

310 {
311  UINT i, n = 0;
313  for (i = 0; i < MAX_CONTEXTS; ++i)
314  {
317  if (!p) continue;
318  pSave->nofPacketsToComplete = p->NetTxPacketsToReturn;
319  pSave->nofReadyTxBuffers = p->nofFreeHardwareBuffers;
321  pSave->LastTxCompletionTimeStamp = p->LastTxCompletionTimeStamp;
323  ++n;
324  }
325  return n;
326 }
void ParaNdis_CallOnBugCheck(PARANDIS_ADAPTER *pContext)
GLdouble n
Definition: glext.h:7729
tBugCheckStaticDataHeader Header
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
if(!(yy_init))
Definition: macro.lex.yy.c:714
static tBugCheckData BugCheckData
LARGE_INTEGER LastInterruptTimeStamp
Definition: DebugData.h:119
VOID EXPORT NdisGetCurrentSystemTime(IN OUT PLARGE_INTEGER pSystemTime)
Definition: time.c:51
LARGE_INTEGER LastTxCompletionTimeStamp
Definition: DebugData.h:120
unsigned int UINT
Definition: ndis.h:50
tBugCheckStaticData StaticData
#define PARANDIS_GET_LAST_INTERRUPT_TIMESTAMP(p)
Definition: DebugData.h:109
#define MAX_CONTEXTS
LARGE_INTEGER qCrashTime
Definition: DebugData.h:78
GLfloat GLfloat p
Definition: glext.h:8902
tBugCheckPerNicDataContent PerNicData[MAX_CONTEXTS]
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by ParaNdis_OnBugCheck().

◆ KeDeregisterBugCheckReasonCallbackDummyProc()

BOOLEAN KeDeregisterBugCheckReasonCallbackDummyProc ( __inout PKBUGCHECK_REASON_CALLBACK_RECORD  CallbackRecord)

Definition at line 92 of file ParaNdis-Debug.c.

95 {
96  return FALSE;
97 }
#define FALSE
Definition: types.h:117

◆ KeRegisterBugCheckReasonCallbackDummyProc()

static BOOLEAN KeRegisterBugCheckReasonCallbackDummyProc ( __out PKBUGCHECK_REASON_CALLBACK_RECORD  CallbackRecord,
__in PKBUGCHECK_REASON_CALLBACK_ROUTINE  CallbackRoutine,
__in KBUGCHECK_CALLBACK_REASON  Reason,
__in PUCHAR  Component 
)
static

Definition at line 81 of file ParaNdis-Debug.c.

87 {
88  CallbackRecord->State = 0;
89  return FALSE;
90 }
KBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord
#define FALSE
Definition: types.h:117

◆ ParaNdis_DebugCleanup()

void ParaNdis_DebugCleanup ( PDRIVER_OBJECT  pDriverObject)

Definition at line 239 of file ParaNdis-Debug.c.

240 {
241 #ifdef OVERRIDE_DEBUG_BREAK
242  if (sizeof(PVOID) == sizeof(ULONG) && pDbgBreakPoint)
243  {
244  DPrintf(0, ("Restoring original BP handler at %p", pDbgBreakPoint));
245  RtlCopyMemory(pDbgBreakPoint, DbgBreakPointChunk, sizeof(DbgBreakPointChunk));
246  }
247 #endif
249  WPP_CLEANUP(pDriverObject);
250 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
static KeDeregisterBugCheckReasonCallbackType BugCheckDeregisterCallback
KBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
#define WPP_CLEANUP(a)
Definition: kdebugprint.h:57
unsigned int ULONG
Definition: retypes.h:1

Referenced by ParaVirtualNICUnload().

◆ ParaNdis_DebugInitialize()

void ParaNdis_DebugInitialize ( PVOID  DriverObject,
PVOID  RegistryPath 
)

Definition at line 194 of file ParaNdis-Debug.c.

195 {
196  NDIS_STRING usRegister, usDeregister, usPrint;
197  PVOID pr, pd;
198  BOOLEAN res;
200 
204  NdisInitUnicodeString(&usPrint, L"vDbgPrintEx");
205  NdisInitUnicodeString(&usRegister, L"KeRegisterBugCheckReasonCallback");
206  NdisInitUnicodeString(&usDeregister, L"KeDeregisterBugCheckReasonCallback");
207  pd = MmGetSystemRoutineAddress(&usPrint);
208  if (pd) PrintProcedure = (vDbgPrintExType)pd;
209  pr = MmGetSystemRoutineAddress(&usRegister);
210  pd = MmGetSystemRoutineAddress(&usDeregister);
211  if (pr && pd)
212  {
215  }
216  res = BugCheckRegisterCallback(&CallbackRecord, ParaNdis_OnBugCheck, KbCallbackSecondaryDumpData, "NetKvm");
217  DPrintf(0, ("[%s] Crash callback %sregistered", __FUNCTION__, res ? "" : "NOT "));
218 
219 #ifdef OVERRIDE_DEBUG_BREAK
220  if (sizeof(PVOID) == sizeof(ULONG))
221  {
222  UCHAR replace[5] = {0xe9,0,0,0,0};
223  ULONG replacement;
224  NDIS_STRING usDbgBreakPointName;
225  NdisInitUnicodeString(&usDbgBreakPointName, L"DbgBreakPoint");
226  pDbgBreakPoint = (PUCHAR)MmGetSystemRoutineAddress(&usDbgBreakPointName);
227  if (pDbgBreakPoint)
228  {
229  DPrintf(0, ("Replacing original BP handler at %p", pDbgBreakPoint));
230  replacement = RtlPointerToOffset(pDbgBreakPoint + 5, AnotherDbgBreak);
231  RtlCopyMemory(replace + 1, &replacement, sizeof(replacement));
232  RtlCopyMemory(DbgBreakPointChunk, pDbgBreakPoint, sizeof(DbgBreakPointChunk));
233  RtlCopyMemory(pDbgBreakPoint, replace, sizeof(replace));
234  }
235  }
236 #endif
237 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
VOID EXPORT NdisAllocateSpinLock(IN PNDIS_SPIN_LOCK SpinLock)
Definition: control.c:152
static vDbgPrintExType PrintProcedure
static KeDeregisterBugCheckReasonCallbackType BugCheckDeregisterCallback
unsigned char * PUCHAR
Definition: retypes.h:3
#define KeInitializeCallbackRecord(CallbackRecord)
Definition: kefuncs.h:1399
static NDIS_SPIN_LOCK CrashLock
static KeRegisterBugCheckReasonCallbackType BugCheckRegisterCallback
KBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord
PVOID NTAPI MmGetSystemRoutineAddress(IN PUNICODE_STRING SystemRoutineName)
Definition: sysldr.c:3432
static VOID ParaNdis_PrepareBugCheckData()
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
BOOLEAN(* KeDeregisterBugCheckReasonCallbackType)(__inout PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord)
unsigned char BOOLEAN
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
Definition: replace.c:47
_In_z_ PWSTR RegistryPath
Definition: classp.h:1930
#define WPP_INIT_TRACING(a, b)
Definition: kdebugprint.h:56
#define RtlPointerToOffset(Base, Pointer)
Definition: ndis56common.h:54
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID EXPORT NdisInitUnicodeString(IN OUT PNDIS_STRING DestinationString, IN PCWSTR SourceString)
Definition: string.c:130
static const WCHAR L[]
Definition: oid.c:1250
ULONG(* vDbgPrintExType)(__in ULONG ComponentId, __in ULONG Level, __in PCCH Format, __in va_list arglist)
BOOLEAN(* KeRegisterBugCheckReasonCallbackType)(__out PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord, __in PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine, __in KBUGCHECK_CALLBACK_REASON Reason, __in PUCHAR Component)
GLuint res
Definition: glext.h:9613
unsigned int ULONG
Definition: retypes.h:1
static KBUGCHECK_REASON_CALLBACK_ROUTINE ParaNdis_OnBugCheck
#define __FUNCTION__
Definition: types.h:112

Referenced by DriverEntry().

◆ ParaNdis_DebugRegisterMiniport()

void ParaNdis_DebugRegisterMiniport ( PARANDIS_ADAPTER pContext,
BOOLEAN  bRegister 
)

Definition at line 294 of file ParaNdis-Debug.c.

295 {
296  UINT i;
298  for (i = 0; i < MAX_CONTEXTS; ++i)
299  {
300  UINT64 val1 = bRegister ? 0 : (UINT_PTR)pContext;
301  UINT64 val2 = bRegister ? (UINT_PTR)pContext : 0;
302  if (BugCheckData.StaticData.PerNicData[i].Context != val1) continue;
304  break;
305  }
307 }
unsigned __int3264 UINT_PTR
Definition: activex.cpp:275
VOID EXPORT NdisReleaseSpinLock(IN PNDIS_SPIN_LOCK SpinLock)
Definition: control.c:239
static NDIS_SPIN_LOCK CrashLock
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID EXPORT NdisAcquireSpinLock(IN PNDIS_SPIN_LOCK SpinLock)
Definition: control.c:135
static tBugCheckData BugCheckData
unsigned int UINT
Definition: ndis.h:50
tBugCheckStaticData StaticData
#define MAX_CONTEXTS
unsigned long long UINT64
tBugCheckPerNicDataContent PerNicData[MAX_CONTEXTS]

Referenced by ParaNdis5_Halt(), and ParaNdis5_Initialize().

◆ ParaNdis_OnBugCheck()

static VOID NTAPI ParaNdis_OnBugCheck ( IN KBUGCHECK_CALLBACK_REASON  Reason,
IN PKBUGCHECK_REASON_CALLBACK_RECORD  Record,
IN OUT PVOID  ReasonSpecificData,
IN ULONG  ReasonSpecificDataLength 
)
static

Definition at line 328 of file ParaNdis-Debug.c.

334 {
336  if (KbCallbackSecondaryDumpData == Reason && ReasonSpecificDataLength >= sizeof(*pDump))
337  {
338  ULONG dumpSize = sizeof(BugCheckData.Location);
339  if (!pDump->OutBuffer)
340  {
341  UINT nSaved;
342  nSaved = FillDataOnBugCheck();
343  if (pDump->InBufferLength >= dumpSize)
344  {
345  pDump->OutBuffer = pDump->InBuffer;
346  pDump->OutBufferLength = dumpSize;
347  }
348  else
349  {
350  pDump->OutBuffer = &BugCheckData.Location;
351  pDump->OutBufferLength = dumpSize;
352  bNative = FALSE;
353  }
354  DPrintf(0, ("[%s] system buffer of %d, saving data for %d NIC", __FUNCTION__,pDump->InBufferLength, nSaved));
355  DPrintf(0, ("[%s] using %s buffer", __FUNCTION__, bNative ? "native" : "own"));
356  }
357  else if (pDump->OutBuffer == pDump->InBuffer)
358  {
359  RtlCopyMemory(&pDump->Guid, &ParaNdis_CrashGuid, sizeof(pDump->Guid));
360  RtlCopyMemory(pDump->InBuffer, &BugCheckData.Location, dumpSize);
361  pDump->OutBufferLength = dumpSize;
363  DPrintf(0, ("[%s] dump data (%d) at %p", __FUNCTION__, pDump->OutBufferLength, pDump->OutBuffer));
364  }
365  }
366 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define FALSE
Definition: types.h:117
_In_ struct _KBUGCHECK_REASON_CALLBACK_RECORD _Inout_ PVOID _In_ ULONG ReasonSpecificDataLength
Definition: ketypes.h:256
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
static UINT FillDataOnBugCheck()
static tBugCheckData BugCheckData
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
static const GUID ParaNdis_CrashGuid
Definition: DebugData.h:68
static BOOLEAN bNative
tBugCheckDataLocation Location
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1
_In_ struct _KBUGCHECK_REASON_CALLBACK_RECORD _Inout_ PVOID ReasonSpecificData
Definition: ketypes.h:256
PVOID PVOID PWCHAR PVOID USHORT PULONG Reason
Definition: env.c:45
#define __FUNCTION__
Definition: types.h:112

◆ ParaNdis_PrepareBugCheckData()

VOID ParaNdis_PrepareBugCheckData ( )
static

Definition at line 277 of file ParaNdis-Debug.c.

278 {
292 }
unsigned __int3264 UINT_PTR
Definition: activex.cpp:275
#define MAX_HISTORY
tBugCheckStaticDataContent Data
#define PARANDIS_DEBUG_STATIC_DATA_VERSION
Definition: DebugData.h:91
#define PARANDIS_DEBUG_PER_NIC_DATA_VERSION
Definition: DebugData.h:92
tBugCheckStaticDataHeader Header
tBugCheckHistoryDataEntry History[MAX_HISTORY]
void * PVOID
Definition: retypes.h:9
static tBugCheckData BugCheckData
tBugCheckHistoryDataEntry_V1 tBugCheckHistoryDataEntry
Definition: DebugData.h:161
tBugCheckDataLocation Location
tBugCheckStaticData StaticData
#define MAX_CONTEXTS
unsigned long long UINT64
#define PARANDIS_DEBUG_HISTORY_DATA_VERSION
Definition: DebugData.h:93
tBugCheckPerNicDataContent PerNicData[MAX_CONTEXTS]

Referenced by ParaNdis_DebugInitialize().

◆ WppEnableCallback()

VOID WppEnableCallback ( __in LPCGUID  Guid,
__in __int64  Logger,
__in BOOLEAN  Enable,
__in ULONG  Flags,
__in UCHAR  Level 
)

Definition at line 168 of file ParaNdis-Debug.c.

174 {
175 #if WPP_USE_BYPASS
176  DPrintfBypass(0, ("[%s] %s, flags %X, level %d",
177  __FUNCTION__, Enable ? "enabled" : "disabled",
178  Flags, (ULONG)Level));
179 #endif
180  nDebugLevel = Level;
182 }
int nDebugLevel
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
int bDebugPrint
#define DPrintfBypass(Level, Fmt)
Definition: kdebugprint.h:63
unsigned int ULONG
Definition: retypes.h:1
#define __FUNCTION__
Definition: types.h:112

Variable Documentation

◆ bDebugPrint

int bDebugPrint = 1

Definition at line 41 of file ParaNdis-Debug.c.

Referenced by ReadNicConfiguration(), and WppEnableCallback().

◆ bNative

BOOLEAN bNative = TRUE
static

Definition at line 275 of file ParaNdis-Debug.c.

Referenced by ParaNdis_OnBugCheck().

◆ BugCheckData

◆ BugCheckDeregisterCallback

◆ BugCheckRegisterCallback

Definition at line 100 of file ParaNdis-Debug.c.

Referenced by ParaNdis_DebugInitialize().

◆ CallbackRecord

◆ CrashLock

NDIS_SPIN_LOCK CrashLock
static

Definition at line 43 of file ParaNdis-Debug.c.

Referenced by ParaNdis_DebugInitialize(), and ParaNdis_DebugRegisterMiniport().

◆ nDebugLevel

int nDebugLevel = 1

Definition at line 40 of file ParaNdis-Debug.c.

Referenced by ReadNicConfiguration(), and WppEnableCallback().

◆ ParaNdis_OnBugCheck

VOID NTAPI ParaNdis_OnBugCheck
static

Definition at line 45 of file ParaNdis-Debug.c.

Referenced by ParaNdis_DebugInitialize().

◆ pDebugPrint

DEBUGPRINTFUNC pDebugPrint = DbgPrint

Definition at line 145 of file ParaNdis-Debug.c.

◆ PrintProcedure

vDbgPrintExType PrintProcedure = DummyPrintProcedure
static

Definition at line 99 of file ParaNdis-Debug.c.

Referenced by ParaNdis_DebugInitialize().

◆ virtioDebugLevel

int virtioDebugLevel = 1

Definition at line 39 of file ParaNdis-Debug.c.

◆ VirtioDebugPrintProc

DEBUGPRINTFUNC VirtioDebugPrintProc = DbgPrint

Definition at line 146 of file ParaNdis-Debug.c.