Hi I`d like to suggest two minor changes in the net-snmp code which could improve machine parseability of snmpwalk dumps. First there are long Hex-Strings. When a hex string is longer than what fits into one line snmpwalk breaks it into multiple lines like this:
SNMPv2-SMI::enterprises.637.61.1.6.10.1.2.17 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SNMPv2-SMI::enterprises.637.61.1.6.10.1.2.18 This makes the output nontrivial to parse. It would be nice if snmpwalk "escaped" newlines with a backslash. Then the output would look like this: SNMPv2-SMI::enterprises.637.61.1.6.10.1.2.17 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Or the whole hexdump could be in quotation marks. You could also add an option to disable line breaking for long Hex-STRING values. Any of these solutions would make parsing much easier. Another issue is with values printed without a type: SNMPv2-SMI::enterprises.637.61.1.57.4.0 = "" The line doesn`t contain information about the value type which is useful in many situations. I think it should be printed every time (even if the value is empty). Tell me what you think about these ideas. Best regards, -- Maciej Grela ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
