2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS NDIS library
4 * FILE: include/debug.h
5 * PURPOSE: Debugging support macros
6 * DEFINES: DBG - Enable debug output
11 #define NORMAL_MASK 0x000000FF
12 #define SPECIAL_MASK 0xFFFFFF00
13 #define MIN_TRACE 0x00000001
14 #define MID_TRACE 0x00000002
15 #define MAX_TRACE 0x00000003
17 #define DEBUG_REFCOUNT 0x00000100
18 #define DEBUG_MINIPORT 0x00000200
19 #define DEBUG_PROTOCOL 0x00000400
20 #define DEBUG_PACKET 0x00000800
21 #define DEBUG_ULTRA 0xFFFFFFFF
25 extern ULONG DebugTraceLevel
;
29 #define NDIS_DbgPrint(_t_, _x_) \
30 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
31 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
32 DbgPrint("(%s:%d) ", __FILE__, __LINE__); \
38 #define NDIS_DbgPrint(_t_, _x_) \
39 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
40 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
41 DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \
47 #define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
51 #define NDIS_DbgPrint(_t_, _x_)
53 #define ASSERT_IRQL(x)
59 #define assert(x) ASSERT(x)
60 #define assert_irql(x) ASSERT_IRQL(x)
65 #define UNIMPLEMENTED \
66 NDIS_DbgPrint(MIN_TRACE, ("The function at (%s:%d) is unimplemented.\n", __FILE__, __LINE__));
70 #define UNIMPLEMENTED \
71 NDIS_DbgPrint(MIN_TRACE, ("(%s) at (%s:%d) is unimplemented.\n", __FUNCTION__, __FILE__, __LINE__));
77 do { NDIS_DbgPrint(MIN_TRACE, ("(%s:%d)\n", __FILE__, __LINE__)); } while(0);
81 #endif /* __DEBUG_H */