----- Original Message -----
From: "Joel Realubit" <[EMAIL PROTECTED]>
To: "Philippine Linux Users Group Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, November 10, 2003 4:39 PM
Subject: [plug] [OT?] bandwidth checking API


> hi!
>
> does Linux have a system call or API or something for checking bandwidth
> utilization on an interface?  i need to write an SNMP agent using
> AGENT++/SNMP++, but the library only provides the SNMP stack;
> instrumentation is entirely up to the developer, and i dont know how to
> get the number of bytes in and out of an interface. the only thing that
> comes to mind is to capture all packets (maybe by using libpcap) and
> count them, but i'm not sure if that's the only way to do it.
>
> btw, as you might guess, i'm constrained to using C/C++ only.
>
> any ideas will be much appreciated!

net-snmp (formerly known as ucd-snmp) is your friend here.... net-snmp is an
extensible snmp agent...

if you dont want net-snmp, just read the code how it was done or man 7
netdevice to start with whichever you prefer...

fooler.


--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to