1 /*++ BUILD Version: 0001      // Increment this if a change has global effects
2
3 Copyright (c) Microsoft Corporation. All rights reserved.
4
5 Module Name:
6
7       ntddscsi.h
8
9 Abstract:
10
11       This is the include file that defines all constants and types for
12       accessing the SCSI port adapters.
13
14 --*/
15
16
17 //
18 // Interface GUIDs
19 //
20 // need these GUIDs outside conditional includes so that user can
21 //     #include <ntddscsi.h> in precompiled header
22 //     #include <initguid.h> in a single source file
23 //     #include <ntddscsi.h> in that source file a second time to instantiate the GUIDs
24 //
25 #ifdef DEFINE_GUID
26 //
27 // Make sure FAR is defined...
28 //
29 #ifndef FAR
30 #ifdef _WIN32
31 #define FAR
32 #else
33 #define FAR _far
34 #endif
35 #endif
36
37 DEFINE_GUID(ScsiRawInterfaceGuid, 0x53f56309L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
38 DEFINE_GUID(WmiScsiAddressGuid,     0x53f5630fL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
39 #endif
40
41 #ifndef _NTDDSCSIH_
42 #define _NTDDSCSIH_
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48 //
49 // Device Name - this string is the name of the device.  It is the name
50 // that should be passed to NtOpenFile when accessing the device.
51 //
52 // Note:  For devices that support multiple units, it should be suffixed
53 //             with the Ascii representation of the unit number.
54 //
55
56 #define IOCTL_SCSI_BASE                            FILE_DEVICE_CONTROLLER
57 #define FILE_DEVICE_SCSI                          0x0000001b
58
59 #define DD_SCSI_DEVICE_NAME "\\Device\\ScsiPort"
60
61
62 //
63 // NtDeviceIoControlFile IoControlCode values for this device.
64 //
65 // Warning:  Remember that the low two bits of the code specify how the
66 //                  buffers are passed to the driver!
67 //
68
69 #define IOCTL_SCSI_PASS_THROUGH               CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
70 #define IOCTL_SCSI_MINIPORT                     CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
71 #define IOCTL_SCSI_GET_INQUIRY_DATA        CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS)
72 #define IOCTL_SCSI_GET_CAPABILITIES        CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS)
73 #define IOCTL_SCSI_PASS_THROUGH_DIRECT  CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
74 #define IOCTL_SCSI_GET_ADDRESS                CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS)
75 #define IOCTL_SCSI_RESCAN_BUS                  CTL_CODE(IOCTL_SCSI_BASE, 0x0407, METHOD_BUFFERED, FILE_ANY_ACCESS)
76 #define IOCTL_SCSI_GET_DUMP_POINTERS      CTL_CODE(IOCTL_SCSI_BASE, 0x0408, METHOD_BUFFERED, FILE_ANY_ACCESS)
77 #define IOCTL_SCSI_FREE_DUMP_POINTERS     CTL_CODE(IOCTL_SCSI_BASE, 0x0409, METHOD_BUFFERED, FILE_ANY_ACCESS)
78 #define IOCTL_IDE_PASS_THROUGH                CTL_CODE(IOCTL_SCSI_BASE, 0x040a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
79 #define IOCTL_ATA_PASS_THROUGH                CTL_CODE(IOCTL_SCSI_BASE, 0x040b, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
80 #define IOCTL_ATA_PASS_THROUGH_DIRECT     CTL_CODE(IOCTL_SCSI_BASE, 0x040c, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
81 #define IOCTL_ATA_MINIPORT                       CTL_CODE(IOCTL_SCSI_BASE, 0x040d, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
82
83 //
Lines 84 ... 465 are skipped.
466 #endif
467       PVOID DeviceObject;
468 } DUMP_POINTERS, *PDUMP_POINTERS;
469
470 typedef struct _DUMP_POINTERS_EX {
471       DUMP_POINTERS_VERSION Header;
472       PVOID DumpData;
473       PVOID CommonBufferVa;
474       ULONG CommonBufferSize;
475       BOOLEAN AllocateCommonBuffers;
476       PVOID DeviceObject;
477       PVOID DriverList;
478 } DUMP_POINTERS_EX, *PDUMP_POINTERS_EX;
479
480 typedef struct _DUMP_DRIVER {
481
482       //
483       // Dump driver list from port driver
484       //
485       PVOID DumpDriverList;
486
487       //
488       // Name of the driver to be loaded
489       //
490       WCHAR DriverName[DUMP_DRIVER_NAME_LENGTH];
491
492       //
493       // Driver base name
494       //
495       WCHAR BaseName[DUMP_DRIVER_NAME_LENGTH];
496
497 } DUMP_DRIVER, *PDUMP_DRIVER;
498
499
500 //
501 // Define values for pass-through DataIn field.
502 //
503
504 #define SCSI_IOCTL_DATA_OUT                0
505 #define SCSI_IOCTL_DATA_IN                  1
506 #define SCSI_IOCTL_DATA_UNSPECIFIED  2
507
508 #ifdef __cplusplus
509 }
510 #endif
511
512 #endif
513
514