This is a discussion on getifaddr within the Linux Networking forums, part of the Linux Forums category; Hello, I wrote a network byte monitor in BSD, thinking that it would port directly to GNU with a few ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I wrote a network byte monitor in BSD, thinking that it would port directly to GNU with a few minor changes. However, I've found that the if_addr structure does not contain a link to the if_data struct on GNU stdlib. What function calls should I make to get this similar data in GNU land? -- Regards, Ed :: http://www.bsdwarez.net proud c++ person :%s/Open Source/Free Software/g :: Free DNS available |
|
|||
|
ed wrote:
> I wrote a network byte monitor in BSD, thinking that it would port > directly to GNU with a few minor changes. However, I've found that > the if_addr structure does not contain a link to the if_data struct > on GNU stdlib. > > What function calls should I make to get this similar data in GNU > land? Is 'man netdevice' any help? http://www.die.net/doc/linux/man/man7/netdevice.7.html (It seems this man page is rather old.) Also, you might want to take a look at the source code for ethtool. http://linuxcommand.org/man_pages/ethtool8.html |
|
|||
|
On Sun, 14 May 2006 09:51:59 +0200
Spoon <root@127.0.0.1> wrote: > ed wrote: > > > I wrote a network byte monitor in BSD, thinking that it would port > > directly to GNU with a few minor changes. However, I've found that > > the if_addr structure does not contain a link to the if_data struct > > on GNU stdlib. > > > > What function calls should I make to get this similar data in GNU > > land? > > Is 'man netdevice' any help? > http://www.die.net/doc/linux/man/man7/netdevice.7.html > > (It seems this man page is rather old.) > > Also, you might want to take a look at the source code for ethtool. > http://linuxcommand.org/man_pages/ethtool8.html Ah yes I did see those, what I need is the byte counters that are in if_data, what I've done (reluctantly) is to use /proc, but that's not always going to be available on 2.2 systems is it? www.s5h.net/code/netdev.c -- Regards, Ed :: http://www.linuxwarez.co.uk just another java hacker :%s/Open Source/Free Software/g :: Free DNS available |