Re: Parsing the values returned from snmp_synch_response

Niels Baggesen via Net-snmp-coders <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <[email protected]>
On Thu, May 02, 2019 at 05:51:03PM +0000, Even Oscar Andersen wrote:
> (Repost of message sent to net-snmp-users, maybe this forum is more appropriate)
> 
> Hello,
> 
> I am calling snmp_synch_response, and try to use the resulting variables,
> 
> It seems part of the result return variable type 0x81, not sure what this variable is,
> It is not one of the ASN_ defines, but if I mask out 0x80 (not sure if this is correct),
> It seems to be ASN_BOOLEAN.

This is a SNMPv2 exception type. You can find it in include/net-snmp/library/snmp.h,
but here are the exceptions:


    /*
     * Exception values for SNMPv2p, SNMPv2c, SNMPv2u, SNMPv2*, and
     * SNMPv3 
	      */
#define SNMP_NOSUCHOBJECT    (ASN_CONTEXT | ASN_PRIMITIVE | 0x0) /* 80=128 */
#define SNMP_NOSUCHINSTANCE  (ASN_CONTEXT | ASN_PRIMITIVE | 0x1) /* 81=129 */
#define SNMP_ENDOFMIBVIEW    (ASN_CONTEXT | ASN_PRIMITIVE | 0x2) /* 82=130 */

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - [email protected]
The purpose of computing is insight, not numbers   ---   R W Hamming
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.