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.

113 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. errorlog.h
  5. Abstract:
  6. This module contains the manifests and macros used for error logging
  7. in the server.
  8. Author:
  9. Manny Weiser (mannyw) 11-Feb-92
  10. Revision History:
  11. --*/
  12. //
  13. // Routines for writing error log entries.
  14. //
  15. VOID
  16. SrvLogError (
  17. IN PVOID DeviceOrDriverObject,
  18. IN ULONG UniqueErrorCode,
  19. IN NTSTATUS NtStatusCode,
  20. IN PVOID RawDataBuffer,
  21. IN USHORT RawDataLength,
  22. IN PUNICODE_STRING InsertionString,
  23. IN ULONG InsertionStringCount
  24. );
  25. VOID
  26. SrvLogInvalidSmbDirect (
  27. IN PWORK_CONTEXT WorkContext,
  28. IN ULONG LineNumber
  29. );
  30. VOID
  31. SrvLogServiceFailureDirect (
  32. IN ULONG LineAndService,
  33. IN NTSTATUS Status
  34. );
  35. #define SrvLogSimpleEvent( _event, _status ) SrvLogError( SrvDeviceObject, (_event), (_status), NULL, 0, NULL, 0 )
  36. #define SrvLogServiceFailure( _Service, _Status ) SrvLogServiceFailureDirect( (__LINE__<<16) | _Service, _Status )
  37. #define SrvLogInvalidSmb( _Context ) SrvLogInvalidSmbDirect( _Context, __LINE__ )
  38. VOID
  39. SrvLogTableFullError (
  40. IN ULONG Type
  41. );
  42. VOID
  43. SrvCheckSendCompletionStatus(
  44. IN NTSTATUS status,
  45. IN ULONG LineNumber
  46. );
  47. //
  48. // Error log raw data constants. Used to describe allocation type or
  49. // service call that failed. These codes are encoded in the lower word
  50. // by the 'SrvLogServiceFailure' macro above, therefore the value must
  51. // fit into 2 bytes.
  52. //
  53. // Not every error is logged. There is an error code filter that weeds out
  54. // some of the most common, and somewhat expected, error codes. However,
  55. // a component bypasses this error code weeding if the 0x1 bit is set in
  56. // the constant.
  57. //
  58. // These numeric codes are arbitrary, just ensure they are unique
  59. //
  60. //
  61. #define SRV_TABLE_FILE 0x300
  62. #define SRV_TABLE_SEARCH 0x302
  63. #define SRV_TABLE_SESSION 0x304
  64. #define SRV_TABLE_TREE_CONNECT 0x306
  65. #define SRV_RSRC_BLOCKING_IO 0x308
  66. #define SRV_RSRC_FREE_CONNECTION 0x30a
  67. #define SRV_RSRC_FREE_RAW_WORK_CONTEXT 0x30c
  68. #define SRV_RSRC_FREE_WORK_CONTEXT 0x30e
  69. #define SRV_SVC_IO_CREATE_FILE 0x310
  70. #define SRV_SVC_KE_WAIT_MULTIPLE 0x312
  71. #define SRV_SVC_KE_WAIT_SINGLE 0x314
  72. #define SRV_SVC_LSA_CALL_AUTH_PACKAGE 0x317 // log all codes
  73. #define SRV_SVC_NT_IOCTL_FILE 0x31a
  74. #define SRV_SVC_NT_QUERY_EAS 0x31c
  75. #define SRV_SVC_NT_QUERY_INFO_FILE 0x31e
  76. #define SRV_SVC_NT_QUERY_VOL_INFO_FILE 0x320
  77. #define SRV_SVC_NT_READ_FILE 0x322
  78. #define SRV_SVC_NT_REQ_WAIT_REPLY_PORT 0x324
  79. #define SRV_SVC_NT_SET_EAS 0x326
  80. #define SRV_SVC_NT_SET_INFO_FILE 0x328
  81. #define SRV_SVC_NT_SET_INFO_PROCESS 0x32a
  82. #define SRV_SVC_NT_SET_INFO_THREAD 0x32c
  83. #define SRV_SVC_NT_SET_VOL_INFO_FILE 0x32e
  84. #define SRV_SVC_NT_WRITE_FILE 0x330
  85. #define SRV_SVC_OB_REF_BY_HANDLE 0x333 // log all codes
  86. #define SRV_SVC_PS_CREATE_SYSTEM_THREAD 0x334
  87. #define SRV_SVC_SECURITY_PKG_PROBLEM 0x337 // log all codes
  88. #define SRV_SVC_LSA_LOOKUP_PACKAGE 0x339 // log all codes
  89. #define SRV_SVC_IO_CREATE_FILE_NPFS 0x33a
  90. #define SRV_SVC_PNP_TDI_NOTIFICATION 0x33c
  91. #define SRV_SVC_IO_FAST_QUERY_NW_ATTRS 0x33e
  92. #define SRV_SVC_PS_TERMINATE_SYSTEM_THREAD 0x341 // log all codes
  93. #define SRV_SVC_MDL_COMPLETE 0x342