2

on linux I can execute something like this snmpwalk -c public -v2c -m <path_to_vendor_mib_file> <ip_address>

I would like to implement this same line in java using snmp4j. Is it possible? I didn't find any examples using the -m parameter to load the vendor specific mib file.

Konerak
  • 39,272
  • 12
  • 98
  • 118
Kelly Goedert
  • 1,027
  • 2
  • 11
  • 37

1 Answers1

1

According to this message, it is not possible to load MIB specifications at runtime with snmp4j.

If it works for your application, it will be better to parse the MIB file at design/build time to generate code. This will make your application more rigid in that it will only know about that particular MIB.

If your application is more general purpose, you will need to find a MIB parsing library like Mibble.

bstpierre
  • 30,042
  • 15
  • 70
  • 103
  • This answer is no longer true. SNMP4J supports MIB parsing with its add-on API SNMP4J-SMI. That API comes with an example application SnmpWalk which supports (close to) exactly the command line quoted in the original question. – ooSNMP Feb 07 '14 at 23:02