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.

139 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1989-1999 Microsoft Corporation
  3. Module Name:
  4. log.h
  5. Abstract:
  6. This module contains the structures and prototypes used by the user
  7. program to retrieve and see the log records recorded by filespy.sys.
  8. // @@BEGIN_DDKSPLIT
  9. Author:
  10. Molly Brown (MollyBro) 21-Apr-1999
  11. // @@END_DDKSPLIT
  12. Environment:
  13. User mode
  14. // @@BEGIN_DDKSPLIT
  15. Revision History:
  16. Molly Brown (mollybro) 21-May-2002
  17. Modify sample to make it support running on Windows 2000 or later if
  18. built in the latest build environment and allow it to be built in W2K
  19. and later build environments.
  20. // @@END_DDKSPLIT
  21. --*/
  22. #ifndef __FSPYLOG_H__
  23. #define __FSPYLOG_H__
  24. #include <stdio.h>
  25. #include "filespy.h"
  26. #define BUFFER_SIZE 4096
  27. typedef struct _LOG_CONTEXT{
  28. HANDLE Device;
  29. BOOLEAN LogToScreen;
  30. BOOLEAN LogToFile;
  31. ULONG VerbosityFlags; // FS_VF_DUMP_PARAMETERS, etc.
  32. FILE *OutputFile;
  33. BOOLEAN NextLogToScreen;
  34. // For synchronizing shutting down of both threads
  35. BOOLEAN CleaningUp;
  36. HANDLE ShutDown;
  37. }LOG_CONTEXT, *PLOG_CONTEXT;
  38. DWORD WINAPI
  39. RetrieveLogRecords(
  40. LPVOID lpParameter
  41. );
  42. VOID
  43. IrpFileDump(
  44. ULONG SequenceNumber,
  45. PWCHAR Name,
  46. ULONG NameLength,
  47. PRECORD_IRP RecordIrp,
  48. FILE *File,
  49. ULONG Verbosity
  50. );
  51. VOID
  52. IrpScreenDump(
  53. ULONG SequenceNumber,
  54. PWCHAR Name,
  55. ULONG NameLength,
  56. PRECORD_IRP RecordIrp,
  57. ULONG Verbosity
  58. );
  59. VOID
  60. FastIoFileDump(
  61. ULONG SequenceNumber,
  62. PWCHAR Name,
  63. ULONG NameLength,
  64. PRECORD_FASTIO RecordFastIo,
  65. FILE *File
  66. );
  67. VOID
  68. FastIoScreenDump(
  69. ULONG SequenceNumber,
  70. PWCHAR Name,
  71. ULONG NameLength,
  72. PRECORD_FASTIO RecordFastIo
  73. );
  74. #if WINVER >= 0x0501 /* See comment in DriverEntry */
  75. VOID
  76. FsFilterOperationFileDump (
  77. ULONG SequenceNumber,
  78. PWCHAR Name,
  79. ULONG NameLength,
  80. PRECORD_FS_FILTER_OPERATION RecordFsFilterOp,
  81. FILE *File
  82. );
  83. VOID
  84. FsFilterOperationScreenDump (
  85. ULONG SequenceNumber,
  86. PWCHAR Name,
  87. ULONG NameLength,
  88. PRECORD_FS_FILTER_OPERATION RecordFsFilterOp
  89. );
  90. #endif
  91. #define IRP_NOCACHE 0x00000001
  92. #define IRP_PAGING_IO 0x00000002
  93. #define IRP_SYNCHRONOUS_API 0x00000004
  94. #define IRP_SYNCHRONOUS_PAGING_IO 0x00000040
  95. #if WINVER >= 0x0501
  96. #define FS_FILTER_ACQUIRE_FOR_SECTION_SYNCHRONIZATION (UCHAR)-1
  97. #define FS_FILTER_RELEASE_FOR_SECTION_SYNCHRONIZATION (UCHAR)-2
  98. #define FS_FILTER_ACQUIRE_FOR_MOD_WRITE (UCHAR)-3
  99. #define FS_FILTER_RELEASE_FOR_MOD_WRITE (UCHAR)-4
  100. #define FS_FILTER_ACQUIRE_FOR_CC_FLUSH (UCHAR)-5
  101. #define FS_FILTER_RELEASE_FOR_CC_FLUSH (UCHAR)-6
  102. #endif
  103. //
  104. // Verbosity flags.
  105. //
  106. #define FS_VF_DUMP_PARAMETERS 0x00000001
  107. #endif __FSPYLOG_H__