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.

106 lines
2.0 KiB

  1. #ifndef _MP_DEVF_H_
  2. #define _MP_DEVF_H_
  3. #include <initguid.h>
  4. #define MULTIPATH_CONTROL ((ULONG) 'mp')
  5. //
  6. // IOCTLS that the MultiPath driver sends.
  7. //
  8. //
  9. // IOCTLS that the Device Filter sends.
  10. //
  11. #define IOCTL_MPDEV_QUERY_PDO CTL_CODE (MULTIPATH_CONTROL, 0x12, METHOD_BUFFERED, FILE_ANY_ACCESS)
  12. #define IOCTL_MPDEV_REGISTER CTL_CODE (MULTIPATH_CONTROL, 0x13, METHOD_BUFFERED, FILE_ANY_ACCESS)
  13. //
  14. // QueryPDO input structure.
  15. //
  16. typedef struct _MPIO_PDO_QUERY {
  17. PDEVICE_OBJECT DeviceObject;
  18. } MPIO_PDO_QUERY, *PMPIO_PDO_QUERY;
  19. //
  20. // PDO Registration function that the device filter
  21. // will call to set-up side-band comms.
  22. //
  23. typedef
  24. NTSTATUS
  25. (*PDEV_POWER_NOTIFICATION) (
  26. IN PDEVICE_OBJECT MPDiskObject,
  27. IN PDEVICE_OBJECT FilterObject,
  28. IN PIRP Irp
  29. );
  30. typedef
  31. NTSTATUS
  32. (*PDEV_PNP_NOTIFICATION) (
  33. IN PDEVICE_OBJECT MPDiskObject,
  34. IN PDEVICE_OBJECT FilterObject,
  35. IN PIRP Irp
  36. );
  37. typedef struct _MPIO_PDO_INFO {
  38. //
  39. // MP Disk PDO.
  40. //
  41. PDEVICE_OBJECT PdoObject;
  42. //
  43. // Routine for Power Irp handling.
  44. //
  45. PDEV_POWER_NOTIFICATION DevicePowerNotify;
  46. //
  47. // Routine for PnP Irp handling.
  48. //
  49. PDEV_PNP_NOTIFICATION DevicePnPNotify;
  50. } MPIO_PDO_INFO, *PMPIO_PDO_INFO;
  51. typedef
  52. NTSTATUS
  53. (*PDEV_PDO_REGISTRATION)(
  54. IN PDEVICE_OBJECT MPDiskObject,
  55. IN PDEVICE_OBJECT FilterObject,
  56. IN PDEVICE_OBJECT LowerDevice,
  57. IN OUT PMPIO_PDO_INFO PdoInformation
  58. );
  59. //
  60. // Output structure for the DEV_REGISTRATION IOCTL.
  61. //
  62. typedef struct _MPIO_REG_INFO {
  63. //
  64. // The filter's D.O.
  65. //
  66. PDEVICE_OBJECT FilterObject;
  67. //
  68. // The target PDO aka Scsiport's PDO.
  69. //
  70. PDEVICE_OBJECT LowerDevice;
  71. //
  72. // The PDO that corresponds to the real device
  73. // that the dev. filter is layer over. (ie. the MPDisk)
  74. //
  75. PDEVICE_OBJECT MPDiskObject;
  76. //
  77. // A routine to call to register with
  78. // the MPIO PDO.
  79. //
  80. PDEV_PDO_REGISTRATION DevicePdoRegister;
  81. } MPIO_REG_INFO, *PMPIO_REG_INFO;
  82. #endif // _MP_DEV_H_