ReactOS  0.4.14-dev-604-gcfdd483
usbioctl.h
Go to the documentation of this file.
1 /*
2  * usbioctl.h
3  *
4  * USB IOCTL interface.
5  *
6  * This file is part of the ReactOS PSDK package.
7  *
8  * Contributors:
9  * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
16  * This code is distributed in the hope that it will be useful but
17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18  * DISCLAIMED. This includes but is not limited to warranties of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  */
22 
23 #pragma once
24 
25 #include "usb100.h"
26 #include "usbiodef.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #define IOCTL_INTERNAL_USB_SUBMIT_URB \
33  CTL_CODE(FILE_DEVICE_USB, USB_SUBMIT_URB, METHOD_NEITHER, FILE_ANY_ACCESS)
34 
35 #define IOCTL_INTERNAL_USB_RESET_PORT \
36  CTL_CODE(FILE_DEVICE_USB, USB_RESET_PORT, METHOD_NEITHER, FILE_ANY_ACCESS)
37 
38 #define IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO \
39  CTL_CODE(FILE_DEVICE_USB, USB_GET_ROOTHUB_PDO, METHOD_NEITHER, FILE_ANY_ACCESS)
40 
41 #define USBD_PORT_ENABLED 1
42 #define USBD_PORT_CONNECTED 2
43 
44 #define IOCTL_INTERNAL_USB_GET_PORT_STATUS \
45  CTL_CODE(FILE_DEVICE_USB, USB_GET_PORT_STATUS, METHOD_NEITHER, FILE_ANY_ACCESS)
46 
47 #define IOCTL_INTERNAL_USB_ENABLE_PORT \
48  CTL_CODE(FILE_DEVICE_USB, USB_ENABLE_PORT, METHOD_NEITHER, FILE_ANY_ACCESS)
49 
50 #define IOCTL_INTERNAL_USB_GET_HUB_COUNT \
51  CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_COUNT, METHOD_NEITHER, FILE_ANY_ACCESS)
52 
53 #define IOCTL_INTERNAL_USB_CYCLE_PORT \
54  CTL_CODE(FILE_DEVICE_USB, USB_CYCLE_PORT, METHOD_NEITHER, FILE_ANY_ACCESS)
55 
56 #define IOCTL_INTERNAL_USB_GET_HUB_NAME \
57  CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
58 
59 #define IOCTL_INTERNAL_USB_GET_BUS_INFO \
60  CTL_CODE(FILE_DEVICE_USB, USB_GET_BUS_INFO, METHOD_BUFFERED, FILE_ANY_ACCESS)
61 
62 #define IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME \
63  CTL_CODE(FILE_DEVICE_USB, USB_GET_CONTROLLER_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
64 
65 #define IOCTL_INTERNAL_USB_GET_BUSGUID_INFO \
66  CTL_CODE(FILE_DEVICE_USB, USB_GET_BUSGUID_INFO, METHOD_BUFFERED, FILE_ANY_ACCESS)
67 
68 #define IOCTL_INTERNAL_USB_GET_PARENT_HUB_INFO \
69  CTL_CODE(FILE_DEVICE_USB, USB_GET_PARENT_HUB_INFO, METHOD_BUFFERED, FILE_ANY_ACCESS)
70 
71 #if (_WIN32_WINNT >= 0x0501)
72 
73 #define IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION \
74  CTL_CODE(FILE_DEVICE_USB, USB_IDLE_NOTIFICATION, METHOD_NEITHER, FILE_ANY_ACCESS)
75 
76 #define IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE \
77  CTL_CODE(FILE_DEVICE_USB, USB_GET_DEVICE_HANDLE, METHOD_NEITHER, FILE_ANY_ACCESS)
78 
79 #endif
80 
81 #if (_WIN32_WINNT >= 0x0600)
82 
83 #define IOCTL_INTERNAL_USB_NOTIFY_IDLE_READY \
84  CTL_CODE(FILE_DEVICE_USB, USB_IDLE_NOTIFICATION_EX, METHOD_NEITHER, FILE_ANY_ACCESS)
85 
86 #define IOCTL_INTERNAL_USB_REQ_GLOBAL_SUSPEND \
87  CTL_CODE(FILE_DEVICE_USB, USB_REQ_GLOBAL_SUSPEND, METHOD_NEITHER, FILE_ANY_ACCESS)
88 
89 #define IOCTL_INTERNAL_USB_REQ_GLOBAL_RESUME \
90  CTL_CODE(FILE_DEVICE_USB, USB_REQ_GLOBAL_RESUME, METHOD_NEITHER, FILE_ANY_ACCESS)
91 
92 #ifdef USB20_API
93 typedef struct _USB_START_FAILDATA {
94  ULONG LengthInBytes;
95  NTSTATUS NtStatus;
96  USBD_STATUS UsbdStatus;
97  ULONG ConnectStatus;
98  UCHAR DriverData[4];
99 } USB_START_FAILDATA, *PUSB_START_FAILDATA;
100 #endif
101 
102 #define IOCTL_INTERNAL_USB_RECORD_FAILURE \
103  CTL_CODE(FILE_DEVICE_USB, USB_RECORD_FAILURE, METHOD_NEITHER, FILE_ANY_ACCESS)
104 
105 #define IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE_EX \
106  CTL_CODE(FILE_DEVICE_USB, USB_GET_DEVICE_HANDLE_EX, METHOD_NEITHER, FILE_ANY_ACCESS)
107 
108 #define IOCTL_INTERNAL_USB_GET_TT_DEVICE_HANDLE \
109  CTL_CODE(FILE_DEVICE_USB, USB_GET_TT_DEVICE_HANDLE, METHOD_NEITHER, FILE_ANY_ACCESS)
110 
111 typedef struct _USB_TOPOLOGY_ADDRESS {
112  ULONG PciBusNumber;
113  ULONG PciDeviceNumber;
114  ULONG PciFunctionNumber;
115  ULONG Reserved;
116  USHORT RootHubPortNumber;
117  USHORT HubPortNumber[5];
119 } USB_TOPOLOGY_ADDRESS, *PUSB_TOPOLOGY_ADDRESS;
120 
121 #define IOCTL_INTERNAL_USB_GET_TOPOLOGY_ADDRESS \
122  CTL_CODE(FILE_DEVICE_USB, USB_GET_TOPOLOGY_ADDRESS, METHOD_NEITHER, FILE_ANY_ACCESS)
123 
124 #define IOCTL_INTERNAL_USB_GET_DEVICE_CONFIG_INFO \
125  CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_CONFIG_INFO, METHOD_NEITHER, FILE_ANY_ACCESS)
126 
127 #endif
128 
129 #ifndef USB_KERNEL_IOCTL
130 
131 #define IOCTL_USB_HCD_GET_STATS_1 \
132  CTL_CODE(FILE_DEVICE_USB, HCD_GET_STATS_1, METHOD_BUFFERED, FILE_ANY_ACCESS)
133 
134 #define IOCTL_USB_HCD_GET_STATS_2 \
135  CTL_CODE(FILE_DEVICE_USB, HCD_GET_STATS_2, METHOD_BUFFERED, FILE_ANY_ACCESS)
136 
137 #define IOCTL_USB_HCD_DISABLE_PORT \
138  CTL_CODE(FILE_DEVICE_USB, HCD_DISABLE_PORT, METHOD_BUFFERED, FILE_ANY_ACCESS)
139 
140 #define IOCTL_USB_HCD_ENABLE_PORT \
141  CTL_CODE(FILE_DEVICE_USB, HCD_ENABLE_PORT, METHOD_BUFFERED, FILE_ANY_ACCESS)
142 
143 #define IOCTL_USB_HCD_DISABLE_PORT \
144  CTL_CODE(FILE_DEVICE_USB, HCD_DISABLE_PORT, METHOD_BUFFERED, FILE_ANY_ACCESS)
145 
146 #define IOCTL_USB_HCD_ENABLE_PORT \
147  CTL_CODE(FILE_DEVICE_USB, HCD_ENABLE_PORT, METHOD_BUFFERED, FILE_ANY_ACCESS)
148 
149 #ifndef IOCTL_USB_DIAGNOSTIC_MODE_OFF
150 #define IOCTL_USB_DIAGNOSTIC_MODE_OFF \
151  CTL_CODE(FILE_DEVICE_USB, HCD_DIAGNOSTIC_MODE_OFF, METHOD_BUFFERED, FILE_ANY_ACCESS)
152 #endif
153 
154 #ifndef IOCTL_USB_DIAGNOSTIC_MODE_ON
155 #define IOCTL_USB_DIAGNOSTIC_MODE_ON \
156  CTL_CODE(FILE_DEVICE_USB, HCD_DIAGNOSTIC_MODE_ON, METHOD_BUFFERED, FILE_ANY_ACCESS)
157 #endif
158 
159 #ifndef IOCTL_USB_GET_ROOT_HUB_NAME
160 #define IOCTL_USB_GET_ROOT_HUB_NAME \
161  CTL_CODE(FILE_DEVICE_USB, HCD_GET_ROOT_HUB_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
162 #endif
163 
164 #ifndef IOCTL_GET_HCD_DRIVERKEY_NAME
165 #define IOCTL_GET_HCD_DRIVERKEY_NAME \
166  CTL_CODE(FILE_DEVICE_USB, HCD_GET_DRIVERKEY_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
167 #endif
168 
169 #define IOCTL_USB_GET_NODE_INFORMATION \
170  CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_INFORMATION, METHOD_BUFFERED, FILE_ANY_ACCESS)
171 
172 #define IOCTL_USB_GET_NODE_CONNECTION_INFORMATION \
173  CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_INFORMATION, METHOD_BUFFERED, FILE_ANY_ACCESS)
174 
175 #define IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION \
176  CTL_CODE(FILE_DEVICE_USB, USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, METHOD_BUFFERED, FILE_ANY_ACCESS)
177 
178 #define IOCTL_USB_GET_NODE_CONNECTION_NAME \
179  CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
180 
181 #define IOCTL_USB_DIAG_IGNORE_HUBS_ON \
182  CTL_CODE(FILE_DEVICE_USB, USB_DIAG_IGNORE_HUBS_ON, METHOD_BUFFERED, FILE_ANY_ACCESS)
183 
184 #define IOCTL_USB_DIAG_IGNORE_HUBS_OFF \
185  CTL_CODE(FILE_DEVICE_USB, USB_DIAG_IGNORE_HUBS_OFF, METHOD_BUFFERED, FILE_ANY_ACCESS)
186 
187 #define IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME \
188  CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_DRIVERKEY_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
189 
190 #if (_WIN32_WINNT >= 0x0501)
191 
192 #define IOCTL_USB_GET_HUB_CAPABILITIES \
193  CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_CAPABILITIES, METHOD_BUFFERED, FILE_ANY_ACCESS)
194 
195 #define IOCTL_USB_HUB_CYCLE_PORT \
196  CTL_CODE(FILE_DEVICE_USB, USB_HUB_CYCLE_PORT, METHOD_BUFFERED, FILE_ANY_ACCESS)
197 
198 #define IOCTL_USB_GET_NODE_CONNECTION_ATTRIBUTES \
199  CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_ATTRIBUTES, METHOD_BUFFERED, FILE_ANY_ACCESS)
200 
201 #define IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX \
202  CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_INFORMATION_EX, METHOD_BUFFERED, FILE_ANY_ACCESS)
203 
204 #endif
205 
206 #if (_WIN32_WINNT >= 0x0600)
207 
208 #define IOCTL_USB_RESET_HUB \
209  CTL_CODE(FILE_DEVICE_USB, USB_RESET_HUB, METHOD_BUFFERED, FILE_ANY_ACCESS)
210 
211 #define IOCTL_USB_GET_HUB_CAPABILITIES_EX \
212  CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_CAPABILITIES_EX, METHOD_BUFFERED, FILE_ANY_ACCESS)
213 
214 #endif
215 
216 #include <pshpack1.h>
217 
218 typedef enum _USB_HUB_NODE {
221 } USB_HUB_NODE;
222 
223 typedef struct _USB_HUB_INFORMATION {
227 
231 
232 typedef struct _USB_NODE_INFORMATION {
234  union {
237  } u;
239 
240 typedef struct _USB_PIPE_INFO {
244 
245 #if (_WIN32_WINNT >= 0x0600)
246 
247 typedef enum _USB_CONNECTION_STATUS {
255  DeviceHubNestedTooDeeply,
256  DeviceInLegacyHub,
257  DeviceEnumerating,
258  DeviceReset
260 
261 #elif (_WIN32_WINNT >= 0x0501)
262 
263 typedef enum _USB_CONNECTION_STATUS {
271  DeviceHubNestedTooDeeply,
272  DeviceInLegacyHub
274 
275 #else
276 
286 
287 #endif
288 
300 
306 
312 
313 typedef struct _USB_HUB_NAME {
317 
318 typedef struct _USB_ROOT_HUB_NAME {
322 
323 typedef struct _USB_HCD_DRIVERKEY_NAME {
327 
328 typedef struct _USB_DESCRIPTOR_REQUEST {
330  struct {
336  } SetupPacket;
339 
340 #if (_WIN32_WINNT >= 0x0501)
341 
342 typedef struct _USB_HUB_CAPABILITIES {
343  ULONG HubIs2xCapable:1;
344 } USB_HUB_CAPABILITIES, *PUSB_HUB_CAPABILITIES;
345 
346 typedef struct _USB_NODE_CONNECTION_ATTRIBUTES {
347  ULONG ConnectionIndex;
348  USB_CONNECTION_STATUS ConnectionStatus;
349  ULONG PortAttributes;
350 } USB_NODE_CONNECTION_ATTRIBUTES, *PUSB_NODE_CONNECTION_ATTRIBUTES;
351 
352 typedef struct _USB_NODE_CONNECTION_INFORMATION_EX {
353  ULONG ConnectionIndex;
355  UCHAR CurrentConfigurationValue;
356  UCHAR Speed;
357  BOOLEAN DeviceIsHub;
359  ULONG NumberOfOpenPipes;
360  USB_CONNECTION_STATUS ConnectionStatus;
361  USB_PIPE_INFO PipeList[ANYSIZE_ARRAY];
362 } USB_NODE_CONNECTION_INFORMATION_EX, *PUSB_NODE_CONNECTION_INFORMATION_EX;
363 
364 C_ASSERT(sizeof(USB_NODE_CONNECTION_INFORMATION_EX) == sizeof(USB_NODE_CONNECTION_INFORMATION));
365 
366 #endif
367 
368 #if (_WIN32_WINNT >= 0x0600)
369 
370 typedef union _USB_HUB_CAP_FLAGS {
371  ULONG ul;
372  struct {
373  ULONG HubIsHighSpeedCapable:1;
374  ULONG HubIsHighSpeed:1;
375  ULONG HubIsMultiTtCapable:1;
376  ULONG HubIsMultiTt:1;
377  ULONG HubIsRoot:1;
378  ULONG HubIsArmedWakeOnConnect:1;
379  ULONG HubIsBusPowered:1;
380  ULONG ReservedMBZ:25;
381  };
382 } USB_HUB_CAP_FLAGS, *PUSB_HUB_CAP_FLAGS;
383 
384 C_ASSERT(sizeof(USB_HUB_CAP_FLAGS) == sizeof(ULONG));
385 
386 typedef struct _USB_HUB_CAPABILITIES_EX {
387  USB_HUB_CAP_FLAGS CapabilityFlags;
388 } USB_HUB_CAPABILITIES_EX, *PUSB_HUB_CAPABILITIES_EX;
389 
390 typedef struct _USB_CYCLE_PORT_PARAMS {
391  ULONG ConnectionIndex;
392  ULONG StatusReturned;
393 } USB_CYCLE_PORT_PARAMS, *PUSB_CYCLE_PORT_PARAMS;
394 
395 typedef struct _USB_ID_STRING {
396  USHORT LanguageId;
397  USHORT Pad;
398  ULONG LengthInBytes;
399  PWCHAR Buffer;
400 } USB_ID_STRING, *PUSB_ID_STRING;
401 
402 typedef struct _USB_HUB_DEVICE_UXD_SETTINGS {
403  ULONG Version;
404  GUID PnpGuid;
405  GUID OwnerGuid;
406  ULONG DeleteOnShutdown;
407  ULONG DeleteOnReload;
408  ULONG DeleteOnDisconnect;
409  ULONG Reserved[5];
410 } USB_HUB_DEVICE_UXD_SETTINGS, *PUSB_HUB_DEVICE_UXD_SETTINGS;
411 
412 typedef struct _HUB_DEVICE_CONFIG_INFO_V1 {
413  ULONG Version;
414  ULONG Length;
415  USB_HUB_CAP_FLAGS HubFlags;
416  USB_ID_STRING HardwareIds;
417  USB_ID_STRING CompatibleIds;
418  USB_ID_STRING DeviceDescription;
419  ULONG Reserved[19];
420  USB_HUB_DEVICE_UXD_SETTINGS UxdSettings;
421 } HUB_DEVICE_CONFIG_INFO, *PHUB_DEVICE_CONFIG_INFO;
422 
423 #endif
424 
425 typedef struct _HCD_ISO_STAT_COUNTERS {
447 
448 typedef struct _HCD_STAT_COUNTERS {
461 
462 typedef struct _HCD_STAT_INFORMATION_1 {
469 
470 typedef struct _HCD_STAT_INFORMATION_2 {
479 
480 #define WMI_USB_DRIVER_INFORMATION 0
481 #define WMI_USB_DRIVER_NOTIFICATION 1
482 #define WMI_USB_POWER_DEVICE_ENABLE 2
483 #define WMI_USB_HUB_NODE_INFORMATION 4
484 
485 #define WMI_USB_PERFORMANCE_INFORMATION 1
486 #define WMI_USB_DEVICE_NODE_INFORMATION 2
487 
488 #if (_WIN32_WINNT >= 0x0501)
489 
490 typedef enum _USB_NOTIFICATION_TYPE {
491  EnumerationFailure = 0,
494  OverCurrent,
501  HubNestedTooDeeply,
502  ModernDeviceInLegacyHub
504 
505 #else
506 
519 
520 #endif
521 
522 typedef struct _USB_NOTIFICATION {
525 
534 
535 typedef struct _USB_BUS_NOTIFICATION {
541 
542 typedef struct _USB_ACQUIRE_INFO {
547 
548 #if (_WIN32_WINNT >= 0x0600)
549 
550 #define USB_NODE_INFO_SIG 'USBN'
551 
552 typedef enum _USB_WMI_DEVICE_NODE_TYPE {
553  UsbDevice,
554  HubDevice,
555  CompositeDevice,
556  UsbController
557 } USB_WMI_DEVICE_NODE_TYPE, *PUSB_WMI_DEVICE_NODE_TYPE;
558 
559 typedef struct _USB_DEVICE_STATE {
561  ULONG DeviceStarted:1;
562 } USB_DEVICE_STATE, *PUSB_DEVICE_STATE;
563 
564 typedef struct _USB_HUB_PORT_INFORMATION {
565  USB_DEVICE_STATE DeviceState;
568  ULONG ConnectionIndex;
569  USB_CONNECTION_STATUS ConnectionStatus;
570 } USB_HUB_PORT_INFORMATION, *PUSB_HUB_PORT_INFORMATION;
571 
572 typedef struct _USB_HUB_DEVICE_INFO {
573  USB_HUB_DESCRIPTOR HubDescriptor;
574  ULONG HubNumber;
576  BOOLEAN HubIsSelfPowered;
577  BOOLEAN HubIsRootHub;
578  USB_HUB_CAPABILITIES HubCapabilities;
579  ULONG NumberOfHubPorts;
580  USB_HUB_PORT_INFORMATION PortInfo[ANYSIZE_ARRAY];
581 } USB_HUB_DEVICE_INFO, *PUSB_HUB_DEVICE_INFO;
582 
583 typedef struct _USB_COMPOSITE_FUNCTION_INFO {
584  UCHAR FunctionNumber;
585  UCHAR BaseInterfaceNumber;
586  UCHAR NumberOfInterfaces;
587  BOOLEAN FunctionIsIdle;
588 } USB_COMPOSITE_FUNCTION_INFO, *PUSB_COMPOSITE_FUNCTION_INFO;
589 
590 typedef struct _USB_COMPOSITE_DEVICE_INFO {
592  USB_CONFIGURATION_DESCRIPTOR CurrentConfigDescriptor;
593  UCHAR CurrentConfigurationValue;
594  UCHAR NumberOfFunctions;
595  USB_COMPOSITE_FUNCTION_INFO FunctionInfo[ANYSIZE_ARRAY];
596 } USB_COMPOSITE_DEVICE_INFO, *PUSB_COMPOSITE_DEVICE_INFO;
597 
598 typedef struct _USB_CONTROLLER_DEVICE_INFO {
599  ULONG PciVendorId;
600  ULONG PciDeviceId;
601  ULONG PciRevision;
602  ULONG NumberOfRootPorts;
603  ULONG HcFeatureFlags;
604 } USB_CONTROLLER_DEVICE_INFO, *PUSB_CONTROLLER_DEVICE_INFO;
605 
606 typedef struct _USB_DEVICE_INFO {
607  USB_DEVICE_STATE DeviceState;
610  UCHAR CurrentConfigurationValue;
611  USB_DEVICE_SPEED Speed;
613  ULONG ConnectionIndex;
614  USB_CONNECTION_STATUS ConnectionStatus;
615  WCHAR PnpHardwareId[128];
616  WCHAR PnpCompatibleId[128];
617  WCHAR SerialNumberId[128];
618  WCHAR PnpDeviceDescription[128];
619  ULONG NumberOfOpenPipes;
620  USB_PIPE_INFO PipeList[ANYSIZE_ARRAY];
621 } USB_DEVICE_INFO, *PUSB_DEVICE_INFO;
622 
623 typedef struct _USB_DEVICE_NODE_INFO {
624  ULONG Sig;
625  ULONG LengthInBytes;
627  USB_WMI_DEVICE_NODE_TYPE NodeType;
628  USB_TOPOLOGY_ADDRESS BusAddress;
629  union{
630  USB_DEVICE_INFO UsbDeviceInfo;
631  USB_HUB_DEVICE_INFO HubDeviceInfo;
632  USB_COMPOSITE_DEVICE_INFO CompositeDeviceInfo;
633  USB_CONTROLLER_DEVICE_INFO ControllerDeviceInfo;
634  UCHAR DeviceInformation[4];
635  };
636 } USB_DEVICE_NODE_INFO, *PUSB_DEVICE_NODE_INFO;
637 
638 typedef struct _USB_DEVICE_PERFORMANCE_INFO {
639  ULONG BulkBytes;
640  ULONG ControlDataBytes;
641  ULONG IsoBytes;
642  ULONG InterruptBytes;
643  ULONG BulkUrbCount;
644  ULONG ControlUrbCount;
645  ULONG IsoUrbCount;
646  ULONG InterruptUrbCount;
647  ULONG AllocedInterrupt[6];
648  ULONG AllocedIso;
649  ULONG Total32secBandwidth;
650  ULONG TotalTtBandwidth;
653  ULONG TotalIsoLatency;
654  ULONG DroppedIsoPackets;
655  ULONG TransferErrors;
656  ULONG PciInterruptCount;
657  ULONG HcIdleState;
658  ULONG HcAsyncIdleState;
659  ULONG HcAsyncCacheFlushCount;
660  ULONG HcPeriodicIdleState;
661  ULONG HcPeriodicCacheFlushCount;
662 } USB_DEVICE_PERFORMANCE_INFO, *PUSB_DEVICE_PERFORMANCE_INFO;
663 
664 #endif
665 
666 #include <poppack.h>
667 
668 #endif /* USB_KERNEL_IOCTL */
669 
670 #ifdef __cplusplus
671 }
672 #endif
struct _HCD_STAT_INFORMATION_2 HCD_STAT_INFORMATION_2
USB_MI_PARENT_INFORMATION MiParentInformation
Definition: usbioctl.h:236
char * Pad(char *Str, char PadChar, ULONG Length)
Definition: main.cxx:29
WCHAR DriverKeyName[ANYSIZE_ARRAY]
Definition: usbioctl.h:304
struct _USB_NODE_CONNECTION_INFORMATION * PUSB_NODE_CONNECTION_INFORMATION
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
Definition: iofuncs.h:2268
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
struct _HCD_STAT_INFORMATION_2 * PHCD_STAT_INFORMATION_2
USHORT PortDisableCount
Definition: usbioctl.h:459
USB_NOTIFICATION_TYPE NotificationType
Definition: usbioctl.h:543
USHORT ScheduleOverrunCount
Definition: usbioctl.h:453
_USB_CONNECTION_STATUS
Definition: usbioctl.h:277
struct _USB_HUB_NAME USB_HUB_NAME
#define ANYSIZE_ARRAY
Definition: typedefs.h:45
struct _USB_NODE_INFORMATION * PUSB_NODE_INFORMATION
struct _HCD_STAT_INFORMATION_1 * PHCD_STAT_INFORMATION_1
USHORT BufferOverrunErrorCount
Definition: usbioctl.h:456
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN HubIsBusPowered
Definition: usbioctl.h:225
_USB_HUB_NODE
Definition: usbioctl.h:218
_USB_NOTIFICATION_TYPE
Definition: usbioctl.h:507
CPPORT PortInfo
Definition: kdinit.c:20
USHORT IsoPacketNotAccesed
Definition: usbioctl.h:434
USHORT LargestUrbPacketCount
Definition: usbioctl.h:437
uint16_t * PWCHAR
Definition: typedefs.h:54
HCD_STAT_COUNTERS Counters
Definition: usbioctl.h:476
struct _USB_NODE_CONNECTION_DRIVERKEY_NAME USB_NODE_CONNECTION_DRIVERKEY_NAME
enum _USB_HUB_NODE USB_HUB_NODE
USB_HUB_DESCRIPTOR HubDescriptor
Definition: usbioctl.h:224
struct _USB_DESCRIPTOR_REQUEST USB_DESCRIPTOR_REQUEST
USB_PIPE_INFO PipeList[ANYSIZE_ARRAY]
Definition: usbioctl.h:298
ULONG ScheduleOffset
Definition: usbioctl.h:242
enum _USB_NOTIFICATION_TYPE USB_NOTIFICATION_TYPE
struct _USB_HUB_INFORMATION USB_HUB_INFORMATION
DRIVER_DATA DriverData
Definition: Interface.c:396
struct _USB_DESCRIPTOR_REQUEST::@3159 SetupPacket
struct _USB_ROOT_HUB_NAME USB_ROOT_HUB_NAME
_In_ PUSB_DEVICE_HANDLE _Out_ PUSHORT DeviceAddress
Definition: hubbusif.h:359
struct _USB_NODE_CONNECTION_DRIVERKEY_NAME * PUSB_NODE_CONNECTION_DRIVERKEY_NAME
long LONG
Definition: pedump.c:60
struct _USB_MI_PARENT_INFORMATION * PUSB_MI_PARENT_INFORMATION
USHORT InternalHcErrorCount
Definition: usbioctl.h:455
ULONG PortNumber
Definition: storport.c:18
ULONG ControllerNameLength
Definition: usbioctl.h:539
unsigned char BOOLEAN
WCHAR HubName[ANYSIZE_ARRAY]
Definition: usbioctl.h:315
USB_NOTIFICATION_TYPE NotificationType
Definition: usbioctl.h:527
USB_DEVICE_DESCRIPTOR DeviceDescriptor
Definition: usbioctl.h:291
struct _USB_MI_PARENT_INFORMATION USB_MI_PARENT_INFORMATION
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
Definition: bufpool.h:45
struct _USB_NODE_CONNECTION_NAME USB_NODE_CONNECTION_NAME
#define C_ASSERT(e)
Definition: intsafe.h:79
USHORT IsoMissedCount
Definition: usbioctl.h:450
struct _USB_ACQUIRE_INFO USB_ACQUIRE_INFO
NodeType
Definition: Node.h:5
Definition: bcd.h:202
struct _HCD_STAT_COUNTERS * PHCD_STAT_COUNTERS
enum _USB_DEVICE_SPEED USB_DEVICE_SPEED
struct _USB_HCD_DRIVERKEY_NAME USB_HCD_DRIVERKEY_NAME
struct _USB_HCD_DRIVERKEY_NAME * PUSB_HCD_DRIVERKEY_NAME
WCHAR NodeName[ANYSIZE_ARRAY]
Definition: usbioctl.h:310
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
const KSDEVICE_DESCRIPTOR DeviceDescriptor
Definition: splitter.c:257
USHORT StallPidCount
Definition: usbioctl.h:458
union _USB_NODE_INFORMATION::@3158 u
__wchar_t WCHAR
Definition: xmlstorage.h:180
HCD_STAT_COUNTERS Counters
Definition: usbioctl.h:467
USHORT DoubleBufferedPackets
Definition: usbioctl.h:427
WCHAR RootHubName[ANYSIZE_ARRAY]
Definition: usbioctl.h:320
struct _USB_NODE_CONNECTION_NAME * PUSB_NODE_CONNECTION_NAME
struct _USB_PIPE_INFO * PUSB_PIPE_INFO
USB_ENDPOINT_DESCRIPTOR EndpointDescriptor
Definition: usbioctl.h:241
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
struct _USB_PIPE_INFO USB_PIPE_INFO
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _USB_NODE_CONNECTION_INFORMATION USB_NODE_CONNECTION_INFORMATION
LONG USBD_STATUS
Definition: usb.h:165
ULONG ActualLength
Definition: usbioctl.h:314
WCHAR DriverKeyName[ANYSIZE_ARRAY]
Definition: usbioctl.h:325
USHORT MaxInterruptLatency
Definition: usbioctl.h:431
struct _USB_CONNECTION_NOTIFICATION USB_CONNECTION_NOTIFICATION
USHORT CrcErrorCount
Definition: usbioctl.h:452
struct _HCD_STAT_COUNTERS HCD_STAT_COUNTERS
struct _USB_CONNECTION_NOTIFICATION * PUSB_CONNECTION_NOTIFICATION
HCD_ISO_STAT_COUNTERS IsoCounters
Definition: usbioctl.h:477
struct _HCD_STAT_INFORMATION_1 HCD_STAT_INFORMATION_1
struct _USB_NOTIFICATION * PUSB_NOTIFICATION
unsigned short USHORT
Definition: pedump.c:61
struct _HCD_ISO_STAT_COUNTERS * PHCD_ISO_STAT_COUNTERS
enum _USB_CONNECTION_STATUS USB_CONNECTION_STATUS
enum _USB_CONNECTION_STATUS * PUSB_CONNECTION_STATUS
LARGE_INTEGER TimeRead
Definition: usbioctl.h:474
USB_HUB_INFORMATION HubInformation
Definition: usbioctl.h:235
USHORT SmallestUrbPacketCount
Definition: usbioctl.h:436
struct _USB_DESCRIPTOR_REQUEST * PUSB_DESCRIPTOR_REQUEST
ULONG BytesTransferred
Definition: usbioctl.h:449
struct _USB_BUS_NOTIFICATION * PUSB_BUS_NOTIFICATION
struct _USB_BUS_NOTIFICATION USB_BUS_NOTIFICATION
struct _USB_HUB_NAME * PUSB_HUB_NAME
unsigned int ULONG
Definition: retypes.h:1
struct _USB_NODE_INFORMATION USB_NODE_INFORMATION
USHORT SWErrorCount
Definition: usbioctl.h:457
USHORT TimeoutErrorCount
Definition: usbioctl.h:454
struct _USB_NOTIFICATION USB_NOTIFICATION
struct _HCD_ISO_STAT_COUNTERS HCD_ISO_STAT_COUNTERS
struct _USB_HUB_INFORMATION * PUSB_HUB_INFORMATION
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
LARGE_INTEGER TimeRead
Definition: usbioctl.h:466
USHORT DataOverrunErrorCount
Definition: usbioctl.h:451
struct _USB_ACQUIRE_INFO * PUSB_ACQUIRE_INFO
struct _USB_ROOT_HUB_NAME * PUSB_ROOT_HUB_NAME
_In_ PUSBD_PIPE_INFORMATION _In_ USB_DEVICE_SPEED DeviceSpeed
Definition: hubbusif.h:294
USB_CONNECTION_STATUS ConnectionStatus
Definition: usbioctl.h:297
USB_NOTIFICATION_TYPE NotificationType
Definition: usbioctl.h:536
USB_HUB_NODE NodeType
Definition: usbioctl.h:233
USB_NOTIFICATION_TYPE NotificationType
Definition: usbioctl.h:523