

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.net-snmp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AFAQ%3AMIBs_08</id>
		<title>Template:FAQ:MIBs 08 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.net-snmp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AFAQ%3AMIBs_08"/>
		<link rel="alternate" type="text/html" href="http://www.net-snmp.com/wiki/index.php?title=Template:FAQ:MIBs_08&amp;action=history"/>
		<updated>2026-06-18T12:44:25Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>http://www.net-snmp.com/wiki/index.php?title=Template:FAQ:MIBs_08&amp;diff=1630&amp;oldid=prev</id>
		<title>Dts12 at 22:55, 21 October 2006</title>
		<link rel="alternate" type="text/html" href="http://www.net-snmp.com/wiki/index.php?title=Template:FAQ:MIBs_08&amp;diff=1630&amp;oldid=prev"/>
				<updated>2006-10-21T22:55:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The Net-SNMP parser generally takes the first definition it sees for each&lt;br /&gt;
object in the MIB hierarchy.   Even if you specify your file to be read&lt;br /&gt;
first, if the IMPORTS clauses reference a MIB with competing objects,&lt;br /&gt;
those objects will be parsed first.&lt;br /&gt;
&lt;br /&gt;
When specifying the Replace MIB command-line option (&amp;lt;CODE&amp;gt;-PR&amp;lt;/CODE&amp;gt;), the parser&lt;br /&gt;
will use definitions sourced from the most recent MIB file.&lt;br /&gt;
The parser will replace MIB objects when the sub-identifier and name match.&lt;br /&gt;
&lt;br /&gt;
Caution: Using Replace MIB, there is NO guarantee that the resulting&lt;br /&gt;
MIB tree will be correct.  Other MIB objects matching the name but&lt;br /&gt;
not the sub-identifier will persist.  Sub-hierarchies may be reparented.&lt;br /&gt;
In particular, random access searching [see &amp;lt;CODE&amp;gt;man 1 snmpcmd&amp;lt;/CODE&amp;gt;]&lt;br /&gt;
may give unexpected result.&lt;br /&gt;
The Replace MIB option is experimental, buyer beware, carpe diem, etc.&lt;br /&gt;
&lt;br /&gt;
Here are a few considerations to help you obtain good results.&lt;br /&gt;
These hold true even if you never use the Replace MIB feature.&lt;br /&gt;
Your suggestions for improvement are welcomed.&lt;br /&gt;
&lt;br /&gt;
# The parser searches the specified directories and attempt to parse every file whose path does not begin with &amp;quot;.&amp;quot; (period). Remove (or rename) older MIB files from these directories. Rename &amp;quot;README&amp;quot; to &amp;quot;.README&amp;quot;, etc.&lt;br /&gt;
# Hint: the parser&amp;#039;s module list is in LIFO order. You may see better results if the directory with the most correct MIB files is specified last in the MIBDIRS environment.&lt;br /&gt;
# Constrain the parser to not read in default MIB files by setting the MIBS environmental variable to the appropriate separator character (semi-colon on win32, colon everywhere else). Setting this to &amp;quot;&amp;quot; may also have the same effect.&lt;br /&gt;
# The MIBFILES environment can specify the path of the new MIB file.&lt;br /&gt;
&lt;br /&gt;
Within a program, the call:&lt;br /&gt;
         /*  4.2.x  */&lt;br /&gt;
         ds_set_boolean(DS_LIBRARY_ID, DS_LIB_MIB_REPLACE, 1 | 0);&lt;br /&gt;
&lt;br /&gt;
or, if using the 5.0.x series code:&lt;br /&gt;
        /*  5.0.x  */&lt;br /&gt;
        netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,&lt;br /&gt;
                               NETSNMP_DS_LIB_MIB_REPLACE, 1 | 0);&lt;br /&gt;
&lt;br /&gt;
will enable or disable the Replace MIB feature respectively.&lt;br /&gt;
If you&amp;#039;re having problems loading a particular MIB file, this&lt;br /&gt;
call can be used to disable this feature, before using read_mib() to&lt;br /&gt;
load the required file, and then re-enabling the Replace MIB feature.&lt;br /&gt;
(or vice versa, as appropriate).&lt;/div&gt;</summary>
		<author><name>Dts12</name></author>	</entry>

	</feed>