[SNMP4J] Several Questions from a New User Creating an Agent in snmp4j

Jason Jeffords jason.jeffords at comcast.net
Sun Mar 12 19:02:56 CET 2006


All,

I am trying to determine the best way to do the following:

1) set the value of previously created MIB objects from within the Agent
   itself
   - is there a direct call to change the value given an OID?
     Or
   - should I form a PDU and send it into the Agent code even though I am 
     in the local process?
2) If I form the PDU and send it into the local Agent I would like to use
   the OID values in the MIB generated by the AgentPro2 tool (generating
   snmp4j code).  However, all constants in the generated MIB are private by

   default.  How can I reuse these definitions?
3) Is there any way to register for notification of committed object changes
   from the SNMP layer?  I see the validate and counter change events but
   don't see a way to register for changes when they are actually committed.

   For instance, I don't want to register for validation only to have the 
   commit fail and get rolled back.  I need to know when the set is 
   successful (so I can notify other modules and apply the changes to 
   hardware). 

My architecture looks like the following:

 CLI      HTTP      SNMP
   |       |         |
  SHARED MANAGED OBJECTS
           |
 HARDWARE ABSTRATION LAYER


My goal is to have changes from each of the upper layer protocols manipulate
the same shared managed objects, which in turn will get/set from the
hardware abstraction layer.

Does anyone know the best way to accomplish this?

Thanks in advance,

Jason




More information about the SNMP4J mailing list