[SNMP4J] Need help with Snmp4j CommandResponder
Y Srinivas
ysrinivas at indusnetworks.com
Tue Jun 20 06:40:19 CEST 2006
Hi Frank,
I have problem listening to responses and to read responses i
have used the following lines of code but i don't see that the
program is catching any responses as i am able to do with a snmp
tracer.
class MySnmp1 implements CommandResponder{
TransportMapping transport;
Snmp snmp;
public MySnmp1(){
try{
transport = new DefaultUdpTransportMapping(new
UdpAddress("192.168.4.58/888"));
snmp = new Snmp(transport);
snmp.addCommandResponder(this);
System.out.println("transportBinding..");
transport.listen();
}catch(Exception e){e.printStackTrace();}
}
public synchronized void processPdu(CommandResponderEvent e) {
System.out.println("----Received Response -----");
}
public static void main(String[] args) throws Exception
{
new MySnmp1();
while(true){}
}
}
regards,
Srinivas
More information about the SNMP4J
mailing list