From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Greear Subject: Re: A better way to get driver stats than parsing /proc/net/dev ? Date: Fri, 11 Apr 2003 10:26:57 -0700 Sender: netdev-bounce@oss.sgi.com Message-ID: <3E96FAE1.7030302@candelatech.com> References: <3E967535.2000409@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@oss.sgi.com Return-path: To: Jason Lunz In-Reply-To: Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org Jason Lunz wrote: > greearb@candelatech.com said: > >>Is there an ioctl or some other binary means of getting the info that >>/proc/net/dev provides? > > > You can do it with netlink sockets. See print_linkinfo() in the iproute2 > code. Seems that a lot of code is needed just to read the stats :( And every man page I read says use libnetlink instead, but I can't find any docs on libnetlink itself (and the .ru ftp link for iproute2 seems down). Do you know of any pointers as to how to use libnetlink, or if it really makes netlink easier to use? > > Jason > -- Ben Greear President of Candela Technologies Inc http://www.candelatech.com ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear