CAM SCSI, finding out bus ID, target and LUN

Reinhold Huber rhuber at
Tue Aug 2 14:32:07 GMT 2005


I'm trying to get bus ID, target and LUN to an open fd which is afaik
opened to the device special file, e.g. /dev/cd0 .

So how do I get the information? Up to now, I didn't find IOCTL calls
(like in NetBSD) which deliver this kind of info, and first tries to
browse in CAM examples didn't help either.

I tried on FreeBSD 5.3 and currently hope that there are no big
changes to this between 5.3 and 5.4 or even -current. If I'm
wrong with this, please correct me.

Any pointer to docs or source is welcome.

Best regards,
Reinhold Huber

More information about the freebsd-questions mailing list