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.

115 lines
3.5 KiB

  1. #pragma once
  2. #include "define.h"
  3. //
  4. // This file contains all data structure declarations
  5. //
  6. struct VolumeInfo
  7. {
  8. char nDriveName;
  9. char sVolumeLable[20];
  10. char nType;
  11. char nHook;
  12. char nImage;
  13. };
  14. typedef struct VolumeInfo VOLINFO;
  15. typedef ULONG FILE_ID;
  16. typedef LONG NTSTATUS;
  17. #define LOG_ORIGINATING_IRP 0x0001
  18. #define LOG_COMPLETION_IRP 0x0002
  19. /* The types FASTIO that are available for the Type field of the
  20. RECORD_FASTIO structure. */
  21. typedef enum {
  22. CHECK_IF_POSSIBLE = 1,
  23. READ,
  24. WRITE,
  25. QUERY_BASIC_INFO,
  26. QUERY_STANDARD_INFO,
  27. LOCK,
  28. UNLOCK_SINGLE,
  29. UNLOCK_ALL,
  30. UNLOCK_ALL_BY_KEY,
  31. DEVICE_CONTROL,
  32. ACQUIRE_FILE,
  33. RELEASE_FILE,
  34. DETACH_DEVICE,
  35. QUERY_NETWORK_OPEN_INFO,
  36. ACQUIRE_FOR_MOD_WRITE,
  37. MDL_READ,
  38. MDL_READ_COMPLETE,
  39. MDL_WRITE,
  40. MDL_WRITE_COMPLETE,
  41. READ_COMPRESSED,
  42. WRITE_COMPRESSED,
  43. MDL_READ_COMPLETE_COMPRESSED,
  44. PREPARE_MDL_WRITE,
  45. MDL_WRITE_COMPLETE_COMPRESSED,
  46. QUERY_OPEN,
  47. RELEASE_FOR_MOD_WRITE,
  48. ACQUIRE_FOR_CC_FLUSH,
  49. RELEASE_FOR_CC_FLUSH
  50. } FASTIO_TYPE, *PFASTIO_TYPE;
  51. typedef struct _RECORD_IRP
  52. {
  53. LARGE_INTEGER OriginatingTime; // The time the IRP orginated
  54. LARGE_INTEGER CompletionTime; // The time the IRP was completed
  55. UCHAR IrpMajor; // From _IO_STACK_LOCATION
  56. UCHAR IrpMinor; // From _IO_STACK_LOCATION
  57. ULONG IrpFlags; // From _IRP (no cache, paging i/o, sync.
  58. // api, assoc. irp, buffered i/o, etc.)
  59. FILE_ID FileObject; // From _IO_STACK_LOCATION (This is the
  60. // PFILE_OBJECT, but this isn't
  61. // available in user-mode)
  62. NTSTATUS ReturnStatus; // From _IRP->IoStatus.Status
  63. ULONG ReturnInformation; // From _IRP->IoStatus.Information
  64. FILE_ID ProcessId;
  65. FILE_ID ThreadId;
  66. } RECORD_IRP, *PRECORD_IRP;
  67. typedef struct _RECORD_FASTIO
  68. {
  69. LARGE_INTEGER StartTime; // Time Fast I/O request begins processing
  70. LARGE_INTEGER CompletionTime;// Time Fast I/O request completes processing
  71. FASTIO_TYPE Type; // Type of FASTIO operation
  72. FILE_ID FileObject; // Parameter to FASTIO call, should be
  73. // unique identifier in user space
  74. LARGE_INTEGER FileOffset; // Offset into the file where the I/O is
  75. // taking place
  76. ULONG Length; // The length of data for the I/O operation
  77. BOOLEAN Wait; // Parameter to most FASTIO calls, signifies
  78. // if this operation can wait
  79. NTSTATUS ReturnStatus; // From IO_STATUS_BLOCK
  80. ULONG Reserved; // Reserved space
  81. FILE_ID ProcessId;
  82. FILE_ID ThreadId;
  83. } RECORD_FASTIO, *PRECORD_FASTIO;
  84. typedef union _RECORD_IO
  85. {
  86. RECORD_IRP RecordIrp;
  87. RECORD_FASTIO RecordFastIo;
  88. } RECORD_IO, *PRECORD_IO;
  89. typedef struct _LOG_RECORD
  90. {
  91. ULONG Length; // Length of record including header
  92. ULONG SequenceNumber;
  93. ULONG RecordType;
  94. RECORD_IO Record;
  95. WCHAR Name[MAX_PATH];
  96. } LOG_RECORD, *PLOG_RECORD;
  97. typedef struct _PATTACHED_DEVICE
  98. {
  99. BOOLEAN LogState;
  100. WCHAR DeviceName[DEVICE_NAME_SIZE];
  101. } ATTACHED_DEVICE, *PATTACHED_DEVICE;