开发者

Where is errindex set in netsnmp for a SNMP SET request that fails?

When is the errindex supposed开发者_Go百科 to be set to the appropriate value in the response PDU for an SNMP SET request that fails? Thank you!


You actually don't set the error-index using the Net-SNMP API. The problem is that your loop over the requests should actually always return SNMPERR_SUCCESS to indicate the handler succeeded even if some of the SNMP request components didn't.

To indicate a particular request failed with an error message, you would use the following API:

                    netsnmp_set_request_error(reqinfo, request,
                                              SNMP_NOSUCHOBJECT);

for example. For picking the correct error to return, please see section 4.2.5 in RFC3416 which has a nice step-by-step procedure for returning the right error code for a given situation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜