[SNMP4J] how to SET?

Frank Fock fock at agentpp.com
Mon Mar 19 19:03:26 CET 2007


Hi Daniel,

Have you checked your access rights for write
access to the agent?

Best regards,
Frank

Daniel Gyorfi wrote:
> Hi All!
> 
> I want to send a PDU with SET type.
> I have a working method, which returns a perfect result for a single
> GET type and I changed the type and added a value for the single
> variablebinding:
> 
>            PDU request = new PDU();
>            if (set){
>                request.add(new VariableBinding(new OID(oid), new
> OctetString(setValue)));
>                request.setType(PDU.SET);
>            } else{
>                request.add(new VariableBinding(new OID(oid)));
>                request.setType(pduType);
>            }
>            ResponseEvent responseEvent = snmp.send(request, target);
> 
>            PDU response = null;
>            if (responseEvent != null) {
>                response = responseEvent.getResponse();
>            } else response = null;
>            snmp.close();
>            return response;
> 
> I didnt changed anything else, but Im not able to receive valid (not
> null) response.
> Do I have to change something also?
> Am I missing something else?
> 
> Many thanks,

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list