> Currently I am going through netstat and  
> rewriting some of the functions to rely on sysctl rather than kvm.  
> The hope is to completely remove kvm from netstat, and parts that  
> solely depend on it, like the core dump analysis would be factored  
> out and moved to a more suitable place (kgdb?)

I also worked on it a bit. I didn't find a way to get the "IP interface"
statistics with a sysctl. I wrote a small patch to kernel to include it
which you may find usefull. 

Attached are the patches and a program that uses the new function. It's
used pretty similarly to if_mib. I can't find the modifications to
netstat to use it :-(.

I'also played a bit with route printing through sysctl but it's nothing
fancy. I can give you the result of this if you'd like to.

Att
Index: conf/files
===================================================================
RCS file: /home/fcvs/cvs/src/sys/conf/files,v
retrieving revision 1.975
diff -u -r1.975 files
--- conf/files	9 Dec 2004 13:54:28 -0000	1.975
+++ conf/files	16 Dec 2004 23:37:03 -0000
@@ -1477,6 +1477,7 @@
 netinet/igmp.c		optional inet
 netinet/in.c		optional inet
 netinet/in_gif.c	optional gif inet
+netinet/in_mib.c	optional inet
 netinet/ip_gre.c	optional gre inet
 netinet/ip_id.c		optional inet
 netinet/in_pcb.c	optional inet
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to