How to get LUN id of SCSI connected devices

Hi all I needed some help in getting the LUN id of all devices connected to the system especially for SCSI devices. I'm not able to find any such system command or a SCSI command. Thanks in advance.

Are you trying to do this in code? Or from the command line? Or from the GUI?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

uint16_t scsi_id = (uint16_t)parallelTask.fTargetID;/*uint64_t */
uint16_t scsi_lun = (uint16_t)parallelTask.fLogicalUnitBytes[1];/*uint8_t */
How to get LUN id of SCSI connected devices
 
 
Q