[SNMP4J] SNMP setting traps

unknown unknown delnoskes at gmail.com
Thu Aug 28 12:36:48 CEST 2008


Hello everyone,
I probably misunderstood something, but I simply couldn't  find out this.

I'm using snmp4j libraries for creating mns, and i got some needed
commands working(such as GET, GETNEXT),
I even can receive traps and process them. But most significant part
I'm still missing - setting traps.
Maybe I misunderstood something, but sending traps and setting them
isn't equal operations (in snmp4j libraries)?

What I mean is, with sample code from snmp4j libraries I'm performing
sending operation, and can't expect traps
from agent ? Am I correct?

//----Code ----
import org.snmp4j.PDUv1;
...
PDUv1 pdu = new PDUv1();
pdu.setType(PDU.V1TRAP);
pdu.setGenericTrap(PDUv1.COLDSTART);
...
snmp.send(pdu, target);
...
//----Code ----

So the question is then how to set the traps? net send them? or I'm
missing something?

Any feedback is very welcome.

Thank you in advance,

Sigitas



More information about the SNMP4J mailing list