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.

134 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Hewlett-Packard Company & Microsoft Corporation
  3. Module Name:
  4. i2osmi.h
  5. Abstract:
  6. This module defines the NT types, constants, and functions that are
  7. exposed from the i2oexec driver.
  8. Revision History:
  9. --*/
  10. #if !defined(I2OSMI_HDR)
  11. #define I2OSMI_HDR
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif
  15. #include <devioctl.h>
  16. #include "I2OUtil.h"
  17. #include "I2OExec.h"
  18. #pragma pack (push, 1)
  19. //
  20. // Parameter structure for Get/Set Parameters call.
  21. //
  22. typedef struct _I2O_PARAM_BLOCK {
  23. ULONG IOP;
  24. USHORT TargetTID;
  25. UCHAR ParamData[1];
  26. } I2O_PARAM_BLOCK, *PI2O_PARAM_BLOCK;
  27. //
  28. // I2O IOP Descriptor
  29. //
  30. typedef struct _I2O_IOP_DESCRIPTOR {
  31. U32 IOPNumber;
  32. BOOLEAN (*SendHandler) (PVOID HandlerContext, PVOID MessageFrame);
  33. PVOID reserved;
  34. PVOID reserved1;
  35. PVOID HandlerContext;
  36. ULONG (*GetMFA)(PVOID HandlerContext, PVOID MFA, PVOID Buffer, ULONG Size);
  37. ULONG MaxMessageFrameSize;
  38. ULONG ExpectedLCTSize;
  39. PVOID AdapterObject;
  40. ULONG MaxInboundMFrames;
  41. ULONG InitialInboundMFrames;
  42. } I2O_IOP_DESCRIPTOR, *PI2O_IOP_DESCRIPTOR;
  43. //
  44. // I2O IOP and LCT Configuration data
  45. //
  46. typedef struct _I2O_DEVICE_DESCRIPTOR {
  47. I2O_IOP_DESCRIPTOR IOP;
  48. ULONG ChangeIndicator;
  49. I2O_LCT_ENTRY LCT;
  50. } I2O_DEVICE_DESCRIPTOR, *PI2O_DEVICE_DESCRIPTOR;
  51. //
  52. // I2O Query Configuration Record structure
  53. //
  54. #define I2O_CLASS_MATCH_ANY_BITS (((1<<I2O_CLASS_ID_SZ)-1) & I2O_CLASS_MATCH_ANYCLASS)
  55. typedef struct _I2O_CONFIG_QUERY {
  56. ULONG IOPNumber;
  57. I2O_CLASS_ID ClassID;
  58. ULONG SubClassID;
  59. ULONG Index;
  60. } I2O_CONFIG_QUERY, *PI2O_CONFIG_QUERY;
  61. //
  62. // Useful define in get/set operations
  63. //
  64. typedef struct _I2O_PARAM_SCALAR_OPERATION {
  65. I2O_PARAM_OPERATIONS_LIST_HEADER OpList;
  66. I2O_PARAM_OPERATION_SPECIFIC_TEMPLATE OpBlock;
  67. } I2O_PARAM_SCALAR_OPERATION, *PI2O_PARAM_SCALAR_OPERATION;
  68. //
  69. // Defines for the interface to the I2OExec driver.
  70. //
  71. #define I2O_GET_CONFIG_INFO 0xBA0
  72. #define I2O_PRIVATE_MESSAGE_CODE 0xBB0
  73. #define I2O_EXEC_REQUEST 0xBC0
  74. #define I2O_PARAMS_GET_REQUEST 0xBD0
  75. #define I2O_PARAMS_SET_REQUEST 0xBE0
  76. #define I2O_GET_LCT 0xBF0
  77. #define I2O_GET_IOPCOUNT 0xC00
  78. #define I2O_GET_CONFIGDIALOG 0xC10
  79. #define IOCTL_GET_CONFIG_INFO \
  80. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_GET_CONFIG_INFO, METHOD_BUFFERED, FILE_ANY_ACCESS)
  81. #define IOCTL_PRIVATE_MESSAGE \
  82. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_PRIVATE_MESSAGE_CODE, METHOD_BUFFERED, FILE_ANY_ACCESS)
  83. #define IOCTL_EXEC_REQUEST \
  84. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_EXEC_REQUEST, METHOD_BUFFERED, FILE_ANY_ACCESS)
  85. #define IOCTL_PARAMS_GET_REQUEST \
  86. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_PARAMS_GET_REQUEST, METHOD_BUFFERED, FILE_ANY_ACCESS)
  87. #define IOCTL_PARAMS_SET_REQUEST \
  88. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_PARAMS_SET_REQUEST, METHOD_BUFFERED, FILE_ANY_ACCESS)
  89. #define IOCTL_GET_LCT \
  90. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_GET_LCT, METHOD_BUFFERED, FILE_ANY_ACCESS)
  91. #define IOCTL_PRIVATE_MSG \
  92. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_PRIVATE_MESSAGE, METHOD_BUFFERED, FILE_ANY_ACCESS)
  93. #define IOCTL_GET_IOP_COUNT \
  94. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_GET_IOPCOUNT, METHOD_BUFFERED, FILE_ANY_ACCESS)
  95. #define IOCTL_GET_CONFIG_DIALOG \
  96. CTL_CODE (FILE_DEVICE_UNKNOWN, I2O_GET_CONFIGDIALOG, METHOD_BUFFERED, FILE_ANY_ACCESS)
  97. #pragma pack (pop)
  98. #endif // I2OCONFIG_HDR