ikkeniet has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know how you can in perl translate an OID to its description from reading a MIB.

I know you can load MIBS using SNMP_util using the snmpMIB_to_OID function.

I am hoping for a simple solution such as my $descr=&translateoid($oid);

I run Perl on Windows and the snmptranslate application is not an option. I am looking for something entirely in perl. I believe that with SNMP_util I am close to finding it but haven't found it yet :-( Any help is welcome.

Replies are listed 'Best First'.
Re: Translate OID using MIBs
by VinsWorldcom (Prior) on Jul 27, 2009 at 17:16 UTC
Re: Translate OID using MIBs
by ig (Vicar) on Jul 28, 2009 at 23:37 UTC

    You can use SNMP that comes with net-snmp.

    use strict; use warnings; use SNMP; $SNMP::use_long_names = 1; print SNMP::translateObj('1.3.6'), "\n";

    prints

    .iso.org.dod

    It's not pure Perl. The SNMP modules depends on the net-snmp libraries. But it is available for Windows.