Hi Rob, Thanks. And just for the records I found another way. I can use snmp_set_var_typed_value(var, SNMP_NOSUCHINSTANCE, 0, 0 ) as well. This too works.
Viren -----Original Message----- From: Robert Story (Users) [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 12:56 AM To: Virender Singh Chauhan Cc: [EMAIL PROTECTED] Subject: Re: How to return an snmp error from a table handler routine On Mon, 13 Sep 2004 23:01:36 +0530 Virender wrote: VSC> I have used mib2c.iterate.conf to generate code for my tables. If I VSC> do not have a proper value to return for a get/getnext request in VSC> the handler routine and want to return to the request sending VSC> application a 'no name' or 'no such instance' error, how can I do VSC> so programatically? VSC> VSC> I tried returning from the handler without setting the value ( I VSC> set value using snmp_set_var_typed_value( ) ), but this gives VSC> unpredictable result in case of getnext. You should be using netsnmp_request_set_error(requests, XXX); -- Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ 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
