Cross-referencing MIB module with IF-MIB::ifIndex and IF-MIB::ifDescr

"Ryan T. Morgan" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Greetings!

I'm implementing a MIB module, and I'm stuck.  Right now, I'm trying to 
get my table working.  Here's a snippet from the MIB:

    SomeInterfaceEntry ::=
       SEQUENCE {
          someIfIndex      <--  this will correspond to IF-MIB::ifIndex
             InterfaceIndex,
          someIfName
             SnmpAdminString,
          someIfStatus
             TruthValue,
          someValue
             Unsigned32,

The manager should be able to run a query such as

snmpget ... ... someValue.1

In my handler, I'll see the requested index was 1, I'll lookup that 
index IF-MIB::ifIndex, grab the corresponding IF-MIB::ifDescr, and 
continue handling the request.

In other words, the external data I'm querying is based on the interface 
name (ie, "eth0"), but my table has a numeric index tied to IF-MIB::ifIndex.

So the question is: from within my MIB code, how can I access the 
interfaces group?  Surely I could do some popen call and execute

"snmpbulkget ... ... ifIndex ifDescr"

and then parse the results, but that's ugly and I figure there must be a 
way to grab the IF-MIB data programmatically.


FYI: in case it matters, my MIB module is running as an AgentX subprocess.

Many thanks!!

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.