
Hi,
Is there an example in libsmi distribution kit (or elsewhere) how one could convert an object identifier from alphabetic representation to numeric representation? For example, convert "system.sysDescr.0" to "1.3.6.1.2.1.1.1.0" (assuming, of course, that relevant MIB module has been already loaded into libsmi).
Thank You,
Arie.
-- !! 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.

Arie Trost writes:
Arie> Is there an example in libsmi distribution kit (or elsewhere) Arie> how one could convert an object identifier from alphabetic Arie> representation to numeric representation? For example, convert Arie> "system.sysDescr.0" to "1.3.6.1.2.1.1.1.0" (assuming, of course, Arie> that relevant MIB module has been already loaded into libsmi).
There is no such example - probably because the libsmi authors really dislike this notation since it is (a) potentially ambiguous and (b) leads people to believe that the tree structure has more meaning than it actually has.
That said, it is of course possible to write such a translator. You basically lookup "system" and then you iterate over the child nodes looking for the next descriptor in the given path and so on.
/js
participants (2)
-
Arie Trost
-
Juergen Schoenwaelder