Subject: add new sysctl variable
To: None <tech-kern@netbsd.org>
From: susan steven <rs122@hotmail.com>
List: tech-kern
Date: 04/01/2002 10:13:18
  Hello. I worked on NetBSD 1.5.1(i386).I want to add a new sysctl variable 
net.inet.tcp.myvariable to control whether to invoke my function. I added 
entries for the new variables in tcp_var.h.
  (#define TCPCTL_NAMES {
                          ...
                          {"myvriable",CTL_TYPE_INT}
                           ...
                          }
   #define TCPCTL_VARIABLE {
                            ...
                            {1,0,&tcp_mynewvariable}
                             ...
                            }

   #define TCPCTL_MYNEWVARABLE 25
   #define TCPCTL_MAXID        26 /*old value 25*/
   extern int tcp_mynewvariavle;

I defined the new variable tcp_mynewvariable in tcp_subr.c. Then I 
recompiled the
kernel. After that I check out the /usr/basrsrc/sbin/sysctl using cvs and 
recompile the sysctl.c in that directory. After I rebooted the machine, I 
did not see any change. It seems that the new variable isn't existent.
  when I repeat the steps above to change old sysctl variable' name, I can 
still use the old variable with the new kernel. it seems that the change 
does not take effect?
  Could anyone to tell me what else I need to do to make the new variable 
work? Do I need to recompile the whole library(c library)? How to do that?

  Thank you very much in advance.

Mary




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx