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.

218 lines
4.1 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. rasd.hxx
  5. Abstract:
  6. This module contains the declarations for the
  7. RA_PROCESS_SD class which handles the read ahead
  8. approach in security descriptor verification stage.
  9. Author:
  10. Daniel Chan (danielch) 09-Dec-98
  11. --*/
  12. #if !defined(_RA_PROCESS_SD_DEFN_)
  13. #define _RA_PROCESS_SD_DEFN_
  14. #include "supera.hxx"
  15. #include "untfs.hxx"
  16. #include "message.hxx"
  17. DECLARE_CLASS( NTFS_FILE_RECORD_SEGMENT );
  18. DECLARE_CLASS( RA_PROCESS_SD );
  19. DECLARE_CLASS( NTFS_SA );
  20. DECLARE_CLASS( NTFS_MASTER_FILE_TABLE );
  21. class RA_PROCESS_SD : public OBJECT {
  22. public:
  23. UNTFS_EXPORT
  24. DECLARE_CONSTRUCTOR(RA_PROCESS_SD);
  25. VIRTUAL
  26. UNTFS_EXPORT
  27. ~RA_PROCESS_SD(
  28. );
  29. STATIC
  30. NONVIRTUAL
  31. UNTFS_EXPORT
  32. BOOLEAN
  33. Initialize(
  34. IN PNTFS_SA Sa,
  35. IN BIG_INT TotalNumberOfFrs,
  36. IN PVCN FirstFrsNumber,
  37. IN PULONG NumberOfFrsToRead,
  38. IN PNTFS_FILE_RECORD_SEGMENT Frs1,
  39. IN PNTFS_FILE_RECORD_SEGMENT Frs2,
  40. IN HANDLE ReadAheadEvent,
  41. IN HANDLE ReadReadyEvent,
  42. IN PNTFS_MASTER_FILE_TABLE Mft
  43. );
  44. STATIC
  45. NTSTATUS
  46. ProcessSDWrapper(
  47. IN OUT PVOID lpParameter
  48. );
  49. STATIC
  50. NONVIRTUAL
  51. PNTFS_SA
  52. GetSa(
  53. );
  54. STATIC
  55. NONVIRTUAL
  56. BIG_INT
  57. GetTotalNumberOfFrs(
  58. );
  59. STATIC
  60. NONVIRTUAL
  61. PVCN
  62. GetFirstFrsNumber(
  63. );
  64. STATIC
  65. NONVIRTUAL
  66. PULONG
  67. GetNumberOfFrsToRead(
  68. );
  69. STATIC
  70. NONVIRTUAL
  71. PNTFS_FILE_RECORD_SEGMENT
  72. GetFrs1(
  73. );
  74. STATIC
  75. NONVIRTUAL
  76. PNTFS_FILE_RECORD_SEGMENT
  77. GetFrs2(
  78. );
  79. STATIC
  80. NONVIRTUAL
  81. HANDLE
  82. GetReadAheadEvent(
  83. );
  84. STATIC
  85. NONVIRTUAL
  86. HANDLE
  87. GetReadReadyEvent(
  88. );
  89. STATIC
  90. NONVIRTUAL
  91. PNTFS_MASTER_FILE_TABLE
  92. GetMft(
  93. );
  94. private:
  95. NONVIRTUAL
  96. VOID
  97. Construct (
  98. );
  99. NONVIRTUAL
  100. VOID
  101. Destroy(
  102. );
  103. STATIC PNTFS_SA _sa;
  104. STATIC ULONG64 _total_number_of_frs;
  105. STATIC PVCN _first_frs_number;
  106. STATIC PULONG _number_of_frs_to_read;
  107. STATIC PNTFS_FILE_RECORD_SEGMENT _frs1;
  108. STATIC PNTFS_FILE_RECORD_SEGMENT _frs2;
  109. STATIC HANDLE _read_ahead_event;
  110. STATIC HANDLE _read_ready_event;
  111. STATIC PNTFS_MASTER_FILE_TABLE _mft;
  112. };
  113. INLINE
  114. BIG_INT
  115. RA_PROCESS_SD::GetTotalNumberOfFrs(
  116. )
  117. {
  118. return _total_number_of_frs;
  119. }
  120. INLINE
  121. PVCN
  122. RA_PROCESS_SD::GetFirstFrsNumber(
  123. )
  124. {
  125. return _first_frs_number;
  126. }
  127. INLINE
  128. PULONG
  129. RA_PROCESS_SD::GetNumberOfFrsToRead(
  130. )
  131. {
  132. return _number_of_frs_to_read;
  133. }
  134. INLINE
  135. PNTFS_FILE_RECORD_SEGMENT
  136. RA_PROCESS_SD::GetFrs1(
  137. )
  138. {
  139. return _frs1;
  140. }
  141. INLINE
  142. PNTFS_FILE_RECORD_SEGMENT
  143. RA_PROCESS_SD::GetFrs2(
  144. )
  145. {
  146. return _frs2;
  147. }
  148. INLINE
  149. HANDLE
  150. RA_PROCESS_SD::GetReadAheadEvent(
  151. )
  152. {
  153. return _read_ahead_event;
  154. }
  155. INLINE
  156. HANDLE
  157. RA_PROCESS_SD::GetReadReadyEvent(
  158. )
  159. {
  160. return _read_ready_event;
  161. }
  162. INLINE
  163. PNTFS_SA
  164. RA_PROCESS_SD::GetSa(
  165. )
  166. {
  167. return _sa;
  168. }
  169. INLINE
  170. PNTFS_MASTER_FILE_TABLE
  171. RA_PROCESS_SD::GetMft(
  172. )
  173. {
  174. return _mft;
  175. }
  176. #endif // _RA_PROCESS_SD_DEFN_