On 16 August 2010 08:10, Robert Story <[email protected]> wrote:
> When outputting MIB values for hex digit, the code will output a leading 0 for
> values less than 16 if NETSNMP_DS_LIB_2DIGIT_HEX_OUTPUT is set.
> The attached patch makes the following changes:
[snip]
In general, the patch you're proposing seems sensible,
and I'd be happy to see it go in.
But I'd raise a minor quesion over one of your examples:
> Some examples (assuming NETSNMP_DS_LIB_2DIGIT_HEX_OUTPUT is not set):
>
> Value Hint Current output Patched output
> 01AA02 "1x" 1AA2 01AA02
I'd suggest that a more natural output would be as follows:
Value Hint Current output 2Dhex=1 2Dhex=0
01AA02 "1x" 1AA2 01AA02 1AA02
i.e. if NETSNMP_DS_LIB_2DIGIT_HEX_OUTPUT is not set,
then there should not be a leading padding 0 in the hex output.
If that flag is set, then there should be.
(In either case, padding the '02' is definitely the Right Thing To Do here)
Dave
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders