Hi Girish,

The SNMPv3 standard explicitly requires that there is NO special return code if 
authentication or privacy fails.
Instead the appropriate counters of the agent are incremented. If the command 
generator has read access to that counters, the failure can be analysed 
indirectly using those counters.

The standard has chosen this behaviour for security reasons.

Best regards,
Frank  

> On 5. Feb 2019, at 21:30, Girish Venkatasubramanian <giris...@gmail.com> 
> wrote:
> 
> Hello
> I am trying to understand if failure of an SNMP GET due to incorrect
> username/auth/priv can be distinguished from failure because of other
> causes.
> 
> I am using the code as shown in the example
> https://www.snmp4j.org/doc/org/snmp4j/Snmp.html
> 
> First, I tried with the correct userName/auth/priv keys and the
> ResponseEvent was as expected i.e. with a non-null responsePDU containing
> the value of the polled OID.
> 
> Then, I tried with an incorrect userName. The responsePDU was null, which
> is exactly the same when I poll a device which is known to be down.
> 
> Is there a way to identify that the polling failed due to incorrect
> credentials ? Any pointers to documentation/examples will be
> much appreciated.
> 
> Thanks
> _______________________________________________
> SNMP4J mailing list
> SNMP4J@agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j

_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j

Reply via email to