Sending genError from AgentX subagent with SNMP v1

"JORDI LOPEZ" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi all,
 
I'm using net-snmp 5.4.1 on a Linux box with a 2.6.28-19-generic kernel.
 
I'm developing an AgentX subagent to conform to NTCIP standard for dynamic message signs. In this standard there are some objects that shall return genError or its value in a GET operation, depending on the value of some other object. The standard also specifies that SNMP v1 shall be used to allow interoperability with older clients.
 
Well I don't seem to be able to do so. I've just registered a scalar value using netsnmp_create_handler_registration and netsnmp_register_scalar. In the handler I try to return a genError using:
 
netsnmp_set_request_error ( reqinfo, requests, SNMP_ERR_GENERR );
 
and returning from handler with:
 
return SNMP_ERR_NOERROR;
 
if I try to get the value with SNMP v1
 
snmpget -v1 -cpublic localhost defaultBackgroundColor.0
 
I get a noSuchName error instead of a genError.
 
But if I try to do the same with SNMP v2c
 
snmpget -v2c -cpublic localhost defaultBackgroundColor.0
 
then I get the genError correctly.
 
If I run my agent as master I get the correct error also, so it seems that somewhere, in the AgentX protocol and before sending the SNMP response, the error codes are being changed (translated?) but only for SNMP v1.
 
How can I return a genError, or any other error, from an AgentX subagent to a SNMP v1 client?
 
Any help would be appreciated thank you,
 
Jordi López

______________________________________________________________________
IMAGO GROUP www.imagoscreens.com
This email has been scanned by the MessageLabs Email Security System.
 
______________________________________________________________________

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.