[SNMP4J] Fwd: How respond to a set action?

Giuseppe Giusti giuseppe.giusti at syncromed.it
Fri Jan 31 10:04:59 CET 2014


Solved...
when i'm very tired simple things become difficult.


I just set this:

  vacm.addViewTreeFamily(
                new OctetString("fullWriteView"),
                new OID("1.3"),
                new OctetString(),
                VacmMIB.vacmViewIncluded,
                StorageType.nonVolatile);


ty in advance

---------- Forwarded message ----------
From: <snmp4j-owner at agentpp.org>
Date: 2014-01-30
Subject: How respond to a set action?
To: giuseppe.giusti at syncromed.it


You are not allowed to post to this mailing list, and your message has
been automatically rejected.  If you think that your messages are
being rejected in error, contact the mailing list owner at
snmp4j-owner at agentpp.org.



---------- Messaggio inoltrato ----------
From: Giuseppe Giusti <giuseppe.giusti at syncromed.it>
To: snmp4j at agentpp.org
Cc:
Date: Thu, 30 Jan 2014 12:12:32 +0100
Subject: How respond to a set action?
Hi, I'm trying to respond to a set action for a specific OID .
The set action is performed by a MIB browser but i recived:

Sent SET request to localhost : 161
Request Failed: Error: Request Timed Out to localhost

I'm able to intercept the request with the code above
but how can I reply to the MIB Browser that all its OK?


 @Override
    public void processPdu(CommandResponderEvent event) {

        PDU pdu = event.getPDU();

 if(pdu.getType()==PDU.SET){



           System.out.println("Getting some request to set same oid value");
           System.out.println("OID of variable binding get from set
request---> " +pdu.getVariableBindings().get(0).getOid());
           System.out.println("value of variable binding get from set
request---> " +pdu.getVariableBindings().get(0).getVariable());



Thanks
Giuseppe



More information about the SNMP4J mailing list