[SNMP4J] TestAgent and SNMPv3

Jochen Katz katz at agentpp.com
Tue Dec 19 23:16:37 CET 2006


Hi,

>> SnmpRequest.java:
>>
>>      if (version == SnmpConstants.version3) {
>>        USM usm = new USM(SecurityProtocols.getInstance(),
>> ===>                    new OctetString(MPv3.createLocalEngineID(new
>> OctetString("MyManager"))), 0);
>>        SecurityModels.getInstance().addSecurityModel(usm);
>>        addUsmUser(snmp);
>>      }
> 
> I couldn't find the client sources, and the best matches were inside

this file is within SNMP4J package:
SNMP4J/src/org/snmp4j/tools/console/SnmpRequest.java

> BaseAgent.java and TestAgent.java.  Passing another OctetString like you

But it's easier to change the code within TestAgent.java:

  public TestAgent(File bootCounterFile, File configFile) throws
IOException {
    super(bootCounterFile, configFile,
          new CommandProcessor(
             OctetString.fromHexString("00:00:00:00:00:00:02:03:04:05",

                                       ':') ));

Changes to BaseAgent are not needed.

Regards,
  Jochen




More information about the SNMP4J mailing list