Date: Mon, 7 Oct 2002 11:31:09 +0200 From: "Ido Barnea" <ido@cwnt.com> To: "soheil hassas yeganeh" <soheil_h_y@hotmail.com>, <freebsd-net@FreeBSD.ORG> Subject: RE: Var. s accessible by sysctl Message-ID: <C7DF4400240AFB4095D98C7C6EC2A34A083373@bart.cwnt.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C7DF4400240AFB4095D98C7C6EC2A34A083373>