TalAloni / iSCSIConsole

User-Mode iSCSI Target Server
GNU Lesser General Public License v3.0
195 stars 57 forks source link

Add support for Windows SPTI #2

Closed ab932 closed 7 years ago

ab932 commented 7 years ago

Hi Tal,

I've added SCSI Pass Through Interface (SPTI) support to iSCSI Console to access a remote tape device from my development VM. I need some help with ISCSIConsole/MainForm.cs. I didn't know exactly how to pass the OnLogEntry event to the SPTITarget class... I'm no expert in C#!

Looking forward to any comments! Alex

TalAloni commented 7 years ago

Hi Alex, That's very interesting, I actually have a SCSI HBA that I was hoping to team with iSCSI Console one day.

  1. Regarding OnLogEntry , You can use "if (target is VirtualSCSITarget)" to check the type.
  2. It's not clear to me why the SPTIDisk class is needed.
  3. In ExecuteCommand, I'm seeing that your are accessing "ExpectedDataTransferLength" of the iSCSI PDU. that's a shortcut that you shouldn't take. The SCSI layer should execute SCSI commands, and should only utilize information given in that command. ExpectedDataTransferLength is part of the higher-level iSCSI layer, and your "optimization" violates the iSCSI design and (I think) may even return incorrect results in some cases.

Feel free to contact me by email ( tal.aloni.il@gmail.com ) and let me know how I can help completing the implementation. It would be great to have physical disk support as well. Tal

TalAloni commented 7 years ago

Regarding the UI: Don't you think it makes more sense to add an "Add SPTI Target" button to the main form? (This also makes the SPTIDevice class unnecessary).

ab932 commented 7 years ago

1) Ok, will do. 2) I'm not sure if SPTIDisk is needed anymore, good catch. 3) I've got to read through it again but maybe I don't need to use the iSCSI PDU directly.

In regards to the UI, I see your point... I'll try it out. Might take me a few days to put up another commit.

Thanks! Alex

TalAloni commented 7 years ago

Hi Alex,

Let me know if I can help in any way. Can't wait to test on my HBA.

TalAloni commented 7 years ago

Please send me an email to we can collaborate more closely on this.

ab932 commented 7 years ago

Hey Tal,

I'm offline for the weekend but totally will follow up on Monday.

Alex

On Mar 17, 2017 3:15 PM, "TalAloni" notifications@github.com wrote:

Please send me an email to we can collaborate more closely on this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TalAloni/iSCSIConsole/pull/2#issuecomment-287446995, or mute the thread https://github.com/notifications/unsubscribe-auth/AZJbT_XfJSsXT2hbgYFKA0Q9tmy26314ks5rmtvggaJpZM4MepuC .