From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 24 12:06:13 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 58AC616A41F for ; Wed, 24 Aug 2005 12:06:13 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFF6243D48 for ; Wed, 24 Aug 2005 12:06:12 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: by zproxy.gmail.com with SMTP id z6so49559nzd for ; Wed, 24 Aug 2005 05:06:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=nGMjGFz4LcEB26LXUwUrjgXoyhApwnNr6scwuu2oB9lLaJhveSjiFV/9CbVfctY0/yp4jbelS0z1zNQH6cprj37XFS7dHaYM7nfcDdHMjCXE70nF/e/xQ/5Vjq6lnIHSF6wPSxAkJwazyd1htK8sv+GWwIiP0hlWvxT7Mg1LavY= Received: by 10.36.221.60 with SMTP id t60mr890524nzg; Wed, 24 Aug 2005 05:06:12 -0700 (PDT) Received: by 10.36.104.10 with HTTP; Wed, 24 Aug 2005 05:06:12 -0700 (PDT) Message-ID: <87ab37ab05082405065fb8252@mail.gmail.com> Date: Wed, 24 Aug 2005 20:06:12 +0800 From: kylin To: "freebsd-hackers@freebsd.org" Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Enumerating devices and hardware conf from userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2005 12:06:13 -0000 >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. do u just need the read function on the sysctl or do something from the deep end into kernel ? does http://www.magnicomp.com/cgi-bin/mcdownload.cgi really help? -- we who r about to die,salute u!