By default the net-snmp
MIB
parser does not turn on DESCRIPTION string storage
in particular because it takes more memory.
To print description call:
snmp_set_save_descriptions(1);
before calling init_snmp()
to force saving of the DESCRIPTION clauses.
The function void snmp_set_save_descriptions(int);
declared in include/net-snmp/mib_api.h
and defined in snmplib/ucd_compat.c
.
Definition:
void
snmp_set_save_descriptions(int save)
{
netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_SAVE_MIB_DESCRS, save);
}
EDIT:
call snmp_set_save_descriptions(1);
before init_snmp()
Also ..init_snmp()
calls netsnmp_init_mib()
So not need to call netsnmp_init_mib()
explicitly if one is calling init_snmp()