From owner-freebsd-arch Sat Sep 23 13:39:13 2000 Delivered-To: freebsd-arch@freebsd.org Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (Postfix) with ESMTP id 86C1E37B42C; Sat, 23 Sep 2000 13:39:11 -0700 (PDT) Received: (from smap@localhost) by whistle.com (8.10.0/8.10.0) id e8NKdBt07441; Sat, 23 Sep 2000 13:39:11 -0700 (PDT) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma007439; Sat, 23 Sep 2000 13:39:05 -0700 Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.3) id NAA06894; Sat, 23 Sep 2000 13:39:05 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200009232039.NAA06894@bubba.whistle.com> Subject: Re: sysctl MIB and kernel internals In-Reply-To: "from Robert Watson at Sep 15, 2000 12:26:56 pm" To: Robert Watson Date: Sat, 23 Sep 2000 13:39:05 -0700 (PDT) Cc: freebsd-arch@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Robert Watson writes: > I'd like to see us consider moving to an alternative model, divorcing the > implementation internals of various kernel objects (processes, et al) from > the MIB interface retrieving management data about them. I.e., struct > proc would continue to be used in kernel, but relevant fields would be > copied to struct export_proc for export via sysctl. In addition, it would > be worth prefixing these exported structures with a version number > allowing the caller to determine if they support an appropriate version of > the interface, allowing a more comprehensible error. Only fields > desirable to export would be in export_proc, so if an extra pointer is > added to struct ucred (recent resource control changes, capabilities), an > extra pointer to struct proc (jail), etc won't needless break userland > tools. One semi-remote possibility would be to use the netgraph/ng_parse.h library to convert all binary structures into ASCII form (and only the relevant fields). ng_parse is basically a C structure <-> ASCII translation library. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message