>>>>> On Fri, 5 Dec 2008 09:16:34 +0000, "Daniel  Quintero" <[EMAIL PROTECTED]> 
>>>>> said:

DQ> The question is if I can easily find the pointer to a node in the
DQ> tree just by having its OID in numeric form, because if I do, then I
DQ> can go through the list of varbinds and get the label I want.

Yes, you can..  You might start by looking at the apps/snmptranslate.c
file which does many similar things to what you're looking for
(including multiple ways of looking up mib information).  EG:

> snmptranslate -Td .1.3.6.1.2.1.1.1
SNMPv2-MIB::sysDescr
sysDescr OBJECT-TYPE
  -- FROM       SNMPv2-MIB, RFC1213-MIB
  -- TEXTUAL CONVENTION DisplayString
  SYNTAX        OCTET STRING (0..255)
  DISPLAY-HINT  "255a"
  MAX-ACCESS    read-only
  STATUS        current
  DESCRIPTION   "A textual description of the entity.  This value should
            include the full name and version identification of
            the system's hardware type, software operating-system,
            and networking software."
::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) system(1) 1 }

-- 
Wes Hardaker
Sparta, Inc.

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to