Re: [libsmi] Retrieving Description

Jochen Friedrich jochen@scram.de writes:
However, i have a different (feature enhancement?) question. In GxSNMP, i'm currently drawing a GUI tree object for visually browing through the MIB. Here, i have the problem to connect each GUI leaf object with the SMI node it represents. Before OID was switched to the int[]/length pair, i just used the OID as handle representing the node. After the change, libsmi no longer provides some kind of handle to identify a node in a unique way. Would it be possible to add a handle to the node structure which can later be used to retrieve the node out of libsmi again?
Probably, I did not get your problem right. Anyway:
You can still use an OID string to retrieve node definitions by smiGetNode().
You should note, that an OID (either as int[] or char*) does only identify a node of the OID tree uniquely (which is nothing more, than the OID itself). It does not identify a struct SmiNode unambiguously, since it can be defined in multiple versions of the same module, or with non-registering definitions in multiple modules (e.g. the mib-2 node?) (see my recent answer to Diego's question).
Hence, if you wish to keep stuck with a definition you retrieved once, you should remember the module and name of that definition.
[Even a module name might be used for multiple modules, so that a module should be unambiguously identified by an OID. But this is not implemented in libsmi, and seems to keep theory.] -- !! 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.
participants (1)
-
Frank Strauss