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.

144 lines
4.4 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. USBIODEF.H
  5. Abstract:
  6. Common header file for all USB IOCTLs defined for
  7. the core stack. We define them in this single header file
  8. so that we can maintain backward compatibilty with older
  9. versions of the stack.
  10. We divide the IOCTLS supported by the stack as follows:
  11. kernel IOCTLS:
  12. user IOCTLS:
  13. IOCTLS Handled by HCD (PORT) FDO
  14. IOCTLS Handled by HUB FDO
  15. IOCTLS Handled by USB (DEVICE) PDO
  16. Environment:
  17. kernel & user mode
  18. Revision History:
  19. --*/
  20. #ifndef __USBIODEF_H__
  21. #define __USBIODEF_H__
  22. /*
  23. kernel mode IOCTL index values
  24. The following codes are valid only if passed as in
  25. the icControlCode parameter for
  26. IRP_MJ_INTERNAL_DEVICE_CONTROL
  27. */
  28. #define USB_SUBMIT_URB 0
  29. #define USB_RESET_PORT 1
  30. #define USB_GET_ROOTHUB_PDO 3
  31. #define USB_GET_PORT_STATUS 4
  32. #define USB_ENABLE_PORT 5
  33. #define USB_GET_HUB_COUNT 6
  34. #define USB_CYCLE_PORT 7
  35. #define USB_GET_HUB_NAME 8
  36. #define USB_IDLE_NOTIFICATION 9
  37. #define USB_GET_BUS_INFO 264
  38. #define USB_GET_CONTROLLER_NAME 265
  39. #define USB_GET_BUSGUID_INFO 266
  40. #define USB_GET_PARENT_HUB_INFO 267
  41. #define USB_GET_DEVICE_HANDLE 268
  42. /*
  43. user mode IOCTL index values
  44. The following codes are valid only if passed as in
  45. the icControlCode parameter for
  46. IRP_MJ_DEVICE_CONTROL
  47. hence, they are callable by user mode applications
  48. */
  49. #define HCD_GET_STATS_1 255
  50. #define HCD_DIAGNOSTIC_MODE_ON 256
  51. #define HCD_DIAGNOSTIC_MODE_OFF 257
  52. #define HCD_GET_ROOT_HUB_NAME 258
  53. #define HCD_GET_DRIVERKEY_NAME 265
  54. #define HCD_GET_STATS_2 266
  55. #define HCD_DISABLE_PORT 268
  56. #define HCD_ENABLE_PORT 269
  57. #define HCD_USER_REQUEST 270
  58. #define USB_GET_NODE_INFORMATION 258
  59. #define USB_GET_NODE_CONNECTION_INFORMATION 259
  60. #define USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION 260
  61. #define USB_GET_NODE_CONNECTION_NAME 261
  62. #define USB_DIAG_IGNORE_HUBS_ON 262
  63. #define USB_DIAG_IGNORE_HUBS_OFF 263
  64. #define USB_GET_NODE_CONNECTION_DRIVERKEY_NAME 264
  65. #define USB_GET_HUB_CAPABILITIES 271
  66. #define USB_GET_NODE_CONNECTION_ATTRIBUTES 272
  67. #define USB_HUB_CYCLE_PORT 273
  68. #define USB_GET_NODE_CONNECTION_INFORMATION_EX 274
  69. /*
  70. USB specific GUIDs
  71. */
  72. /* f18a0e88-c30c-11d0-8815-00a0c906bed8 */
  73. DEFINE_GUID(GUID_DEVINTERFACE_USB_HUB, 0xf18a0e88, 0xc30c, 0x11d0, 0x88, 0x15, 0x00, \
  74. 0xa0, 0xc9, 0x06, 0xbe, 0xd8);
  75. /* A5DCBF10-6530-11D2-901F-00C04FB951ED */
  76. DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE, 0xA5DCBF10L, 0x6530, 0x11D2, 0x90, 0x1F, 0x00, \
  77. 0xC0, 0x4F, 0xB9, 0x51, 0xED);
  78. /* 3ABF6F2D-71C4-462a-8A92-1E6861E6AF27 */
  79. DEFINE_GUID(GUID_DEVINTERFACE_USB_HOST_CONTROLLER, 0x3abf6f2d, 0x71c4, 0x462a, 0x8a, 0x92, 0x1e, \
  80. 0x68, 0x61, 0xe6, 0xaf, 0x27);
  81. /* 4E623B20-CB14-11D1-B331-00A0C959BBD2 */
  82. DEFINE_GUID(GUID_USB_WMI_STD_DATA, 0x4E623B20L, 0xCB14, 0x11D1, 0xB3, 0x31, 0x00,\
  83. 0xA0, 0xC9, 0x59, 0xBB, 0xD2);
  84. /* 4E623B20-CB14-11D1-B331-00A0C959BBD2 */
  85. DEFINE_GUID(GUID_USB_WMI_STD_NOTIFICATION, 0x4E623B20L, 0xCB14, 0x11D1, 0xB3, 0x31, 0x00,\
  86. 0xA0, 0xC9, 0x59, 0xBB, 0xD2);
  87. /*
  88. Obsolete device interface class GUID names.
  89. (use of above GUID_DEVINTERFACE_* names is recommended).
  90. --*/
  91. #define GUID_CLASS_USBHUB GUID_DEVINTERFACE_USB_HUB
  92. #define GUID_CLASS_USB_DEVICE GUID_DEVINTERFACE_USB_DEVICE
  93. #define GUID_CLASS_USB_HOST_CONTROLLER GUID_DEVINTERFACE_USB_HOST_CONTROLLER
  94. #define FILE_DEVICE_USB FILE_DEVICE_UNKNOWN
  95. /*
  96. common macro used by IOCTL header files
  97. */
  98. #define USB_CTL(id) CTL_CODE(FILE_DEVICE_USB, \
  99. (id), \
  100. METHOD_BUFFERED, \
  101. FILE_ANY_ACCESS)
  102. #define USB_KERNEL_CTL(id) CTL_CODE(FILE_DEVICE_USB, \
  103. (id), \
  104. METHOD_NEITHER, \
  105. FILE_ANY_ACCESS)
  106. #endif //__USBIODEF_H__