SCSI Commands using the Linux SCSI Generic (sg3) driver
The Linux sg driver interface allows userspace to craft and send SCSI commands to SCSI devices present on the system.
More information can be found here.
Currently, this library does not expose the full capabilities of the interface, but just handles a few commands that were immediately of interest to the author -- calling and parsing various types of INQUIRY. If other capabilities are desired, it should be possible to add support beyond this with relative ease.