Igor Kovalenko wrote:
Is there any equivalment on NTO. Would I be stuck sending
raw SCSI command? How would I go about doing this? What
if the device is on IDE?
I had thoughts about that too Mario > 
The Unix equivalent of ASPI is CAM (Common Access Methods). If it is
supported by OS, it will have /dev/cam or such, which would allow you to at
least target raw SCSI commands properly. RTP currently has libcam.so but
support of CAM is very rudimentary, there is no /dev/cam and no API.
Whilst a “/dev/cam” entry would be nice for targetting commands to a
specific path/target/lun on a complicated system, on most setups you
can use the devctl re-direction feature of the VFS layer to target the
disk driver using entries that already exist in the pathname space.
You can issue a DCMD_CAM_PASS_THRU devctl() to “/dev/hd0” or
“/dev/cd0” or in fact any regular file on top of the desired device,
and it will filter down to the disk driver layer for processing.
The trick is in knowing how to build the request/SCSI CDB and in being
very, very, VERY careful, since you can cause a lot of fatal problems
(and interfere with normal driver/filesystem operation) if you don’t
know
exactly what you’re doing when accessing the device at this low-level
(and accordingly you won’t receive any official/Kevin support
… !!
EIDE devices should be covered by CAM as well.
Yes, you can target these raw commands at devb-eide devices too
(where SCSI/EIDE/ATAPI command-sets overlap).