[AGENT++] [SNMP++] Longer than expected response with unprintable characters

Altaf Aali altaf.aali at gmail.com
Mon Jul 2 03:18:09 CEST 2007


Using the SNMP++ library, I am observing that I am getting longer responses
than expected which contain unprintable characters and spaces beyond the
valid characters. This always happens for the hex octet strings. So if a MAC
address is to be returned as follows:

AC 03 EF 00 00 00

I get ........  AC 03 EF 00 00 00 .........................   ............

The same applies to IP address values etc. I have worked around this in my
application by checking the size of the printable_value and that of the
octetstr which differ in this case and if they are different, I strip off
characters myself.

A bigger problem occurs when the type is a composite string in which case I
get more garbage.

Is this a known problem and is there a fix for this?

thanks
Altaf



More information about the AGENTPP mailing list