Posted on 2005-09-26 18:13:46-07 by skendric
translating OIDs into OBJECT-VALUE
hi, i'd like to translate between object-values and oids. so instead of writing:
$oid= ".1.3.6.1.2.1.1.1.0"; ($session, $error) = Net::SNMP->session( -hostname => 'localhost', -community => 'public', ); $result = $session->get_request( -varbindlist => [$oid] );
i would like to write:
$obj = "sysDescr.0"; $oid = snmp_translate($obj);
[... the rest is the same ...] where "snmp_translate" is a function which i'm hoping exists ... but which may not i played a bit with snmp_type_ntop ... but i don't think it does what i want it to do. of course, in order to translate object values into oids, i would need to specify where my MIB modules are ... and load them and compile them ... does Net-SNMP support this functionality? or am i responsible for performing my own translation before issuing a get_request? --sk stuart kendrick fhcrc
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.