12#define MIN_TRACE ((1 << DPFLTR_WARNING_LEVEL))
13#define MID_TRACE ((1 << DPFLTR_WARNING_LEVEL) | (1 << DPFLTR_TRACE_LEVEL))
14#define MAX_TRACE ((1 << DPFLTR_WARNING_LEVEL) | (1 << DPFLTR_TRACE_LEVEL) | (1 << DPFLTR_INFO_LEVEL))
16#define DEBUG_CHECK 0x00000100
17#define DEBUG_MEMORY 0x00000200
18#define DEBUG_PBUFFER 0x00000400
19#define DEBUG_IRP 0x00000800
20#define DEBUG_TCPIF 0x00001000
21#define DEBUG_ADDRFILE 0x00002000
22#define DEBUG_DATALINK 0x00004000
23#define DEBUG_ARP 0x00008000
24#define DEBUG_IP 0x00010000
25#define DEBUG_UDP 0x00020000
26#define DEBUG_TCP 0x00040000
27#define DEBUG_ICMP 0x00080000
28#define DEBUG_ROUTER 0x00100000
29#define DEBUG_RCACHE 0x00200000
30#define DEBUG_NCACHE 0x00400000
31#define DEBUG_CPOINT 0x00800000
32#define DEBUG_LOCK 0x01000000
33#define DEBUG_INFO 0x02000000
34#define DEBUG_ULTRA 0x7FFFFFFF
38#define REMOVE_PARENS(...) __VA_ARGS__
39#define TI_DbgPrint(_t_, _x_) \
40 DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) | DPFLTR_MASK, "(%s:%d) ", __FILE__, __LINE__), \
41 DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) | DPFLTR_MASK, REMOVE_PARENS _x_)
45#define TI_DbgPrint(_t_, _x_)
50#define assert(x) ASSERT(x)
51#define assert_irql(x) ASSERT_IRQL(x)
56#define UNIMPLEMENTED \
57 TI_DbgPrint(MIN_TRACE, ("The function at %s:%d is unimplemented, \
58 but come back another day.\n", __FILE__, __LINE__));
62#define UNIMPLEMENTED \
63 TI_DbgPrint(MIN_TRACE, ("(%s:%d)(%s) is unimplemented, \
64 but come back another day.\n", __FILE__, __LINE__, __FUNCTION__));
70 do { TI_DbgPrint(DEBUG_CHECK, ("(%s:%d)\n", __FILE__, __LINE__)); } while(0);
74#define ASSERT_KM_POINTER(_x) \
75 ASSERT(((ULONG_PTR)(_x)) != (ULONG_PTR)0xccccccccccccccccULL); \
76 ASSERT(((PVOID)(_x)) >= MmSystemRangeStart);