Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OID to name resolution should find best match #10

Closed
ceharris opened this issue Mar 21, 2019 · 0 comments
Closed

OID to name resolution should find best match #10

ceharris opened this issue Mar 21, 2019 · 0 comments

Comments

@ceharris
Copy link
Member

ceharris commented Mar 21, 2019

When resolving a numeric OID to a name, a search of loaded MIBs is performed, in the reverse order in which MIBs have been loaded. This works, but requires the load order to be carefully considered by the tnm4j user.

A nice improvement would be to search all loaded MIBs and return the object name that matches with the smallest suffix of remaining unresolved OID string. If all needed MIBs are loaded, the unresolved part will always be the instance sub-identifier (assuming the OID is an object instance identifier).

For example, if SNMPv2-MIB is loaded and RFC1155-SMI is loaded, in the current implementation an OID-to-name lookup for 1.3.6.1.6.3.1.1.4.1.0 could return two possible values, depending on the order in which the Mib instance is loaded:

  1. snmpTrapOID.0
  2. internet.6.3.1.1.4.1.0

In this case result 1 is better, because the suffix remaining after the name is shorter than in result 2; it is a better match, and less likely to surprise tnm4j users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant