Version: netsnmp 5.0.6
Platform: Solaris 2.6
The function translateObj doesn't seem to be honoring the use_long_names
switch. Neither does getnext and possibly other things,
but getnext is the only other thing I tried.
Sample code:
#!/usr/bin/perl
#
use SNMP;
$numeric = &SNMP::translateObj("sysDescr", 1);
$longtag = &SNMP::translateObj($numeric, 1);
$shorttag = &SNMP::translateObj($numeric, 0);
printf("Numeric=%s\nLongtag=%s\nShorttag=%s\n",
$numeric, $longtag, $shorttag);
exit;
BOGUS RESULT:
Numeric=.1.3.6.1.2.1.1.1
Longtag=sysDescr
Shorttag=sysDescr
By adding a single line to perl/SNMP/SNMP.xs,
I get the (presumably correct) result:
GOOD RESULT:
Numeric=.1.3.6.1.2.1.1.1
Longtag=.iso.org.dod.internet.mgmt.mib-2.system.sysDescr
Shorttag=sysDescr
The line I added in perl/SNMP/SNMP.xs was in
__libraries_init() just below the calls to
netsnmp_ds_set_boolean() and
netsnmp_ds_set_int().
The line added was:
snmp_set_full_objid(1);
This is a call to the UCDSNMP compatibility routines in
snmplib/ucd_compat.c which seem to be necessary in
order to get full OID output.
Logged In: YES
user_id=730394
Also with version 5.0.7 on Redhat Linux 7.3.
Logged In: YES
user_id=85836
This has been fixed with patch 722075.
This bug can be closed..
Alex
Logged In: YES
user_id=88893
The patch that Alex mentions (and provided!) has now been
applied to the main CVS tree, and will doubtless appear in
releases in due course.
Closing bug as instructed.....