Re: Example reading the ifTable with C
Kavita Raghunathan <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <C85C91CA.3A59%[email protected]> |
I went through this struggle myself. Please look under data_access/interface.c, data_access/interface_linux.c, data_access/interface_ioctl.c. You have not mentioned what OS this router is running. If it is using a BSD type IP stack, and has an ioctl interface to the ethernet driver, then the ioctl calls will work in all probability to retreive the interface counters. There are some ioctls in there that were unsupported in my case and I had to make a lot of modifications to the code in there to try to make it work. Thanks, Kavita On 7/9/10 3:54 AM, "Tsolakos Stavros" <[email protected]> wrote: > Hi list. > > Can anyone provide some sample code about how could I read the interface > table of a router from a C application? I have found some code under the > 'agent/mibgroup/if-mib' directory of the source distribution, but I am > not very sure that I know how to use it. > > Thank you all in advance! > > Stavros > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Net-snmp-users mailing list > [email protected] > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users