From owner-freebsd-questions@FreeBSD.ORG Tue Aug 2 14:32:07 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75EAE16A41F for ; Tue, 2 Aug 2005 14:32:07 +0000 (GMT) (envelope-from rhuber@fs.tum.de) Received: from atlas.fs.tum.de (atlas.fs.tum.de [129.187.202.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 226A943D46 for ; Tue, 2 Aug 2005 14:32:04 +0000 (GMT) (envelope-from rhuber@fs.tum.de) Received: from valhalla.fs.tum.de (valhalla.fs.tum.de [129.187.202.5]) by atlas.fs.tum.de (FachschaftsNachrichtenDienst) with SMTP id EED8213B525 for ; Tue, 2 Aug 2005 16:32:00 +0200 (CEST) Received: by valhalla.fs.tum.de (sSMTP sendmail emulation); Tue, 2 Aug 2005 16:32:00 +0200 From: "Reinhold Huber" Date: Tue, 2 Aug 2005 16:32:00 +0200 To: freebsd-questions@freebsd.org Message-ID: <20050802143200.GA24341@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: CAM SCSI, finding out bus ID, target and LUN X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2005 14:32:07 -0000 Hello, 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