Hi,

I am using the following code for SNMP V2. But reponse always getting as
null.


Address targetAddress = GenericAddress.parse("udp:10.116.51.125/162");
   target.setAddress(targetAddress);
   target.setCommunity(new OctetString("public"));
   target.setTimeout(1000);
   target.setVersion(SnmpConstants.version2c);
   PDU pdu = new PDU();
   pdu.setType(PDU.TRAP);
   long sysUpTime = System.currentTimeMillis();
   //pdu.add(new VariableBinding(SnmpConstants.sysUpTime, new TimeTicks(
    // sysUpTime)));
   pdu.add(new VariableBinding(new
OID("1.3.6.1.4.1.637.69.6.1.1.1.1")));
   TransportMapping transport = new DefaultUdpTransportMapping();
   transport.listen();
   Snmp snmp = new Snmp(transport);
   ResponseEvent respEv = snmp.send(pdu,target);
   PDU  response = respEv.getResponse();
   System.out.println("Response"+response);

Could you please inform me what might went wrong?

Regards,
Nirmala

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com
_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to