From owner-freebsd-current@FreeBSD.ORG Sat Oct 13 00:28:58 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0487716A419 for ; Sat, 13 Oct 2007 00:28:58 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mx1.freebsd.org (Postfix) with ESMTP id 9CB3A13C459 for ; Sat, 13 Oct 2007 00:28:56 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id l9D0StRh009051; Sat, 13 Oct 2007 10:28:55 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id l9D0St4N009050; Sat, 13 Oct 2007 10:28:55 +1000 (EST) (envelope-from peter) Date: Sat, 13 Oct 2007 10:28:55 +1000 From: Peter Jeremy To: Jack Vogel Message-ID: <20071013002855.GD93545@turion.vk2pj.dyndns.org> References: <2a41acea0710121611n4bb8d00egc104118cf7711537@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" Content-Disposition: inline In-Reply-To: <2a41acea0710121611n4bb8d00egc104118cf7711537@mail.gmail.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.16 (2007-06-09) Cc: FreeBSD Current Subject: Re: examples of programmatic use of sysctl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Oct 2007 00:28:58 -0000 --gatW/ieO32f1wygP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-Oct-12 16:11:12 -0700, Jack Vogel wrote: >In my PTP/IEEE 1588 implementation I was considering using sysctl >to pass data in and out of the driver and it needs to be from some app >program not interactive. > >I was just wondering if anyone can point me at anything besides the >sysctl command that is doing this? If you mean exchanging data in general between userland and kernel then rummaging though the source looking for sysctlbyname() (or sysctl() or sysctlnametomib()) will turn up lots of hits. Without knowing exactly what you are trying to achieve, I can't be absolutely certain but potentially interesting places to look would be conscontrol(8), dumpon(8), ipcs(1) etc. Note that most of the *stat commands, as well as ps, use sysctl rather than grovelling around in /dev/kmem. --=20 Peter Jeremy --gatW/ieO32f1wygP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHEBFH/opHv/APuIcRAq0EAJ411gISBnPttpkvbx+Uca3fMgLf+wCeNUS/ ggCc8GZGBfdTV1nfUnPMn4k= =BJfC -----END PGP SIGNATURE----- --gatW/ieO32f1wygP--