Date: Thu, 01 Feb 2007 11:41:21 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: des@des.no Cc: freebsd-hackers@freebsd.org, dr2867@pacbell.net Subject: Re: sysctl(3) interface Message-ID: <20070201.114121.110116525.imp@bsdimp.com> In-Reply-To: <86k5z3jylp.fsf@dwp.des.no> References: <45BB72D6.9070809@pacbell.net> <86k5z3jylp.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <86k5z3jylp.fsf@dwp.des.no> des@des.no (Dag-Erling Sm=F8rgrav) writes: : Daniel Rudy <dr2867@pacbell.net> writes: : > I've been taking apart and analyzing the sysctl(8) program to gain = a : > better insight into how to use the sysctl(3) interface. [...] : > It's using an oid of 0 and 2 to get something, then it comes up wit= h 440 : > and then a sequence of numbers that are incrementing in a peculiar : > pattern. : = : sysctl(8) uses undocumented interfaces to a) enumerate the nodes in : the sysctl tree and b) obtain the name of a node, given its OID. : = : > So, my question is, how do I walk the tree to get the PnP info for = all : > the devices in the system? : = : man 3 devinfo devinfo -v will also give that information. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070201.114121.110116525.imp>