summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbutil/ipodpatcher/ipodio-win32-scsi.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/rbutil/ipodpatcher/ipodio-win32-scsi.c b/rbutil/ipodpatcher/ipodio-win32-scsi.c
index 7e338acbc0..16460cfba3 100644
--- a/rbutil/ipodpatcher/ipodio-win32-scsi.c
+++ b/rbutil/ipodpatcher/ipodio-win32-scsi.c
@@ -53,10 +53,33 @@
#include <windows.h>
#include <stddef.h>
#include <stdio.h>
-#include <ddk/ntddscsi.h>
#include "ipodio.h"
+/* from ddk/ntddscsi.h */
+#define SCSI_IOCTL_DATA_OUT 0
+#define SCSI_IOCTL_DATA_IN 1
+#define SCSI_IOCTL_DATA_UNSPECIFIED 2
+
+#define IOCTL_SCSI_PASS_THROUGH \
+ CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
+
+typedef struct _SCSI_PASS_THROUGH {
+ USHORT Length;
+ UCHAR ScsiStatus;
+ UCHAR PathId;
+ UCHAR TargetId;
+ UCHAR Lun;
+ UCHAR CdbLength;
+ UCHAR SenseInfoLength;
+ UCHAR DataIn;
+ ULONG DataTransferLength;
+ ULONG TimeOutValue;
+ ULONG_PTR DataBufferOffset;
+ ULONG SenseInfoOffset;
+ UCHAR Cdb[16];
+} SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH;
+
typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS {
SCSI_PASS_THROUGH Spt;
ULONG Filler; /* realign buffers to double word boundary */