From owner-freebsd-hackers Tue May 23 13:43:39 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA13895 for hackers-outgoing; Tue, 23 May 1995 13:43:39 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id NAA13883 for ; Tue, 23 May 1995 13:43:36 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA26319; Tue, 23 May 95 14:34:17 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9505232034.AA26319@cs.weber.edu> Subject: Re: sysctl(3) in kernel modules. To: charnier@lirmm.fr (Philippe Charnier) Date: Tue, 23 May 95 14:34:16 MDT Cc: adhir@iagi.net, hackers@FreeBSD.org In-Reply-To: <199505230716.JAA02226@lirmm.lirmm.fr> from "Philippe Charnier" at May 23, 95 09:16:01 am X-Mailer: ELM [version 2.4dev PL52] Sender: hackers-owner@FreeBSD.org Precedence: bulk > The modload program should receive the string as an option, and write > it to the module by filling an area in the data segment of the kernel > module. > > By the way, I really don't know how to do such a thing. Neither do I, and I wrote the original modload code. Seriously, that's not the way to do it. Either the server code needs to access the information from within the kernel itself, or it needs to export an interface (or usurp an existing interface) to blow the data across the user/kernel boundry after the load has completed. Typically, the load process does not involve the link, and only understands a.out format sufficiently to get the single entrypoint (usually the init routine) and tell the kernel about it for internal list maintenance, or for manual maintenance (in the case of generic modules). My personal opinion is that there should be a kernel interface to the sysctl registry both for accessing contents from kernel modules and for registering management objects for control by sysctl. If done, the result would be that the module could either access the data itself or export a management point so that a user program could inform it via sysctl. Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.