⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smi_config.html-lang=de.htm

📁 libsmi的使用手册及网站
💻 HTM
📖 第 1 页 / 共 2 页
字号:
amount of memory in case of applications that do not need thisinformation.</p><p>The <b>smiSetSeverity()</b> function allows to set the severityof all error that have name prefixed by <b>pattern</b> to the value<b>severity</b>.</p><p>The <b>smiLoadModule()</b> function specifies an additional MIB<i>module</i> that the application claims to know or an additionalfile path to read. Only after a module is made known through thisfunction, iterating retrieval functions and retrieval functionswithout fully qualified identifiers will return results from thismodule. <b>smiLoadModule()</b> returns the name of the loadedmodule, of NULL if it could not be loaded.</p><p>The <b>smiIsLoaded()</b> function returns a positive value ifthe module named <i>module</i> is already loaded, or zerootherwise.</p><p>The <b>smiGetPath()</b> and <b>smiSetPath()</b> functions allowto fetch, modify, and set the path that is used to search MIBmodules. <b>smiGetPath()</b> returns a copy of the current searchpath in the form "DIR1:DIR2:...", or NULL if no path is set. Theapplication should free this string if it is no longer needed.<b>smiSetPath()</b> sets the search path to <i>path</i>.</p><p>The <b>smiReadConfig()</b> function reads the configuration file<i>filename</i>. All global statements in the configuration fileand those statements with a tag (a &#8216;&#8216;tag:&#8217;&#8217; prefix) that matches the <b>tag</b> argument, ifpresent, are executed.</p><p>The <b>smiSetErrorHandler()</b> function allows to set acallback function that is called by the MIB parsers deviating fromthe builtin default error handler, that prints error messages tostderr. The error handler has to comply with the<b>SmiErrorHandler</b> function type. The <b>path</b>, <b>line</b>,<b>severity</b>, <b>msg</b>, and <b>tag</b> arguements carry themodule&#8217;s pathname, the line number within the module, theerror severity level, a textual error message, and a short errorname of the error being reported.</p></td></tr></table><a name="MODULE LOCATIONS"></a><h2>MODULE LOCATIONS</h2><table width="100%" border="0" rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="10%"></td><td width="89%"><p>The SMI library may retrieve MIB modules from different kinds ofresources. Currently, SMIv1/v2 and SMIng module files aresupported. If in an <b>smiLoadModule()</b> function call a moduleis specified by a path name (identified by containing at least onedot or slash character), this is assumed to be the exact file toread. Otherwise, if a module is identified by its plain modulename, the correspondant file (either SMIv1/2 or SMIng) is searchedalong a path. This path is initialized with/usr/local/share/mibs/ietf:/usr/local/share/mibs/iana:/usr/local/share/mibs/irtf:/usr/local/share/mibs/site:/usr/local/share/mibs/tubs:/usr/local/share/pibs/ietf:/usr/local/share/pibs/site:/usr/local/share/pibs/tubs. Afterwardsthe optional global and user configuration files are parsed for&#8216;path&#8217; commands, and finally the optional<b>SMIPATH</b> environment variable is evaluated. The&#8216;path&#8217; command argument and the environment variableeither start with a path separator character (&#8216;:&#8217; onUNIX-like systems, &#8216;;&#8217; on MS-Windows systems) to appendto the path, or end with a path separator character to prepend tothe path, or otherwise completely replace the path. The path canalso be controlled by the <b>smiGetPath()</b> and<b>smiSetPath()</b> functions (see above).</p><p>When files are searched by a given module name, they might haveno extension or one of the extensions &#8216;.my&#8217;,&#8216;.smiv2&#8217;, &#8216;.sming&#8217;, &#8216;.mib&#8217;, or&#8216;.txt&#8217;. However, the MIB module language is identifiedby the file&#8217;s content, not by its file name extension.</p></td></tr></table><a name="CONFIGURATION FILES"></a><h2>CONFIGURATION FILES</h2><table width="100%" border="0" rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="10%"></td><td width="89%"><p>SMI library configuration files read at initialization and ondemand by <b>smiReadConfig()</b> have a simple line orientedsyntax. Empty lines and those starting with &#8216;#&#8217; areignored. Other lines start with an optional tag (prepended by acolon), followed by a command and options dependent on the command.Tags are used to limit the scope of a command to those applicationsthat are using this tag.</p><p>The <b>load</b> command is used to preload a given MIB module.If multiple modules shall be preloaded, multiple <b>load</b>commands must be used.</p><p>The <b>path</b> command allows to prepend or append componentsto the MIB module search path or to modify it completely (see alsoMODULE LOCATIONS above).</p><p>The <b>cache</b> command allows to add an additional directoryfor MIB module lookup as a last resort. The first argumentspecifies the directory and the rest of the line starting from thesecond argument specifies the caching method, which is invoked withthe MIB module name appended if the module is found neither in oneof the regular directories nor in the cache directorybeforehand.</p><p>The <b>level</b> command sets the error level.</p><p>The <b>hide</b> command allows to tune the list of errors thatare reported. It raises all errors with names prefixed by the givenpattern to severity level 9. [Currently, there is no way to listthe error names. RTFS: error.c.]</p><p>Example configuration:</p><pre>  #  # $HOME/.smirc  # # add a private directory  path :/usr/home/strauss/lib/mibs # don&#8217;t show any errors by default  level 0 # preload some basic modules  load SNMPv2-SMI  load SNMPv2-TC  load SNMPv2-CONF # want to make smilint shout  smilint: level 8 # but please don&#8217;t claim about  # any names longer than 32 chars  smilint: hide namelength-32 tcpdump: load DISMAN-SCRIPT-MIB smiquery: load IF-MIB  smiquery: load DISMAN-SCRIPT-MIB</pre></td></tr></table><a name="FILES"></a><h2>FILES</h2><table width="100%" border="0" rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="10%"></td><td width="89%"><pre>${prefix}/etc/smi.conf    global configuration file$HOME/.smirc               user configuration file${prefix}/include/smi.h   SMI library header file/usr/local/share/mibs/     SMI module repository directory</pre></td></tr></table><a name="SEE ALSO"></a><h2>SEE ALSO</h2><table width="100%" border="0" rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="10%"></td><td width="89%"><p><b>libsmi</b>(3), <b>smi.h</b></p></td></tr></table><a name="AUTHOR"></a><h2>AUTHOR</h2><table width="100%" border="0" rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="10%"></td><td width="89%"><p>(C) 1999-2001 Frank Strauss, TU Braunschweig, Germany&lt;strauss@ibr.cs.tu-bs.de&gt;</p></td></tr></table></body></html></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -