
Hi!
Diego> i'm trying to do a program takes the oid of a trap and shows the Diego> information of that trap, name, description. how could i do this?
The general problem is to get a module&identifier out of an OID. Libsmi can solve this query only for the modules that have been loaded. If you know the set of MIB modules that contain all the required information, then smiLoadModule() all those modules, then smiGetNodeByOID() the SmiNode of each notification OID you receive, and walk through the varbinds.
Diego> i have don't the smiGetNodeByOID, when i print node->name, the only Diego> thing that i get is iso., i only get the first piece of the OID. What
How did you retrieve this `node'?
Diego> should i use to walk through?, i tried smiGetNextNode(node, Diego> node-> nodekind), but all i get is a seg fault.
Traversing the nodes is done by smiGetFirstNode()/smiGetNextNode().
If you get seg faults, your libsmi installation is probably not ok. Libsmi does not work smoothly, if you use non-correct modules or if required (including imported) modules are missing. Ensure to get this fixed by using smilint. As long as smilint signals severe errors, do not expect your own program to work correctly.
-frank -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.