Re: how to send SCSI Command?
- From: Nelson Lai <lai.nelson@xxxxxxxxx>
- Date: Sat, 29 Apr 2006 13:56:21 +0800
Hi ..
Here's the possible sample ...
You can visit http://www.t10.org/ website ...
typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS
{
SCSI_PASS_THROUGH spt;
ULONG Filler; // realign buffers to double word boundary
UCHAR ucSenseBuf[32];
UCHAR ucDataBuf[1024];
} SCSI_PASS_THROUGH_WITH_BUFFERS, *PSCSI_PASS_THROUGH_WITH_BUFFERS;
memset(&sptwb, 0,sizeof(SCSI_PASS_THROUGH_WITH_BUFFERS));
sptwb.spt.Length = sizeof(SCSI_PASS_THROUGH);
sptwb.spt.PathId = 0;
sptwb.spt.TargetId = 0;
sptwb.spt.Lun = 0;
sptwb.spt.CdbLength = CDB6GENERIC_LENGTH;
sptwb.spt.SenseInfoLength = 24;
sptwb.spt.DataIn = SCSI_IOCTL_DATA_IN;
sptwb.spt.DataTransferLength = 192;
sptwb.spt.TimeOutValue = 120;
sptwb.spt.DataBufferOffset =
offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS,ucDataBuf);
sptwb.spt.SenseInfoOffset =
offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS,ucSenseBuf);
sptwb.spt.Cdb[0] = 0xXX;
sptwb.spt.Cdb[1] = 0xXX;
sptwb.spt.Cdb[2] = 0xXX;
sptwb.spt.Cdb[3] = 0xXX;
dwLength = offsetof(SCSI_PASS_THROUGH_WITH_BUFFERS,ucDataBuf) +
sptwb.spt.DataTransferLength;
dwStatus = DeviceIoControl(g_hUsbDriver,
IOCTL_SCSI_PASS_THROUGH,
&sptwb,
sizeof(SCSI_PASS_THROUGH),
&sptwb,
dwLength,
&dwReturn,
FALSE);
securityforce@xxxxxxxxx 提到:
I'm developing a iSCSI Target Project..
I have finished the iSCSI Protocol Parse in UserMode as a Windows
Service.
in this project, we should provide a filedisk or a partition to client
read/write data.
now I should send the SCSI command to a volume at target host, in oder
to write/read the data.
but how to send SCSI comand to lower device.which device that I should
send SCSI Command to ?
thanks a lot of any suggestion or giving any reference。
- Follow-Ups:
- Re: how to send SCSI Command?
- From: securityforce
- Re: how to send SCSI Command?
- References:
- how to send SCSI Command?
- From: securityforce
- how to send SCSI Command?
- Prev by Date: Re: The WDM Video Capture Driver causes reboot problem with windows XP
- Next by Date: Re: how to send SCSI Command?
- Previous by thread: how to send SCSI Command?
- Next by thread: Re: how to send SCSI Command?
- Index(es):
Relevant Pages
|