Do something like this:
static int      my_variable = 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 = new_value

look in sys/netinet/ip_input.c for more details
> -----Original Message-----
> From: soheil hassas yeganeh [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 11:04 AM
> To: [EMAIL PROTECTED]
> Subject: Var. s accessible by sysctl
> 
> 
> 
> 
> Hi list
> How can i create a variable in kernel source codes ( for 
> network layer - ip) 
> that i can access it by sysctl command like other variables.
> Thanx
> S.h.y
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-net" in the body of the message
> 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to