Date: Sat, 21 Aug 2004 22:29:41 +0200 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Alfred Perlstein <alfred@freebsd.org> Cc: hackers@freebsd.org Subject: Re: sysctl hacks Message-ID: <46719.1093120181@critter.freebsd.dk> In-Reply-To: Your message of "Sat, 21 Aug 2004 13:02:05 PDT." <20040821200205.GE26612@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20040821200205.GE26612@elvis.mu.org>, Alfred Perlstein writes:
>I'm doing some work that requires that I have a sysctl structure
>be passed around, but inside that structure are several pointers I
>may need to dereference.
>
>Basically:
>
>struct mysysctldata {
> .... (data here)
> void *moredata;
> size_t morelen;
>};
>
>What is the proper way of sysctl'ing IN the data from moredata?
>
>I need to make a copy of the sysctl req, but... I'm not sure what
>to initialize the 'lock' member to.
Just use the SYSCTL_IN() and ..._OUT() functions.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46719.1093120181>
