On 14/02/2008, Roy M. Silvernail <[EMAIL PROTECTED]> wrote: > Is it possible, once a MIB module has been loaded, to access the > MODULE-IDENTITY tokens?
In general, no - most of the fields of the MODULE-IDENTITY definition are not retained. > Specifically, I'm looking for the DESCRIPTION > token from MODULE_IDENTITY. That's actually an exception, and *is* stored if you run the SNMP application using the flag -Pd > Nosing around in the tree returned by > netsnmp_read_module() doesn't show anything obvious. The relevant routine here is probably "parse_moduleIdentity()" (in the file 'snmplib/parse.c'). If you look at the code, you'll see that most of the fields are simply parsed and discarded. In general, the Net-SNMP MIB parser is relatively simple, and tends to concentrate on the core functionality (OID to name mapping, and type/range information). If you want to do anything serious with MIB file structure and information, it might be worth looking at the specialist "libsmi" package, which takes a much more complete/robust/strict approach. See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for details. Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
