[SNMP4J] Erroneous default constructor Snmp()

Ein ein.nsk.ru at gmail.com
Fri Oct 16 12:40:23 CEST 2009


Hi all,

I've tried to do with SNMP4J as described in Snmp(). Here is my code:

Snmp s = new Snmp(disp);
MessageDispatcher disp = s.getMessageDispatcher();
disp.addMessageProcessingModel(new MPv1());
disp.addMessageProcessingModel(new MPv2c());
s.addTransportMapping(new DefaultUdpTransportMapping());
s.addTransportMapping(new DefaultTcpTransportMapping());
s.listen();

then I used Snmp.set which returns ResponseEvent with getResponse() == null,
but there's no timeout! I also check SNMP agent with snmpset and snmpget -
all works.

When I examine the source code, I've found that default constructor Snmp()
doesn't registers itself with MessageDispatcherImpl.addCommandResponder()

Is that right?

Sincerelly.



More information about the SNMP4J mailing list