[SNMP4J] Sending Traps using snmp4j-agent library

pradip de pradip.de at gmail.com
Fri Jul 17 19:10:49 CEST 2009


Hi,
I was using the sample TestAgent.java to implement an snmp agent. I have
configured my notification target address using the addNotificationTarget()
and was using the notificationOriginator.notify() to send out a trap. In
other words, the only change I made to TestAgent was the target IPaddress.
However, when I try to sniff(using wireshark) for any snmp packets emanating
out of "any" interface I dont see one. So, my question is, if I use
TestAgent, do I have to implement my own trapSender code or does the
notify() method do it for me. I tried looking into the source(e.g.,
NotifyTask) along the notify() method chain, but didnt find any place where
a PDU was getting formed and sent out. I am basically confused about whether
the testAgent code is able to send trap PDUs to remote targets. Any help to
demystify whats going on and quickly able to write my agent to send traps
would be greatly appreciated.
thanks,
Pidarp



More information about the SNMP4J mailing list