
Hi!
Becky> smidump requires that a MIB's filename be the same as its Becky> module name. While I have no issue with this I have heard Becky> others complain about having to change their file names. I am Becky> hoping to get an explanation/opinion that I can pass along as Becky> to why this is required and what problem(s) it prevents.
If your intention is to check a module file using smilint or to compile a module file using smidump, there is no need for the filename to be equal to the module name. Example:
$ mv IEEE802dot11-MIB xx $ smidump -f identifiers ./xx | head -10 smidump: module `./xx' contains errors, expect flawed output # IEEE802dot11-MIB list of identifiers (generated by smidump 0.2.17)
IEEE802dot11-MIB WEPKeytype IEEE802dot11-MIB ieee802dot11 1.2.840.10036 IEEE802dot11-MIB dot11smt 1.2.840.10036.1 IEEE802dot11-MIB dot11StationConfigTable 1.2.840.10036.1.1 IEEE802dot11-MIB dot11StationConfigEntry 1.2.840.10036.1.1.1 IEEE802dot11-MIB dot11StationID 1.2.840.10036.1.1.1.1 IEEE802dot11-MIB dot11MediumOccupancyLimit 1.2.840.10036.1.1.1.2 IEEE802dot11-MIB dot11CFPollable 1.2.840.10036.1.1.1.3
On the other hand, if you maintain a number of modules in a repository (like /usr/local/share/mibs/{ietf,iana,...} with a standard libsmi installation) then libsmi has to know how to lookup a given module. The obvious mapping is indeed a 1:1 mapping, i.e. naming the files by the module names.
But most likely your simple problem is, that adapted from the example above, this does not work as you expect:
$ ls -l xx $ smidump -f identifiers xx smidump: cannot locate module `xx'
The answer to this behaviour is, that if a given module argument does not look like a pathname (not containing a dot or a slash), then libsmi looks for the module file in a given set of configured directories (by the SMIPATH environment variable or by a configuration file). RTFM for the details (smi_config(3), Section `MODULE LOCATIONS').
-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.