From owner-freebsd-net Wed Mar 28 5:38:36 2001 Delivered-To: freebsd-net@freebsd.org Received: from filk.iinet.net.au (syncopation-dns.iinet.net.au [203.59.24.29]) by hub.freebsd.org (Postfix) with SMTP id AF2A337B71F for ; Wed, 28 Mar 2001 05:38:28 -0800 (PST) (envelope-from julian@elischer.org) Received: (qmail 10218 invoked by uid 666); 28 Mar 2001 13:40:16 -0000 Received: from i079-231.nv.iinet.net.au (HELO elischer.org) (203.59.79.231) by mail.m.iinet.net.au with SMTP; 28 Mar 2001 13:40:16 -0000 Message-ID: <3AC1E949.C9410FE@elischer.org> Date: Wed, 28 Mar 2001 05:38:17 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: s2209866@cse.unsw.edu.au Cc: FreeBSD , freebsd-net@freeBSD.ORG Subject: Re: What do I have to change to add a sysctl ? References: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Daniel Wong wrote: > > Hi All, > > I want to add a sysctl to the net.inet.ip what do I have to change ?? That depends upon what you are doing... if you have your own module, you can add line of the form: #include myinteger = 0; SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, Mycutename, CTLFLAG_RW, &myinterger, 0, "Description of my cute new feature"); There are many alternative variations depending upon whether you want some code to be run when you set a new value, or whether you want to set a string, an integer or a char (etc.). If you just want to instrument existing code, then add the above lines into existing files :-) > > Thanks > Dan > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message