>>>>> On Wed, 20 Apr 2005 11:30:22 -0300, Fabio Margarido <[EMAIL PROTECTED]> 
>>>>> said:

Fabio> I'm developing a tool that automatically inserts the custom code from
Fabio> my company's applications into the stubs generated by net-snmp. This
Fabio> tool has to be really generic, so that it runs on any machine,
Fabio> regardless of the path where net-snmp was installed. When I'm parsing
Fabio> a private MIB, I figured I copy the MIB file to $HOME/.snmp/mibs and
Fabio> add it to the env variable MIBS, as it says in the documentation. My
Fabio> question is: what happens if there's another file with the same name
Fabio> (an older version of the same MIB, for instance) in the default MIB
Fabio> installation directory (like /usr/local/share/snmp/mibs)? What file
Fabio> will mib2c analyze, and what's the behavior when there are two files
Fabio> with the same name? Does anybody has a suggestion on how I should
Fabio> proceed to copy the private MIBs somewhere I can run the tools on them
Fabio> but knowing there won't be any conflicts?

MIBs are loaded from paths, which you can control with the MIBDIRS
environment variable.  But, to answer your question, it loads the
first MIB it can find and if there are conflicts it picks the one with
the highest precedence in the MIB path.  (~/.snmp/mibs should always
override /usr/local/share/snmp/mibs)

-- 
Wes Hardaker
Sparta, Inc.


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to