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.

173 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. iovutil.h
  5. Abstract:
  6. This header exposes various utilities required to do driver verification.
  7. Author:
  8. Adrian J. Oney (adriao) 20-Apr-1998
  9. Environment:
  10. Kernel mode
  11. Revision History:
  12. AdriaO 02/10/2000 - Seperated out from ntos\io\trackirp.h
  13. --*/
  14. typedef enum {
  15. DATABASELOCKSTATE_HELD,
  16. DATABASELOCKSTATE_NOT_HELD
  17. } DATABASELOCKSTATE;
  18. typedef enum {
  19. DEVOBJ_RELATION_IDENTICAL,
  20. DEVOBJ_RELATION_FIRST_IMMEDIATELY_ABOVE_SECOND,
  21. DEVOBJ_RELATION_FIRST_IMMEDIATELY_BELOW_SECOND,
  22. DEVOBJ_RELATION_FIRST_ABOVE_SECOND,
  23. DEVOBJ_RELATION_FIRST_BELOW_SECOND,
  24. DEVOBJ_RELATION_NOT_IN_SAME_STACK
  25. } DEVOBJ_RELATION, *PDEVOBJ_RELATION;
  26. typedef enum {
  27. MARKTYPE_DELETED,
  28. MARKTYPE_BOTTOM_OF_FDO_STACK,
  29. MARKTYPE_DESIGNATED_FDO,
  30. MARKTYPE_RAW_PDO,
  31. MARKTYPE_DEVICE_CHECKED,
  32. MARKTYPE_RELATION_PDO_EXAMINED
  33. } MARK_TYPE;
  34. VOID
  35. FASTCALL
  36. IovUtilInit(
  37. VOID
  38. );
  39. VOID
  40. FASTCALL
  41. IovUtilGetLowerDeviceObject(
  42. IN PDEVICE_OBJECT UpperDeviceObject,
  43. OUT PDEVICE_OBJECT *LowerDeviceObject
  44. );
  45. VOID
  46. FASTCALL
  47. IovUtilGetBottomDeviceObject(
  48. IN PDEVICE_OBJECT DeviceObject,
  49. OUT PDEVICE_OBJECT *BottomDeviceObject
  50. );
  51. VOID
  52. FASTCALL
  53. IovUtilGetUpperDeviceObject(
  54. IN PDEVICE_OBJECT LowerDeviceObject,
  55. OUT PDEVICE_OBJECT *UpperDeviceObject
  56. );
  57. BOOLEAN
  58. FASTCALL
  59. IovUtilIsVerifiedDeviceStack(
  60. IN PDEVICE_OBJECT DeviceObject
  61. );
  62. VOID
  63. FASTCALL
  64. IovUtilFlushVerifierDriverListCache(
  65. VOID
  66. );
  67. VOID
  68. FASTCALL
  69. IovUtilFlushStackCache(
  70. IN PDEVICE_OBJECT DeviceObject,
  71. IN DATABASELOCKSTATE DatabaseLockState
  72. );
  73. VOID
  74. IovUtilRelateDeviceObjects(
  75. IN PDEVICE_OBJECT FirstDeviceObject,
  76. IN PDEVICE_OBJECT SecondDeviceObject,
  77. OUT DEVOBJ_RELATION *DeviceObjectRelation
  78. );
  79. BOOLEAN
  80. IovUtilIsPdo(
  81. IN PDEVICE_OBJECT DeviceObject
  82. );
  83. BOOLEAN
  84. IovUtilIsWdmStack(
  85. IN PDEVICE_OBJECT DeviceObject
  86. );
  87. BOOLEAN
  88. FASTCALL
  89. IovUtilHasDispatchHandler(
  90. IN PDRIVER_OBJECT DriverObject,
  91. IN UCHAR MajorFunction
  92. );
  93. BOOLEAN
  94. FASTCALL
  95. IovUtilIsInFdoStack(
  96. IN PDEVICE_OBJECT DeviceObject
  97. );
  98. BOOLEAN
  99. FASTCALL
  100. IovUtilIsRawPdo(
  101. IN PDEVICE_OBJECT DeviceObject
  102. );
  103. BOOLEAN
  104. FASTCALL
  105. IovUtilIsDesignatedFdo(
  106. IN PDEVICE_OBJECT DeviceObject
  107. );
  108. VOID
  109. FASTCALL
  110. IovUtilMarkDeviceObject(
  111. IN PDEVICE_OBJECT DeviceObject,
  112. IN MARK_TYPE MarkType
  113. );
  114. BOOLEAN
  115. FASTCALL
  116. IovUtilIsDeviceObjectMarked(
  117. IN PDEVICE_OBJECT DeviceObject,
  118. IN MARK_TYPE MarkType
  119. );
  120. VOID
  121. FASTCALL
  122. IovUtilMarkStack(
  123. IN PDEVICE_OBJECT PhysicalDeviceObject,
  124. IN PDEVICE_OBJECT BottomOfFdoStack OPTIONAL,
  125. IN PDEVICE_OBJECT FunctionalDeviceObject OPTIONAL,
  126. IN BOOLEAN RawStack
  127. );
  128. VOID
  129. FASTCALL
  130. IovUtilWatermarkIrp(
  131. IN PIRP Irp,
  132. IN ULONG Flags
  133. );