[SNMP4J] Java code generation for management applications?

Frank Fock fock at agentpp.com
Wed Aug 8 15:05:06 CEST 2007


Hi Mark,

AgenPro can generate such code, however, you will have to write
the appropriate templates yourself. As I see in which direction
your requirements are pointing, I will try to provide you with such
templates within the next one or two weeks. You can then try
them out and we would be able to discuss how they could be
improved for production use. I will then put them into the official
release. Would this be OK by you?

Best regards,
Frank

Mark Ellison wrote:
> 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
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j





More information about the SNMP4J mailing list