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 with numbers and letters #25

Closed
MyaLongmire opened this issue Jul 8, 2021 · 2 comments
Closed

oid with numbers and letters #25

MyaLongmire opened this issue Jul 8, 2021 · 2 comments

Comments

@MyaLongmire
Copy link

MyaLongmire commented Jul 8, 2021

I am using GetNode to find node with letters and numbers in the oid (ex .iso.2.3 or RFC1213-MIB::sysUpTime.0) but I am always getting could not find node. Is there a different function I should use?

@sleepinggenius2
Copy link
Owner

Just a heads up, .iso.2.3 does not exist; there is no ISO member body with a code of 3, so there should not be any MIB that would provide that OID.

I see in the libsmi documentation that:

Node may be either a fully qualified descriptor, a simple node name, or a numerical OID. Nodes are also found, if node contains an instance identifier suffix.

Reviewing the code, it looks like simple node name is the only thing that is currently supported. I can certainly look at what it would take to add in the other options. As a workaround for the time being, replacing well-known iso with 1 and doing a search with GetNodeByOID should work for the .iso.2.3 case, but I don't have a good solution for a mix of numbers and identifiers without the identifier as the first arc in the OID. For the RFC1213-MIB::sysUpTime.0 form, splitting on :: and manually getting the module pointer for RFC1213-MIB, then running GetNode with the index-stripped identifier, like sysUpTime, should work. I understand that those are inherently fragile solutions and I have some idea of how the implementation might work, but it is going to take a little time to code out and test.

@MyaLongmire
Copy link
Author

Thank you for your help and the quick reply. I will try to implement your workaround.

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

2 participants