Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. nbdebug.h
  5. Abstract:
  6. Private include file for the NB (NetBIOS) component of the NTOS project.
  7. Author:
  8. Colin Watson (ColinW) 13-Mar-1991
  9. Revision History:
  10. --*/
  11. #ifndef _NBPROCS_
  12. #define _NBPROCS_
  13. //
  14. // DEBUGGING SUPPORT. DBG is a macro that is turned on at compile time
  15. // to enable debugging code in the system. If this is turned on, then
  16. // you can use the IF_NBDBG(flags) macro in the NB code to selectively
  17. // enable a piece of debugging code in the driver. This macro tests
  18. // NbDebug, a global ULONG defined in NB.C.
  19. //
  20. #if DBG
  21. #define NB_DEBUG_DISPATCH 0x00000001 // nb.c
  22. #define NB_DEBUG_DEVOBJ 0x00000002 // devobj.c
  23. #define NB_DEBUG_COMPLETE 0x00000004 // nb.c
  24. #define NB_DEBUG_CALL 0x00000008 // nb.c
  25. #define NB_DEBUG_ASTAT 0x00000010 // nb.c
  26. #define NB_DEBUG_SEND 0x00000020 // nb.c
  27. #define NB_DEBUG_ACTION 0x00000040 // nb.c
  28. #define NB_DEBUG_FILE 0x00000080 // file.c
  29. #define NB_DEBUG_APC 0x00000100 // apc.c
  30. #define NB_DEBUG_ERROR_MAP 0x00000200 // error.c
  31. #define NB_DEBUG_LANSTATUS 0x00000400 // error.c
  32. #define NB_DEBUG_ADDRESS 0x00000800 // address.c
  33. #define NB_DEBUG_RECEIVE 0x00001000 // receive.c
  34. #define NB_DEBUG_IOCANCEL 0x00002000 // nb.c
  35. #define NB_DEBUG_CREATE_FILE 0x00004000 // used in address.c and connect.c
  36. #define NB_DEBUG_LIST_LANA 0x00008000
  37. #define NB_DEBUG_DEVICE_CONTROL 0x00040000
  38. //#define NB_DEBUG_LANA_ERROR 0x00010000
  39. //#define NB_DEBUG_ADDRESS_COUNT 0x00020000
  40. #define NB_DEBUG_NCBS 0x04000000 // Used by NCB_COMPLETE in nb.h
  41. #define NB_DEBUG_LOCKS 0x20000000 // nb.h
  42. #define NB_DEBUG_TIMER 0x40000000 // timer.c
  43. #define NB_DEBUG_NCBSBRK 0x80000000 // Used by NCB_COMPLETE in nb.h
  44. extern ULONG NbDebug; // in NB.C.
  45. //
  46. // VOID
  47. // IF_NBDBG(
  48. // IN PSZ Message
  49. // );
  50. //
  51. #define IF_NBDBG(flags) \
  52. if (NbDebug & (flags))
  53. #define NbPrint(String) DbgPrint String
  54. #define InternalError(String) { \
  55. DbgPrint("[NETBIOS]: Internal error : File %s, Line %d\n", \
  56. __FILE__, __LINE__); \
  57. DbgPrint String; \
  58. }
  59. #else
  60. #define IF_NBDBG(flags) \
  61. if (0)
  62. #define NbPrint(String) { NOTHING;}
  63. #define NbDisplayNcb(String) { NOTHING;}
  64. #define NbFormattedDump(String, String1) { NOTHING;}
  65. #define InternalError(String) { \
  66. KeBugCheck(FILE_SYSTEM); \
  67. }
  68. #endif
  69. #endif // def _NBPROCS_
  70.