Source code of Windows XP (NT5)
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.

169 lines
3.2 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. // @@END_DDKSPLIT
  17. --*/
  18. #ifndef __IOTESTLOG_H__
  19. #define __IOTESTLOG_H__
  20. #include <stdio.h>
  21. #include "ioTest.h"
  22. #define BUFFER_SIZE 4096
  23. typedef struct _LOG_CONTEXT{
  24. HANDLE Device;
  25. BOOLEAN LogToScreen;
  26. BOOLEAN LogToFile;
  27. ULONG VerbosityFlags; // FS_VF_DUMP_PARAMETERS, etc.
  28. FILE *OutputFile;
  29. BOOLEAN NextLogToScreen;
  30. // For synchronizing shutting down of both threads
  31. BOOLEAN CleaningUp;
  32. HANDLE ShutDown;
  33. }LOG_CONTEXT, *PLOG_CONTEXT;
  34. DWORD WINAPI
  35. RetrieveLogRecords(
  36. LPVOID lpParameter
  37. );
  38. VOID
  39. IrpFileDump(
  40. IOTEST_DEVICE_TYPE DeviceType,
  41. ULONG SequenceNumber,
  42. PWCHAR Name,
  43. ULONG NameLength,
  44. PRECORD_IRP RecordIrp,
  45. FILE *File,
  46. ULONG Verbosity
  47. );
  48. VOID
  49. IrpScreenDump(
  50. IOTEST_DEVICE_TYPE DeviceType,
  51. ULONG SequenceNumber,
  52. PWCHAR Name,
  53. ULONG NameLength,
  54. PRECORD_IRP RecordIrp,
  55. ULONG Verbosity
  56. );
  57. VOID
  58. FastIoFileDump(
  59. IOTEST_DEVICE_TYPE DeviceType,
  60. ULONG SequenceNumber,
  61. PWCHAR Name,
  62. ULONG NameLength,
  63. PRECORD_FASTIO RecordFastIo,
  64. FILE *File
  65. );
  66. VOID
  67. FastIoScreenDump(
  68. IOTEST_DEVICE_TYPE DeviceType,
  69. ULONG SequenceNumber,
  70. PWCHAR Name,
  71. ULONG NameLength,
  72. PRECORD_FASTIO RecordFastIo
  73. );
  74. VOID
  75. FsFilterOperationFileDump (
  76. IOTEST_DEVICE_TYPE DeviceType,
  77. ULONG SequenceNumber,
  78. PWCHAR Name,
  79. ULONG NameLength,
  80. PRECORD_FS_FILTER_OPERATION RecordFsFilterOp,
  81. FILE *File
  82. );
  83. VOID
  84. FsFilterOperationScreenDump (
  85. IOTEST_DEVICE_TYPE DeviceType,
  86. ULONG SequenceNumber,
  87. PWCHAR Name,
  88. ULONG NameLength,
  89. PRECORD_FS_FILTER_OPERATION RecordFsFilterOp
  90. );
  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. #define FS_FILTER_ACQUIRE_FOR_SECTION_SYNCHRONIZATION (UCHAR)-1
  96. #define FS_FILTER_RELEASE_FOR_SECTION_SYNCHRONIZATION (UCHAR)-2
  97. #define FS_FILTER_ACQUIRE_FOR_MOD_WRITE (UCHAR)-3
  98. #define FS_FILTER_RELEASE_FOR_MOD_WRITE (UCHAR)-4
  99. #define FS_FILTER_ACQUIRE_FOR_CC_FLUSH (UCHAR)-5
  100. #define FS_FILTER_RELEASE_FOR_CC_FLUSH (UCHAR)-6
  101. //
  102. // Verbosity flags.
  103. //
  104. #define FS_VF_DUMP_PARAMETERS 0x00000001
  105. VOID
  106. DisplayError (
  107. DWORD Code
  108. );
  109. VOID
  110. ReadTest (
  111. PLOG_CONTEXT Context,
  112. PWCHAR DriveName,
  113. ULONG DriveNameLength,
  114. BOOLEAN TopOfStack
  115. );
  116. VOID
  117. RenameTest (
  118. PLOG_CONTEXT Context,
  119. PWCHAR DriveName,
  120. ULONG DriveNameLength,
  121. BOOLEAN TopOfStack
  122. );
  123. VOID
  124. ShareTest (
  125. PLOG_CONTEXT Context,
  126. PWCHAR DriveName,
  127. ULONG DriveNameLength,
  128. BOOLEAN TopOfStack
  129. );
  130. DWORD WINAPI
  131. VerifyCurrentLogRecords (
  132. PLOG_CONTEXT Context,
  133. PEXPECTED_OPERATION ExpectedOps
  134. );
  135. #endif __IOTESTLOG_H__