[SNMP4J] SNMPv3 Configuration

Frank Fock fock at agentpp.com
Mon Jul 11 21:56:33 CEST 2005


Jim,

Both suggestions make sense. The second is in fact similar to what
I thought to implement for 1.6 to improve engineID handling.

The 1.6 release will be released simutaneously with SNMP4J-Agent
1.0 beta. which might be around end of September. Probably an
early access release of SNMP4J could be made available in August.

Hope this helps.

Best regards,
Frank

Jim Doble wrote:

>Frank:
>
>Thanks for the quick reply to my earlier questions. I have two followup
>questions:
>
>1) For requests, if I am using the Snmp.discoverAuthoritativeEngineID
>method, I think it would make sense to see if the MPv3 instance already has
>a cached engineID for a given address before calling
>Snmp.discoverAuthoritativeEngineID. If there is no cached engineID, then I
>would call Snmp.discoverAuthoritativeEngineID, and when it returns, I would
>create and register a UsmUser with the appropriate userName, engineID, and
>passwords. I am imagining something like the following (simplified):
>
>   MPv3 mpv3 = (MPv3)
>snmp.getMessageProcessingModel(MessageProcessingModel.MPv3);
>   OctetString engineId = mpv3.getEngineID(address);
>
>   if (engineId == null) {
>       byte[] engineIdBytes = snmp.discoverAuthoritativeEngineID(address,
>timeout);
>       engineId = new OctetString(engineIdBytes);
>       UsmUser user = new UsmUser(securityName, AuthMD5.ID, authPw, null,
>null));
>       snmp.getUSM().addUser(securityName, engineId, user);
>   }
>
>   // perform the request...
>
>Does this make sense?
>
>2) I am wondering if a more general solution, that would also work for
>traps, would be to add a listener mechanism to the MPv3 class, whereby
>listeners would be notified whenever a new engineID is associated with an
>address (addEngineID method) or unassociated with an address (removeEngineID
>method), whether through the discovery mechanism, or by any other means.
>That way, I could register a listener that would register any UsmUsers
>associated with that address:
>
>   void engineIdAdded(Address address, OctetString engineId) {
>
>       // repeat the following for all securityNames associated with address
>
>       UsmUser user = new UsmUser(securityName, AuthMD5.ID, authPw, null,
>null));
>       snmp.getUSM().addUser(securityName, engineId, user);
>   }
>
>   void engineIdRemoved(Address address, OctetString engineId) {
>
>       // repeat the following for all securityNames associated with address
>
>       snmp.getUSM().removeUser(securityName, engineId);
>   }
>
>Does this make sense? If you decide to do this, or a similar callback
>mechanism in your next release, when do you anticipate that release becoming
>available?
>
>Regards,
>
>Jim Doble
>Tavve Software Company
>
>
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>
>  
>





More information about the SNMP4J mailing list