>>>>> On Fri, 6 Feb 2009 16:21:21 -0500, Vinh Hoang <[email protected]> said:

VH> I'm have subagent generated be mib2c of a snmp table.  And I'm returning
VH> SNMP_ERR_GENERR, in "tablename"_handler(...) in the case MODE_GET. I'm only
VH> returning the error if the request was not a valid one, ie request for a row
VH> not on the table.  Anyways when I try to do a table get by using GETNEXT, I
VH> seems to do a infinite loop, and CPU usage spikes up for snmpd.  If I do a
VH> walk on the table it works fine.  So I'm wondering what is SNMP_ERR_GENERR
VH> used for and is there another error I can return instead?

Actually, you should always return SNMPERR_NOERROR from a handler.
Instead, you need to flag the request itself instead.  You can do this
through the following code example:

            netsnmp_set_request_error(reqinfo, requests,
                                      SNMP_NOSUCHINSTANCE);


-- 
Wes Hardaker
Sparta, Inc.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to