From owner-freebsd-net Mon Oct 7 2:31:13 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C8ED37B401 for ; Mon, 7 Oct 2002 02:31:12 -0700 (PDT) Received: from smtp.cwnt.com (smtp.cwnt.com [192.116.246.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46D5F43E65 for ; Mon, 7 Oct 2002 02:31:11 -0700 (PDT) (envelope-from ido@cwnt.com) X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Var. s accessible by sysctl Date: Mon, 7 Oct 2002 11:31:09 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Var. s accessible by sysctl Thread-Index: AcJt4I62VXhXI+4RRWyZgpfTWlORIQAAyiMA From: "Ido Barnea" To: "soheil hassas yeganeh" , Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Do something like this: static int my_variable =3D 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, my_sysctl_name, CTLFLAG_RW, &my_variable, 0, "Description of my variable"); Now you can access my_variable in kernel code, and configure it using: sysctl -w net.inet.ip.my_sysctl_name =3D new_value look in sys/netinet/ip_input.c for more details > -----Original Message----- > From: soheil hassas yeganeh [mailto:soheil_h_y@hotmail.com] > Sent: Monday, October 07, 2002 11:04 AM > To: freebsd-net@FreeBSD.ORG > Subject: Var. s accessible by sysctl >=20 >=20 >=20 >=20 > Hi list > How can i create a variable in kernel source codes ( for=20 > network layer - ip)=20 > that i can access it by sysctl command like other variables. > Thanx > S.h.y >=20 > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos:=20 > http://photos.msn.com/support/worldwide.aspx >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message >=20 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message