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.

226 lines
4.7 KiB

  1. //
  2. // Wmi internal classes
  3. //
  4. class WMIEvent : __ExtrinsicEvent
  5. {
  6. };
  7. //
  8. // Embedded class that describes a multi-path drive.
  9. //
  10. [WMI,
  11. guid("{cb9d55b2-d833-4a4c-8caa-4aee3f240e9a}")]
  12. class MPIO_DRIVE_INFO {
  13. //
  14. // Number of Paths to the real device.
  15. //
  16. [WmiDataId(1)] uint32 NumberPaths;
  17. //
  18. // The MPIODisk(N).
  19. //
  20. [WmiDataId(2), MaxLen(63)] string Name;
  21. //
  22. // The real device's serial number.
  23. //
  24. [WmiDataId(3), MaxLen(63)] string SerialNumber;
  25. //
  26. // Friendly name of the DSM controlling the device.
  27. //
  28. [WmiDataId(4), MaxLen(63)] string DsmName;
  29. };
  30. //
  31. // Top-level view of disk topology.
  32. //
  33. [WMI,
  34. Dynamic,
  35. Provider("WmiProv"),
  36. Description("Multi-Path Device List"),
  37. Locale("MS\\0x409"),
  38. guid("{9f9765ed-c3a0-451f-86c1-470a1ddd3217}")]
  39. class MPIO_DISK_INFO
  40. {
  41. [key, read]
  42. string InstanceName;
  43. [read] boolean Active;
  44. //
  45. // The Number of mulit-path disk pdos that have been
  46. // created.
  47. //
  48. [WmiDataId(1),
  49. read,
  50. Description("Number of Multi-Path Drives.")
  51. ] uint32 NumberDrives;
  52. //
  53. // Variable-length array of DRIVE_INFO structures.
  54. // NOTE: Each entry will be ULONG aligned. App. writers
  55. // take note when iterating through the array.
  56. //
  57. [WmiDataId(2),
  58. read,
  59. Description("Multi-Path Drive Info Array."),
  60. WmiSizeIs("NumberDrives")
  61. ] MPIO_DRIVE_INFO DriveInfo[];
  62. };
  63. //
  64. // Path Information.
  65. //
  66. [WMI,
  67. guid("{b87c0fec-88b7-451d-a378-387ba61aeb89}")]
  68. class MPIO_ADAPTER_INFORMATION {
  69. //
  70. // Path ID. The PDO_INFORMATION class includes
  71. // it's pathId. These values can be used to find
  72. // which devices are on which path.
  73. //
  74. [WmiDataId(1)] uint64 PathId;
  75. //
  76. // Adapter Location.
  77. //
  78. [WmiDataId(2)] uint8 BusNumber;
  79. [WmiDataId(3)] uint8 DeviceNumber;
  80. [WmiDataId(4)] uint8 FunctionNumber;
  81. [WmiDataId(5)] uint8 Pad;
  82. //
  83. // Adapter Name.
  84. //
  85. [WmiDataId(6), MaxLen(63)] string AdapterName;
  86. };
  87. [Dynamic,
  88. Provider("WmiProv"),
  89. WMI,
  90. Description("Multi-Path Path Information."),
  91. Locale("MS\\0x409"),
  92. guid("{b3a05997-2077-40a3-bf36-ebd91ff8b254}")]
  93. class MPIO_PATH_INFORMATION {
  94. [key, read]
  95. string InstanceName;
  96. [read] boolean Active;
  97. [WmiDataId(1),
  98. read,
  99. Description("Number of Paths in use")
  100. ] uint32 NumberPaths;
  101. //
  102. // Note that each of these are ULONGLONG aligned.
  103. //
  104. [WmiDataId(2),
  105. read,
  106. Description("Array of Adapter/Path Information."),
  107. WmiSizeIs("NumberPaths")
  108. ] MPIO_ADAPTER_INFORMATION PathList[];
  109. };
  110. [WMI,
  111. guid("{e732405b-b15e-4872-afd0-0df69dc1bb01}")]
  112. class MPIO_CONTROLLER_INFO {
  113. //
  114. // Devices behind this controller will have a matching
  115. // ControllerId in the PDO_INFORMATION class.
  116. //
  117. [WmiDataId(1)] uint64 ControllerId;
  118. [WmiDataId(2)] uint32 ControllerState;
  119. [WmiDataId(3), MaxLen(63)] string AssociatedDsm;
  120. };
  121. [Dynamic,
  122. Provider("WmiProv"),
  123. WMI,
  124. Description("Array Controller Information."),
  125. Locale("MS\\0x409"),
  126. guid("{cf07da2c-e598-45d2-9d78-75c38b8164e8}")]
  127. class MPIO_CONTROLLER_CONFIGURATION {
  128. [key, read]
  129. string InstanceName;
  130. [read] boolean Active;
  131. [WmiDataId(1),
  132. read,
  133. Description("Number of Controllers.")
  134. ] uint32 NumberControllers;
  135. //
  136. // Note that these are ULONGLONG aligned.
  137. //
  138. [WmiDataId(2),
  139. read,
  140. Description("Array of Controller Information Structures."),
  141. WmiSizeIs("NumberControllers")
  142. ] MPIO_CONTROLLER_INFO ControllerInfo[];
  143. };
  144. //
  145. // Methods go here...TODO
  146. // Move LUNS
  147. // Set Path Verification period
  148. // Set Fail-Back period
  149. //
  150. //
  151. // Used to Log interesting events - F.O., F.B., Config change...
  152. //
  153. [Dynamic,
  154. Provider("WMIProv"),
  155. WMI,
  156. Description("MultiPath Event Logger"),
  157. guid("{2abb031a-71aa-46d4-a53f-eae34051e357}"),
  158. locale("MS\\0x409")
  159. ]
  160. class MPIO_EventEntry : WMIEvent
  161. {
  162. [key, read]
  163. string InstanceName;
  164. [key]
  165. boolean Active;
  166. [WmiDataId(1),
  167. read,
  168. Description("Time Stamp"),
  169. WmiTimeStamp
  170. ] uint64 TimeStamp;
  171. [WmiDataId(2),
  172. read,
  173. Values{"Fatal Error",
  174. "Error",
  175. "Warning",
  176. "Information"},
  177. DefineValues{"MPIO_FATAL_ERROR",
  178. "MPIO_ERROR",
  179. "MPIO_WARNING",
  180. "MPIO_INFORMATION"},
  181. ValueMap{"1", "2", "3", "4"}
  182. ] uint32 Severity;
  183. [WmiDataId(3),
  184. read,
  185. MaxLen(63),
  186. Description("Component")
  187. ] string Component;
  188. [WmiDataId(4),
  189. read,
  190. MaxLen(63),
  191. Description("Event Description")
  192. ] string EventDescription;
  193. };