Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
debuglib.h File Reference
#include <stdarg.h>

Go to the source code of this file.

Data Structures

struct  _DbgHandle_
 
struct  _OldDbgHandle_
 
struct  _DbgExtendedInfo_
 

Macros

#define DL_LOG   0x00000001 /* always worth mentioning */
 
#define DL_FTL   0x00000002 /* always sampled error */
 
#define DL_ERR   0x00000004 /* any kind of error */
 
#define DL_TRC   0x00000008 /* verbose information */
 
#define DL_XLOG   0x00000010 /* old xlog info */
 
#define DL_MXLOG   0x00000020 /* maestra xlog info */
 
#define DL_FTL_MXLOG   0x00000021 /* fatal maestra xlog info */
 
#define DL_EVL   0x00000080 /* special NT eventlog msg */
 
#define DL_COMPAT   (DL_MXLOG | DL_XLOG)
 
#define DL_PRIOR_MASK   (DL_EVL | DL_COMPAT | DL_TRC | DL_ERR | DL_FTL | DL_LOG)
 
#define DLI_LOG   0x0100
 
#define DLI_FTL   0x0200
 
#define DLI_ERR   0x0300
 
#define DLI_TRC   0x0400
 
#define DLI_XLOG   0x0500
 
#define DLI_MXLOG   0x0600
 
#define DLI_FTL_MXLOG   0x0600
 
#define DLI_EVL   0x0800
 
#define DL_REG   0x00000100 /* init/query registry */
 
#define DL_MEM   0x00000200 /* memory management */
 
#define DL_SPL   0x00000400 /* event/spinlock handling */
 
#define DL_IRP   0x00000800 /* I/O request handling */
 
#define DL_TIM   0x00001000 /* timer/watchdog handling */
 
#define DL_BLK   0x00002000 /* raw data block contents */
 
#define DL_OS_MASK   (DL_BLK | DL_TIM | DL_IRP | DL_SPL | DL_MEM | DL_REG)
 
#define DLI_REG   0x0900
 
#define DLI_MEM   0x0A00
 
#define DLI_SPL   0x0B00
 
#define DLI_IRP   0x0C00
 
#define DLI_TIM   0x0D00
 
#define DLI_BLK   0x0E00
 
#define DL_TAPI   0x00010000 /* debug TAPI interface */
 
#define DL_NDIS   0x00020000 /* debug NDIS interface */
 
#define DL_CONN   0x00040000 /* connection handling */
 
#define DL_STAT   0x00080000 /* trace state machines */
 
#define DL_SEND   0x00100000 /* trace raw xmitted data */
 
#define DL_RECV   0x00200000 /* trace raw received data */
 
#define DL_DATA   (DL_SEND | DL_RECV)
 
#define DL_ISDN_MASK   (DL_DATA | DL_STAT | DL_CONN | DL_NDIS | DL_TAPI)
 
#define DLI_TAPI   0x1100
 
#define DLI_NDIS   0x1200
 
#define DLI_CONN   0x1300
 
#define DLI_STAT   0x1400
 
#define DLI_SEND   0x1500
 
#define DLI_RECV   0x1600
 
#define DL_PRV0   0x01000000
 
#define DL_PRV1   0x02000000
 
#define DL_PRV2   0x04000000
 
#define DL_PRV3   0x08000000
 
#define DL_PRIV_MASK   (DL_PRV0 | DL_PRV1 | DL_PRV2 | DL_PRV3)
 
#define DLI_PRV0   0x1900
 
#define DLI_PRV1   0x1A00
 
#define DLI_PRV2   0x1B00
 
#define DLI_PRV3   0x1C00
 
#define DT_INDEX(x)   ((x) & 0x000F)
 
#define DL_INDEX(x)   ((((x) >> 8) & 0x00FF) - 1)
 
#define DLI_NAME(x)   ((x) & 0xFF00)
 
#define DL_TO_KERNEL   0x40000000
 
#define DBG_DECL(func)   extern void myDbgPrint_##func(char *, ...);
 
#define DBG_TEST(func, args)
 
#define DBG_EVL_ID(args)
 
#define DBG_LOG(args)   DBG_TEST(LOG, args)
 
#define DBG_FTL(args)   DBG_TEST(FTL, args)
 
#define DBG_ERR(args)   DBG_TEST(ERR, args)
 
#define DBG_TRC(args)   DBG_TEST(TRC, args)
 
#define DBG_MXLOG(args)   DBG_TEST(MXLOG, args)
 
#define DBG_FTL_MXLOG(args)   DBG_TEST(FTL_MXLOG, args)
 
#define DBG_EVL(args)   DBG_EVL_ID(args)
 
#define DBG_REG(args)   DBG_TEST(REG, args)
 
#define DBG_MEM(args)   DBG_TEST(MEM, args)
 
#define DBG_SPL(args)   DBG_TEST(SPL, args)
 
#define DBG_IRP(args)   DBG_TEST(IRP, args)
 
#define DBG_TIM(args)   DBG_TEST(TIM, args)
 
#define DBG_BLK(args)   DBG_TEST(BLK, args)
 
#define DBG_TAPI(args)   DBG_TEST(TAPI, args)
 
#define DBG_NDIS(args)   DBG_TEST(NDIS, args)
 
#define DBG_CONN(args)   DBG_TEST(CONN, args)
 
#define DBG_STAT(args)   DBG_TEST(STAT, args)
 
#define DBG_SEND(args)   DBG_TEST(SEND, args)
 
#define DBG_RECV(args)   DBG_TEST(RECV, args)
 
#define DBG_PRV0(args)   DBG_TEST(PRV0, args)
 
#define DBG_PRV1(args)   DBG_TEST(PRV1, args)
 
#define DBG_PRV2(args)   DBG_TEST(PRV2, args)
 
#define DBG_PRV3(args)   DBG_TEST(PRV3, args)
 
#define DBG_HANDLE_REG_NEW   0x01 /* this (new) structure */
 
#define DBG_HANDLE_REG_OLD   0x7f /* old structure (see below) */
 
#define DBG_HANDLE_VERSION   1 /* contains dbg_old function now */
 
#define DBG_HANDLE_VER_EXT   2 /* pReserved points to extended info*/
 
#define DBG_EXT_TYPE_CARD_TRACE   0x00000001
 
#define XDI_USE_XLOG   1
 

Typedefs

typedef struct _DbgHandle_pDbgHandle
 
typedef void(* DbgEnd )(pDbgHandle)
 
typedef void(* DbgLog )(unsigned short, int, char *, va_list)
 
typedef void(* DbgOld )(unsigned short, char *, va_list)
 
typedef void(* DbgEv )(unsigned short, unsigned long, va_list)
 
typedef void(* DbgIrq )(unsigned short, int, char *, va_list)
 
typedef struct _DbgHandle_ _DbgHandle_
 
typedef struct _OldDbgHandle_ _OldDbgHandle_
 

Functions

void myDbgPrint_EVL (long,...)
 
int DbgRegister (char *drvName, char *drvTag, unsigned long dbgMask)
 
void DbgDeregister (void)
 
void DbgSetLevel (unsigned long dbgMask)
 
void xdi_dbg_xlog (char *x,...)
 

Variables

DIVA_DI_PRINTF dprintf
 
_DbgHandle_ myDriverDebugHandle
 

Macro Definition Documentation

#define DBG_BLK (   args)    DBG_TEST(BLK, args)

Definition at line 202 of file debuglib.h.

#define DBG_CONN (   args)    DBG_TEST(CONN, args)

Definition at line 205 of file debuglib.h.

#define DBG_DECL (   func)    extern void myDbgPrint_##func(char *, ...);

Definition at line 135 of file debuglib.h.

#define DBG_ERR (   args)    DBG_TEST(ERR, args)

Definition at line 192 of file debuglib.h.

#define DBG_EVL (   args)    DBG_EVL_ID(args)

Definition at line 196 of file debuglib.h.

#define DBG_EVL_ID (   args)
Value:
{ if ((myDriverDebugHandle.dbgMask) & (unsigned long)DL_EVL) \
} }

Definition at line 183 of file debuglib.h.

#define DBG_EXT_TYPE_CARD_TRACE   0x00000001

Definition at line 298 of file debuglib.h.

#define DBG_FTL (   args)    DBG_TEST(FTL, args)

Definition at line 191 of file debuglib.h.

#define DBG_FTL_MXLOG (   args)    DBG_TEST(FTL_MXLOG, args)

Definition at line 195 of file debuglib.h.

#define DBG_HANDLE_REG_NEW   0x01 /* this (new) structure */

Definition at line 239 of file debuglib.h.

#define DBG_HANDLE_REG_OLD   0x7f /* old structure (see below) */

Definition at line 240 of file debuglib.h.

#define DBG_HANDLE_VER_EXT   2 /* pReserved points to extended info*/

Definition at line 243 of file debuglib.h.

#define DBG_HANDLE_VERSION   1 /* contains dbg_old function now */

Definition at line 242 of file debuglib.h.

#define DBG_IRP (   args)    DBG_TEST(IRP, args)

Definition at line 200 of file debuglib.h.

#define DBG_LOG (   args)    DBG_TEST(LOG, args)

Definition at line 190 of file debuglib.h.

#define DBG_MEM (   args)    DBG_TEST(MEM, args)

Definition at line 198 of file debuglib.h.

#define DBG_MXLOG (   args)    DBG_TEST(MXLOG, args)

Definition at line 194 of file debuglib.h.

#define DBG_NDIS (   args)    DBG_TEST(NDIS, args)

Definition at line 204 of file debuglib.h.

#define DBG_PRV0 (   args)    DBG_TEST(PRV0, args)

Definition at line 209 of file debuglib.h.

#define DBG_PRV1 (   args)    DBG_TEST(PRV1, args)

Definition at line 210 of file debuglib.h.

#define DBG_PRV2 (   args)    DBG_TEST(PRV2, args)

Definition at line 211 of file debuglib.h.

#define DBG_PRV3 (   args)    DBG_TEST(PRV3, args)

Definition at line 212 of file debuglib.h.

#define DBG_RECV (   args)    DBG_TEST(RECV, args)

Definition at line 208 of file debuglib.h.

#define DBG_REG (   args)    DBG_TEST(REG, args)

Definition at line 197 of file debuglib.h.

#define DBG_SEND (   args)    DBG_TEST(SEND, args)

Definition at line 207 of file debuglib.h.

#define DBG_SPL (   args)    DBG_TEST(SPL, args)

Definition at line 199 of file debuglib.h.

#define DBG_STAT (   args)    DBG_TEST(STAT, args)

Definition at line 206 of file debuglib.h.

#define DBG_TAPI (   args)    DBG_TEST(TAPI, args)

Definition at line 203 of file debuglib.h.

#define DBG_TEST (   func,
  args 
)
Value:
{ if ((myDriverDebugHandle.dbgMask) & (unsigned long)DL_##func) \
{ myDbgPrint_##func args; \
} }

Definition at line 174 of file debuglib.h.

#define DBG_TIM (   args)    DBG_TEST(TIM, args)

Definition at line 201 of file debuglib.h.

#define DBG_TRC (   args)    DBG_TEST(TRC, args)

Definition at line 193 of file debuglib.h.

#define DL_BLK   0x00002000 /* raw data block contents */

Definition at line 58 of file debuglib.h.

#define DL_COMPAT   (DL_MXLOG | DL_XLOG)

Definition at line 40 of file debuglib.h.

#define DL_CONN   0x00040000 /* connection handling */

Definition at line 71 of file debuglib.h.

#define DL_DATA   (DL_SEND | DL_RECV)

Definition at line 75 of file debuglib.h.

#define DL_ERR   0x00000004 /* any kind of error */

Definition at line 34 of file debuglib.h.

#define DL_EVL   0x00000080 /* special NT eventlog msg */

Definition at line 39 of file debuglib.h.

#define DL_FTL   0x00000002 /* always sampled error */

Definition at line 33 of file debuglib.h.

#define DL_FTL_MXLOG   0x00000021 /* fatal maestra xlog info */

Definition at line 38 of file debuglib.h.

#define DL_INDEX (   x)    ((((x) >> 8) & 0x00FF) - 1)

Definition at line 96 of file debuglib.h.

#define DL_IRP   0x00000800 /* I/O request handling */

Definition at line 56 of file debuglib.h.

#define DL_ISDN_MASK   (DL_DATA | DL_STAT | DL_CONN | DL_NDIS | DL_TAPI)

Definition at line 76 of file debuglib.h.

#define DL_LOG   0x00000001 /* always worth mentioning */

Definition at line 32 of file debuglib.h.

#define DL_MEM   0x00000200 /* memory management */

Definition at line 54 of file debuglib.h.

#define DL_MXLOG   0x00000020 /* maestra xlog info */

Definition at line 37 of file debuglib.h.

#define DL_NDIS   0x00020000 /* debug NDIS interface */

Definition at line 70 of file debuglib.h.

#define DL_OS_MASK   (DL_BLK | DL_TIM | DL_IRP | DL_SPL | DL_MEM | DL_REG)

Definition at line 59 of file debuglib.h.

#define DL_PRIOR_MASK   (DL_EVL | DL_COMPAT | DL_TRC | DL_ERR | DL_FTL | DL_LOG)

Definition at line 41 of file debuglib.h.

#define DL_PRIV_MASK   (DL_PRV0 | DL_PRV1 | DL_PRV2 | DL_PRV3)

Definition at line 90 of file debuglib.h.

#define DL_PRV0   0x01000000

Definition at line 86 of file debuglib.h.

#define DL_PRV1   0x02000000

Definition at line 87 of file debuglib.h.

#define DL_PRV2   0x04000000

Definition at line 88 of file debuglib.h.

#define DL_PRV3   0x08000000

Definition at line 89 of file debuglib.h.

#define DL_RECV   0x00200000 /* trace raw received data */

Definition at line 74 of file debuglib.h.

#define DL_REG   0x00000100 /* init/query registry */

Definition at line 53 of file debuglib.h.

#define DL_SEND   0x00100000 /* trace raw xmitted data */

Definition at line 73 of file debuglib.h.

#define DL_SPL   0x00000400 /* event/spinlock handling */

Definition at line 55 of file debuglib.h.

#define DL_STAT   0x00080000 /* trace state machines */

Definition at line 72 of file debuglib.h.

#define DL_TAPI   0x00010000 /* debug TAPI interface */

Definition at line 69 of file debuglib.h.

#define DL_TIM   0x00001000 /* timer/watchdog handling */

Definition at line 57 of file debuglib.h.

#define DL_TO_KERNEL   0x40000000

Definition at line 103 of file debuglib.h.

#define DL_TRC   0x00000008 /* verbose information */

Definition at line 35 of file debuglib.h.

#define DL_XLOG   0x00000010 /* old xlog info */

Definition at line 36 of file debuglib.h.

#define DLI_BLK   0x0E00

Definition at line 65 of file debuglib.h.

#define DLI_CONN   0x1300

Definition at line 79 of file debuglib.h.

#define DLI_ERR   0x0300

Definition at line 44 of file debuglib.h.

#define DLI_EVL   0x0800

Definition at line 49 of file debuglib.h.

#define DLI_FTL   0x0200

Definition at line 43 of file debuglib.h.

#define DLI_FTL_MXLOG   0x0600

Definition at line 48 of file debuglib.h.

#define DLI_IRP   0x0C00

Definition at line 63 of file debuglib.h.

#define DLI_LOG   0x0100

Definition at line 42 of file debuglib.h.

#define DLI_MEM   0x0A00

Definition at line 61 of file debuglib.h.

#define DLI_MXLOG   0x0600

Definition at line 47 of file debuglib.h.

#define DLI_NAME (   x)    ((x) & 0xFF00)

Definition at line 97 of file debuglib.h.

#define DLI_NDIS   0x1200

Definition at line 78 of file debuglib.h.

#define DLI_PRV0   0x1900

Definition at line 91 of file debuglib.h.

#define DLI_PRV1   0x1A00

Definition at line 92 of file debuglib.h.

#define DLI_PRV2   0x1B00

Definition at line 93 of file debuglib.h.

#define DLI_PRV3   0x1C00

Definition at line 94 of file debuglib.h.

#define DLI_RECV   0x1600

Definition at line 82 of file debuglib.h.

#define DLI_REG   0x0900

Definition at line 60 of file debuglib.h.

#define DLI_SEND   0x1500

Definition at line 81 of file debuglib.h.

#define DLI_SPL   0x0B00

Definition at line 62 of file debuglib.h.

#define DLI_STAT   0x1400

Definition at line 80 of file debuglib.h.

#define DLI_TAPI   0x1100

Definition at line 77 of file debuglib.h.

#define DLI_TIM   0x0D00

Definition at line 64 of file debuglib.h.

#define DLI_TRC   0x0400

Definition at line 45 of file debuglib.h.

#define DLI_XLOG   0x0500

Definition at line 46 of file debuglib.h.

#define DT_INDEX (   x)    ((x) & 0x000F)

Definition at line 95 of file debuglib.h.

#define XDI_USE_XLOG   1

Definition at line 319 of file debuglib.h.

Typedef Documentation

typedef void(* DbgEnd)(pDbgHandle)

Definition at line 232 of file debuglib.h.

typedef void(* DbgEv)(unsigned short, unsigned long, va_list)

Definition at line 235 of file debuglib.h.

typedef void(* DbgIrq)(unsigned short, int, char *, va_list)

Definition at line 236 of file debuglib.h.

typedef void(* DbgLog)(unsigned short, int, char *, va_list)

Definition at line 233 of file debuglib.h.

typedef void(* DbgOld)(unsigned short, char *, va_list)

Definition at line 234 of file debuglib.h.

Definition at line 231 of file debuglib.h.

Function Documentation

void DbgDeregister ( void  )

Definition at line 132 of file debuglib.c.

int DbgRegister ( char drvName,
char drvTag,
unsigned long  dbgMask 
)

Definition at line 79 of file debuglib.c.

void DbgSetLevel ( unsigned long  dbgMask)

Definition at line 126 of file debuglib.c.

void myDbgPrint_EVL ( long  ,
  ... 
)

Definition at line 53 of file debuglib.c.

void xdi_dbg_xlog ( char x,
  ... 
)

Definition at line 140 of file debuglib.c.

Variable Documentation

DIVA_DI_PRINTF dprintf

Definition at line 34 of file debuglib.c.

_DbgHandle_ myDriverDebugHandle

Definition at line 33 of file debuglib.c.