Thank you guys for your answers.
I think I need to explain this better, since you haven't quite understood the
question...
As part of an (embedded) SNMP (sort of) manager, I'm writing a cgi script (in
c) that will load a number of MIB files into the MIB tree using the MIB api.
The browser is going to give me a Trap OID in numeric form and the index of one
of its varbinds (objects that the agent will also send when it sends a trap)
and I need to in return send the label of that varbind.
I know where to find that label, it is in a list as part of the node that
defines the trap in the MIB tree that I can access when using mib api.
The question is if I can easily find the pointer to a node in the tree just by
having its OID in numeric form, because if I do, then I can go through the list
of varbinds and get the label I want.
If I can't then I guess I will have to search the tree starting from the root
and looking for each of the subids at every level, until I reach the node that
defines the trap. This can take a while, considring I may need to look for many
of them, and there will be a web browser at the other end waiting for a reply...
Thanks again.
Daniel.
________________________________________
From: Daniel Quintero [EMAIL PROTECTED]
Sent: 03 December 2008 10:50
To: [email protected]
Subject: Searching the MIB tree
Hi,
Using the mib api, given a string containing the numerical form of an OID, I
need to get a list of it’s varbinds in text form.
I can see in the man pages for mib_api that there is a get_module_node that
will search for the given OID string, but in return it will give me just the
OID list, so I don’t really see any difference with read_objid or indeed how
this can help me, unless there is a function that taking the OID list will give
me the node…
I need something that will give me a pointer to the node of the tree that
contains that object, so I can then look at the varbind_list field.
Before I start coding a tedious routine to search the whole tree, is there
anything that would already do this?
Thanks in advance.
Daniel.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders