Networking Forums

Networking Forums > Computer Networking > Linux Networking > getifaddr

Reply
 
 
ed
Guest
Posts: n/a

 
      05-13-2006, 01:49 PM
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
 
 
 
 
Spoon
Guest
Posts: n/a

 
      05-14-2006, 07:51 AM
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
 
ed
Guest
Posts: n/a

 
      05-14-2006, 09:52 AM
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
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11