Go to the documentation of this file.
26 #if !defined(__DEBUGLIB_H__)
27 #define __DEBUGLIB_H__
32 #define DL_LOG 0x00000001
33 #define DL_FTL 0x00000002
34 #define DL_ERR 0x00000004
35 #define DL_TRC 0x00000008
36 #define DL_XLOG 0x00000010
37 #define DL_MXLOG 0x00000020
38 #define DL_FTL_MXLOG 0x00000021
39 #define DL_EVL 0x00000080
40 #define DL_COMPAT (DL_MXLOG | DL_XLOG)
41 #define DL_PRIOR_MASK (DL_EVL | DL_COMPAT | DL_TRC | DL_ERR | DL_FTL | DL_LOG)
42 #define DLI_LOG 0x0100
43 #define DLI_FTL 0x0200
44 #define DLI_ERR 0x0300
45 #define DLI_TRC 0x0400
46 #define DLI_XLOG 0x0500
47 #define DLI_MXLOG 0x0600
48 #define DLI_FTL_MXLOG 0x0600
49 #define DLI_EVL 0x0800
53 #define DL_REG 0x00000100
54 #define DL_MEM 0x00000200
55 #define DL_SPL 0x00000400
56 #define DL_IRP 0x00000800
57 #define DL_TIM 0x00001000
58 #define DL_BLK 0x00002000
59 #define DL_OS_MASK (DL_BLK | DL_TIM | DL_IRP | DL_SPL | DL_MEM | DL_REG)
60 #define DLI_REG 0x0900
61 #define DLI_MEM 0x0A00
62 #define DLI_SPL 0x0B00
63 #define DLI_IRP 0x0C00
64 #define DLI_TIM 0x0D00
65 #define DLI_BLK 0x0E00
69 #define DL_TAPI 0x00010000
70 #define DL_NDIS 0x00020000
71 #define DL_CONN 0x00040000
72 #define DL_STAT 0x00080000
73 #define DL_SEND 0x00100000
74 #define DL_RECV 0x00200000
75 #define DL_DATA (DL_SEND | DL_RECV)
76 #define DL_ISDN_MASK (DL_DATA | DL_STAT | DL_CONN | DL_NDIS | DL_TAPI)
77 #define DLI_TAPI 0x1100
78 #define DLI_NDIS 0x1200
79 #define DLI_CONN 0x1300
80 #define DLI_STAT 0x1400
81 #define DLI_SEND 0x1500
82 #define DLI_RECV 0x1600
86 #define DL_PRV0 0x01000000
87 #define DL_PRV1 0x02000000
88 #define DL_PRV2 0x04000000
89 #define DL_PRV3 0x08000000
90 #define DL_PRIV_MASK (DL_PRV0 | DL_PRV1 | DL_PRV2 | DL_PRV3)
91 #define DLI_PRV0 0x1900
92 #define DLI_PRV1 0x1A00
93 #define DLI_PRV2 0x1B00
94 #define DLI_PRV3 0x1C00
95 #define DT_INDEX(x) ((x) & 0x000F)
96 #define DL_INDEX(x) ((((x) >> 8) & 0x00FF) - 1)
97 #define DLI_NAME(x) ((x) & 0xFF00)
103 #define DL_TO_KERNEL 0x40000000
105 #ifdef DIVA_NO_DEBUGLIB
106 #define myDbgPrint_LOG(x...) do { } while (0);
107 #define myDbgPrint_FTL(x...) do { } while (0);
108 #define myDbgPrint_ERR(x...) do { } while (0);
109 #define myDbgPrint_TRC(x...) do { } while (0);
110 #define myDbgPrint_MXLOG(x...) do { } while (0);
111 #define myDbgPrint_EVL(x...) do { } while (0);
112 #define myDbgPrint_REG(x...) do { } while (0);
113 #define myDbgPrint_MEM(x...) do { } while (0);
114 #define myDbgPrint_SPL(x...) do { } while (0);
115 #define myDbgPrint_IRP(x...) do { } while (0);
116 #define myDbgPrint_TIM(x...) do { } while (0);
117 #define myDbgPrint_BLK(x...) do { } while (0);
118 #define myDbgPrint_TAPI(x...) do { } while (0);
119 #define myDbgPrint_NDIS(x...) do { } while (0);
120 #define myDbgPrint_CONN(x...) do { } while (0);
121 #define myDbgPrint_STAT(x...) do { } while (0);
122 #define myDbgPrint_SEND(x...) do { } while (0);
123 #define myDbgPrint_RECV(x...) do { } while (0);
124 #define myDbgPrint_PRV0(x...) do { } while (0);
125 #define myDbgPrint_PRV1(x...) do { } while (0);
126 #define myDbgPrint_PRV2(x...) do { } while (0);
127 #define myDbgPrint_PRV3(x...) do { } while (0);
128 #define DBG_TEST(func, args) do { } while (0);
129 #define DBG_EVL_ID(args) do { } while (0);
135 #define DBG_DECL(func) extern void myDbgPrint_##func(char *, ...);
159 #ifdef _KERNEL_DBG_PRINT_
163 #define DBG_TEST(func, args) \
164 { if ((myDriverDebugHandle.dbgMask) & (unsigned long)DL_##func) \
166 if ((myDriverDebugHandle.dbgMask) & DL_TO_KERNEL) \
167 { DbgPrint args; DbgPrint("\r\n"); } \
168 myDbgPrint_##func args; \
174 #define DBG_TEST(func, args) \
175 { if ((myDriverDebugHandle.dbgMask) & (unsigned long)DL_##func) \
176 { myDbgPrint_##func args; \
183 #define DBG_EVL_ID(args) \
184 { if ((myDriverDebugHandle.dbgMask) & (unsigned long)DL_EVL) \
185 { myDbgPrint_EVL args; \
190 #define DBG_LOG(args) DBG_TEST(LOG, args)
191 #define DBG_FTL(args) DBG_TEST(FTL, args)
192 #define DBG_ERR(args) DBG_TEST(ERR, args)
193 #define DBG_TRC(args) DBG_TEST(TRC, args)
194 #define DBG_MXLOG(args) DBG_TEST(MXLOG, args)
195 #define DBG_FTL_MXLOG(args) DBG_TEST(FTL_MXLOG, args)
196 #define DBG_EVL(args) DBG_EVL_ID(args)
197 #define DBG_REG(args) DBG_TEST(REG, args)
198 #define DBG_MEM(args) DBG_TEST(MEM, args)
199 #define DBG_SPL(args) DBG_TEST(SPL, args)
200 #define DBG_IRP(args) DBG_TEST(IRP, args)
201 #define DBG_TIM(args) DBG_TEST(TIM, args)
202 #define DBG_BLK(args) DBG_TEST(BLK, args)
203 #define DBG_TAPI(args) DBG_TEST(TAPI, args)
204 #define DBG_NDIS(args) DBG_TEST(NDIS, args)
205 #define DBG_CONN(args) DBG_TEST(CONN, args)
206 #define DBG_STAT(args) DBG_TEST(STAT, args)
207 #define DBG_SEND(args) DBG_TEST(SEND, args)
208 #define DBG_RECV(args) DBG_TEST(RECV, args)
209 #define DBG_PRV0(args) DBG_TEST(PRV0, args)
210 #define DBG_PRV1(args) DBG_TEST(PRV1, args)
211 #define DBG_PRV2(args) DBG_TEST(PRV2, args)
212 #define DBG_PRV3(args) DBG_TEST(PRV3, args)
216 #ifdef DIVA_NO_DEBUGLIB
217 #define DbgRegister(name, tag, mask) do { } while (0)
218 #define DbgDeregister() do { } while (0)
219 #define DbgSetLevel(mask) do { } while (0)
222 extern int DbgRegister(
char *drvName,
char *drvTag,
unsigned long dbgMask);
239 #define DBG_HANDLE_REG_NEW 0x01
240 #define DBG_HANDLE_REG_OLD 0x7f
242 #define DBG_HANDLE_VERSION 1
243 #define DBG_HANDLE_VER_EXT 2
298 #define DBG_EXT_TYPE_CARD_TRACE 0x00000001
307 void (*MaskChangedNotify)(
void *pContext);
315 #ifndef DIVA_NO_DEBUGLIB
319 #define XDI_USE_XLOG 1