From owner-freebsd-hackers@FreeBSD.ORG Sun May 2 16:27:15 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6245D16A4CE for ; Sun, 2 May 2004 16:27:15 -0700 (PDT) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49BE643D1D for ; Sun, 2 May 2004 16:27:15 -0700 (PDT) (envelope-from befree_fr@mac.com) Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id i42NREeg028502 for ; Sun, 2 May 2004 16:27:14 -0700 (PDT) Received: from [192.168.1.10] (anantes-105-1-1-27.w81-250.abo.wanadoo.fr [81.250.3.27]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 3.0) with ESMTP id i42NRD3Z012957 for ; Sun, 2 May 2004 16:27:13 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v613) Content-Transfer-Encoding: 7bit Message-Id: <3D7AE33C-9C90-11D8-AB12-000A95AFBEFA@mac.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: Hackers FreeBSD From: Thierry DELHAISE Date: Mon, 3 May 2004 01:27:12 +0200 X-Mailer: Apple Mail (2.613) Subject: Enumerating devices and hardware conf from userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2004 23:27:15 -0000 Hi all, Sorry first if my question seems stupid : I'm new in the FreeBSD Kernel design and so don't know all interfaces of the kernel in user land. I'm developping a tool running in userland (root) (a command line tools) for enumerating all devices present on the machine : This tool must scan all hardware buses : pci, but usb, firewire, ide, etc.... and retreive devices states : configure, not configured, handle by a driver, not handle by a driver, witch modules is the driver. And I want to have all devices present inside a machine. In some recent Kernel, there is a way from userland, to take a handle from the root hardware tree, enumeratiing first buses, and under buses, witch device are connect to those buses. This is is what I am looking for. How to do this under FreeBSD ? THX in advance for your help, advice, comment. Thierry