Subject: Retrieval of interface stats
To: None <tech-net@NetBSD.ORG>
From: Harmen van der Linde <>
List: tech-net
Date: 07/31/1996 15:58:24

I hope someone can help me with this. I want to retrieve
interface configuration information and statistics from the
kernel. Basically, the same information as provided by the 
"ifconfig" command (e.g., if_name, if_mtu etc.). I know that
this information is contained in the ifnet structure (->
/usr/include/net/if.h) but I don't know how to retrieve this
information. I suppose that you have to use the nlist command
but I couldn't find any documentation on this.

Note that retrieving tcp and udp stats according the method
outlined above did not give any problems.

Any help appreciated.


 Harmen van der Linde
 Bellcore East, The Netherlands         Voice: 011-31-527-611707 (NL)
 Broadband Data Services & Consulting     Fax: 011-31-527-612921 (NL)
 Ballumerbocht 1                        VMail: (908) 758-2493    (NJ)
 8303 KB Emmeloord                      Email:
 The Netherlands