Hello,
I am trying to communicate with a tape drive using ioctl and SCSI_IOCTL_SEND_COMMAND as ioctl(fd, SCSI_IOCTL_SEND_COMMAND, buffer);
I read that the buffer should be of the form :
There may be commands only read data from the device and dont write or vice versa. Also some commands may read and write data. To what value can I set outlen so that it will cover all the 3 conditons?Code:struct sdata { unsigned int inlen; [i] Length of data written to device unsigned int outlen; [i] Length of data read from device unsigned char cmd[x]; [i] SCSI command (6 <= x <= 16) [o] Data read from device starts here [o] On error, sense buffer starts here unsigned char wdata[y]; [i] Data written to device starts here };
Thanks



LinkBack URL
About LinkBacks


