Hi SNMP experts,

When using the net-snmp v5.8 in a CentOS to get OIDs from an SNMP Agent, I'm
getting the pdu->variable struct with empty values and the variable buf has
the correct values.

For example, when trying to read the following OCTET String "0x00 0x00 0x00
0x00 0x00 0x00", the struct vp->val will have null values and in the vp->buf
i can see the correct values.
For example, if using the following OCTET String "0x01 0x02 0x0D 0x04", in
the position of the 0x0D, the struct vp->val will contain a NULL value and
once again in the vp->buf will have the correct values.

I already checked this website that says that the problem can be because of
the translation  <https://metacpan.org/pod/Net::SNMP#translate>
https://metacpan.org/pod/Net::SNMP#translate()-enable-or-disable-the-transla
tion-mode-for-the-object, because the control codes are part of the
character set and will not trigger translation. 

But can you explain if there's a way to fix this problem? Or is there a
reason that this problem exists in the net-snmp lib?

And any recommendation that maybe it's better to do this change inside the
net-snmp lib or maybe on my side to get the value from the vp->buf and using
this value if the vp->val is empty?

 

Best Regards!

 

_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to