[SNMP4J] developing an SNMP agent

Frank Fock fock at agentpp.com
Fri Feb 11 15:09:13 CET 2005


Hi Daniel,

Please find my comments inline:

Daniel Bress wrote:

>I am interested in developing a java based snmp agent using snmp4j.  I
>am a little confused as to where to start.  I read on the news group
>that full agent support has not been implemented in snmp4j yet.  Is this
>correct?  
>
>  
>
The answer is: yes, that is correct from some point of view. SNMP4J can 
be used as it is
to implement a SNMPv1/v2c/v3 multi-lingual agent. But a framework 
(SNMP4J-Agent)
that implements all reusable parts of an agent is not ready yet. The 
"reusable" parts of
an agent are, for example, the VACM, the managed object registration and 
message
processing. Any other parts of an agent can be considered 
"instrumentation code" which
is the code that accesses the management information.

> 
>
>To make sure I understand how snmp agent development is supposed to work
>can someone verify that these are the steps I would want to do
>
> 
>
>1)       define my mib
>
>  
>
Yes, you should carefully design your MIB.

>2)       run a mib-compiler to convert the mib into java class stubs
>
>  
>
This is not a required step. Particularly with SNMP4J (which currently 
lacks an
agent API) there is nothing like a stub interface where the generated 
classes plug-in.
However, you may want to write your own agent API and then you could use a
generic SNMP code generator like AgenPro 2.x (see http://www.agentpp.com)
to write your own code generation templates for your specific stub 
interfaces.

>3)       Implement my stubs to perform the appropriate
>instrumentation/configuration based on what that lead node is supposed
>to do.
>
>  
>
Once you have an agent API then this could be the last step.

> 
>
>Is this correct or am I missing something?
>
>  
>
As written above, with SNMP4J you will need (to build) an AGENT API.

Best regards,
Frank





More information about the SNMP4J mailing list