xref: /reactos/sdk/include/ddk/usbstorioctl.h (revision 84ccccab)
1 #pragma once
2 
3 #ifndef MAX_PATH
4 #define MAX_PATH 260
5 #endif
6 
7 typedef struct tagACT_AUTHZ_STATE {
8   UCHAR ACT;
9   BOOLEAN fAuthorized;
10 } ACT_AUTHZ_STATE, *PACT_AUTHZ_STATE;
11 
12 typedef struct tagSILO_COMMAND {
13   UCHAR SiloIndex;
14   UCHAR Command;
15   ULONG cbCommandBuffer;
16   UCHAR rgbCommandBuffer[ANYSIZE_ARRAY];
17 } SILO_COMMAND, *PSILO_COMMAND;
18 
19 typedef enum _PDO_TYPE {
20   PDO_TYPE_UNDEFINED = 0,
21   PDO_TYPE_DISK,
22   PDO_TYPE_CONTROL,
23   PDO_TYPE_SILO,
24   PDO_TYPE_THIS = 256
25 } PDO_TYPE;
26 
27 typedef enum _PDO_STATE {
28   PDO_STATE_UNDEFINED = 0,
29   PDO_STATE_STARTED,
30   PDO_STATE_NOT_STARTED
31 } PDO_STATE;
32 
33 typedef enum _PDO_CAPS {
34   PDO_CAPABILITY_UNDEFINED = 0,
35   PDO_CAPABILITY_INC512_SET = 1,
36   PDO_CAPABILITY_INC512_CLEAR = 2
37 } PDO_CAPS;
38 
39 typedef struct _ENUM_PDO_ENTRY {
40   UCHAR type;
41   UCHAR state;
42   UCHAR capabilities;
43   ULONG ulSTID;
44   UCHAR bSpecificationMajor;
45   UCHAR bSpecificationMinor;
46   UCHAR bImplementationMajor;
47   UCHAR bImplementationMinor;
48   WCHAR wszDeviceInstancePath[(2 * MAX_PATH) + 1];
49 } ENUM_PDO_ENTRY, *PENUM_PDO_ENTRY;
50 
51 typedef struct _ENUM_PDO_RESULTS {
52   ULONG cEntries;
53   ENUM_PDO_ENTRY rgEntries[ANYSIZE_ARRAY];
54 } ENUM_PDO_RESULTS, *PENUM_PDO_RESULTS;
55 
56 #define SIZE_ENUM_PDO_RESULTS_HEADER (sizeof(ENUM_PDO_RESULTS) - sizeof(ENUM_PDO_ENTRY))
57 
58 #define IOCTL_EHSTOR_DEVICE_SET_AUTHZ_STATE   CTL_CODE(IOCTL_STORAGE_BASE, 0x501, METHOD_BUFFERED, FILE_ANY_ACCESS)
59 #define IOCTL_EHSTOR_DEVICE_GET_AUTHZ_STATE   CTL_CODE(IOCTL_STORAGE_BASE, 0x502, METHOD_BUFFERED, FILE_ANY_ACCESS)
60 #define IOCTL_EHSTOR_DEVICE_SILO_COMMAND      CTL_CODE(IOCTL_STORAGE_BASE, 0x503, METHOD_BUFFERED, FILE_ANY_ACCESS)
61 #define IOCTL_EHSTOR_DEVICE_ENUMERATE_PDOS    CTL_CODE(IOCTL_STORAGE_BASE, 0x504, METHOD_BUFFERED, FILE_ANY_ACCESS)
62 
63 DEFINE_GUID(GUID_USBSTOR_EHSTOR_SILO_INTERFACE, 0x7c2bcf57, 0x2bea, 0x46da, 0xad, 0x26, 0x78, 0xfd, 0xc8, 0x3c, 0xee, 0x46);
64 DEFINE_GUID(GUID_USBSTOR_EHSTOR_CONTROL_INTERFACE, 0x4f40006f, 0xb933, 0x4550, 0xb5, 0x32, 0x2b, 0x58, 0xce, 0xe6, 0x14, 0xd3);
65