getifaddr

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 ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-13-2006
ed
 
Posts: n/a
Default getifaddr

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

Reply With Quote
  #2 (permalink)  
Old 05-14-2006
Spoon
 
Posts: n/a
Default Re: getifaddr

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
Reply With Quote
  #3 (permalink)  
Old 05-14-2006
ed
 
Posts: n/a
Default Re: getifaddr

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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:01 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0