joescii / snmp4s

Idiomatic type-safe Scala DSL for SNMP
23 stars 12 forks source link

Support for multidimensional snmp tables #6

Open tzeman77 opened 3 years ago

tzeman77 commented 3 years ago

SnmpSync.walk() returns a sequence of VarBinds with obj constructed from the last part of OID (ie. index of the snmp table):

https://github.com/joescii/snmp4s/blob/677c7ca799581ce29d4b72e82fa40bf51bec0d73/core/src/main/scala/org/snmp4s/Snmp.scala#L263

This works correctly for 1-dimensional tables like IfTable and similar but returns incorrect var-binds for tables where index is n-tuple like e.g. Juniper operating table / entry described here:

http://oidref.com/1.3.6.1.4.1.2636.3.1.13.1

I can provide fix for the issue.