[SNMP4J] Java code generation for management applications?
Mark Ellison
ellison at ieee.org
Mon Aug 6 22:44:38 CEST 2007
Hi good folks of the SNMP4J interest list-
I would like to generate some 'manager side' code from my MIB files for
use with a SNMP4J based management application. For example, I want to
generate code to retrieve columns in a table.
In the SNMP4J Javadoc, there is some example code:
PDU Examples
SNMPv1/v2c GETNEXT PDU
import org.snmp4j.PDU;
import org.snmp4j.smi.*;
...
PDU pdu = new PDU();
pdu.add(new VariableBinding(new OID("1.3.6.1.2.1.1.1"))); // sysDescr
pdu.add(new VariableBinding(new OID("1.3.6.1.2.1.2.1"))); // ifNumber
pdu.setType(PDU.GETNEXT);
It would be good to generate some #defines to use for "new
OID(sysDescr)" and it would be nice to generate pdu.add() lines for each
column in a table.
Is this something AgenPro can do for management apps (even if its name
is _agen_ pro ;-)
Also, I did not see a class API in SNMP4J to load MIB modules. I'm sure
I must have missed something...your good help is appreciated!
Regards,
Mark
More information about the SNMP4J
mailing list