From owner-freebsd-hackers Sat Aug 1 19:05:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA17762 for freebsd-hackers-outgoing; Sat, 1 Aug 1998 19:05:20 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from antipodes.cdrom.com (castles250.castles.com [208.214.165.250]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA17745 for ; Sat, 1 Aug 1998 19:05:07 -0700 (PDT) (envelope-from mike@antipodes.cdrom.com) Received: from antipodes.cdrom.com (localhost [127.0.0.1]) by antipodes.cdrom.com (8.8.8/8.8.5) with ESMTP id TAA05424; Sat, 1 Aug 1998 19:03:59 -0700 (PDT) Message-Id: <199808020203.TAA05424@antipodes.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Jacques Vidrine cc: hackers@FreeBSD.ORG Subject: Re: sysctl example In-reply-to: Your message of "Sat, 01 Aug 1998 20:13:10 CDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 01 Aug 1998 19:03:58 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > -----BEGIN PGP SIGNED MESSAGE----- > > Hi Folks, > > I'm looking for a good example of implementing a sysctl in > the kernel that returns a table or list of structs. > > If there's an elegant way to set such things, I'd like to > here about it, also. > > Thanks in advance! Is your table statically-sized, or does it vary in size at runtime? Do you want to return just the entire table, or optionally just one entry? Look for SYSCTL_NODE() declarations eg. in the networking code. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message