Alan, you understood me correctly. However, looks like the "InetAddressIPv4" simply does not actually affect the format of IPv4 addresses in snmpget/snmpwalk output.
Robert, thanks! Changing the DISPLAY-HINT for PhysAddr indeed works! I even tried to delete the "DISPLAY-HINT" string and this caused snmpget/snmpwalk to return data as a "Hex-STRING" instead of "STRING", e.g "Hex-STRING: A8 9B 21 D3 C1 C0" instead of "STRING: a8:9d:21:d3:c1:c0". So in a nutshell, IMHO it is correct to say that MIB files are also used for converting SNMP GetResponse values. regards, Martin On 7/18/15, Robert Story <rst...@net-snmp-pro.com> wrote: > On Mon, 13 Jul 2015 16:54:19 +0300 Martin wrote: > MT> thanks! So in short, looks like sometimes the returned values > MT> are actually formatted based on MIB files. > > Yes, this is true. > > MT> However, while I modified the "InetAddressIPv4" or > MT> "InetAddressIPv6" terms in INET-ADDRESS-MIB.txt MIB file or > MT> "PhysAddress" and "MacAddress" terms in SNMPv2-TC.txt file, it > MT> had no affect to returned values. For example if I changed the > MT> DISPLAY-HINT for "InetAddressIPv4" from "1d.1d.1d.1d" to > MT> "1d:1d:1d:1d", then all the requests made for IPv4 addresses > MT> were still formatted in "1d.1d.1d.1d" notation. > > Hmm... I tried this, modifying the PhysAddr TC in my SNMPv2-TC.txt > mib to use a comma instead of semicolon, and it worked: > > Before: > > $ snmpgetnext -v2c -c pub udp:1161 ifPhysAddress.1 > IF-MIB::ifPhysAddress.2 = STRING: f0:de:f1:ad:4d:19 > > After: > > $ snmpgetnext -v2c -c pub udp:1161 ifPhysAddress.1 > IF-MIB::ifPhysAddress.2 = STRING: f0,de,f1,ad,4d,19 > > > -- > Robert Story > Sr Developer, Parsons > ------------------------------------------------------------------------------ _______________________________________________ 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