[SNMP4J] snmp set value null
Hi, I have problem sending set pdu. here is my code: PDU pdu = new PDU(); VariableBinding vb = new VariableBinding(oid); Variable v = new Integer32(value); vb.setVariable(v); pdu.addOID(vb); snmp.set(pdu, getTarget()); from the snmp pkt I captured, the value is always NULL. BTW, how to search this mailing list so that I won't ask repeated questions? Can anybody help? thx. ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j
Re: [SNMP4J] snmp set value null
Hi, See the FAQ at http://www.snmp4j.org/html/faq.html You can search the mailing list with a search engine (Google is a search engine, for example). Best regards, Frank Am 30.11.2011 12:10, schrieb dajiang: Hi, I have problem sending set pdu. here is my code: PDU pdu = new PDU(); VariableBinding vb = new VariableBinding(oid); Variable v = new Integer32(value); vb.setVariable(v); pdu.addOID(vb); snmp.set(pdu, getTarget()); from the snmp pkt I captured, the value is always NULL. BTW, how to search this mailing list so that I won't ask repeated questions? Can anybody help? thx. ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j -- --- AGENT++ Maximilian-Kolbe-Str. 10 73257 Koengen, Germany https://agentpp.com Phone: +49 7024 8688230 Fax: +49 7024 8688231 ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j
[SNMP4J] snmp set value null
Hi Frank, Thx for ur reply. I searched the FAQ, still couldn't find the solution. I also read through SnmpRequest.java, yet cannot figure out the trick. Can you point out what I did wrongly or missed anything? Best Regards DJ ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j
Re: [SNMP4J] snmp set value null
Hi DJ, Javadoc says addOID(VariableBinding vb) should be used for GET. For SET, you can use add(VariableBinding vb). The method addOID(VariableBinding vb) add a OID to PDU, but it's variable is always NULL. Best regards Shun Hi Frank, Thx for ur reply. I searched the FAQ, still couldn't find the solution. I also read through SnmpRequest.java, yet cannot figure out the trick. Can you point out what I did wrongly or missed anything? Best Regards DJ ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j ___ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j