Subject: Re: Retrieval of interface stats
To: None <H.van.Linde@inter.nl.net>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: tech-net
Date: 07/31/1996 13:20:52
> 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 but I don't know how
> to retrieve this information.

Use The Source, Luke.  See /usr/src/sbin/ifconfig/, especially the
printall() function in ifconfig.c.  Briefly, what you want is the
SIOCGIFCONF ioctl.

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu
		    01 EE 31 F6 BB 0C 34 36  00 F3 7C 5A C1 A0 67 1D