Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2007 11:10:26 +0100
From:      des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=)
To:        Daniel Rudy <dr2867@pacbell.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: sysctl(3) interface
Message-ID:  <86k5z3jylp.fsf@dwp.des.no>
In-Reply-To: <45BB72D6.9070809@pacbell.net> (Daniel Rudy's message of "Sat, 27 Jan 2007 07:42:14 -0800")
References:  <45BB72D6.9070809@pacbell.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 with 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

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86k5z3jylp.fsf>