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

📄 x-mibcompout.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 5 页
字号:
**** value of the VAL_xxx_yyy macro is the value associated with the **** named value. **** **** If the object's SYNTAX clause specified a set of range limitations **** for the value of the object, then there are one or more sets of **** MIN_xxx and MAX_xxx macros specifying the lower and upper bound of **** each range limitation. **** **** If the object's SYNTAX clause specified a set of size constraints **** for the value of the object, then there are one or more sets of **** MINSIZE_xxx and MAXSIZE_xxx macros specifying the lower and upper **** bound of each size constraint. (If the size constraint is a single **** value rather than a range then the MINSIZE_xxx and MAXSIZE_xxx **** macros are replaced by a single SIZE_xxx macro.) **** **** DO NOT MODIFY THIS FILE BY HAND. **** **** Last build date: Fri May 26 22:06:21 1995 **** from files: **** example1.mib, example2.mib, examples.ctl ************************************************************************* ************************************************************************* */  #define LEAF_ex1Obj1                        1 #define VAL_ex1Obj1_one                            1L #define VAL_ex1Obj1_two                            2L #define LEAF_ex1Obj2                            2 #define LEAF_ex2Obj1                            1 #define VAL_ex2Obj1_one                            1L #define VAL_ex2Obj1_two                            2L #define LEAF_ex2Obj2                            2</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="83448"><b class="command">-loadtree</b> </a></i></h4></font><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="83449">mibcomp -loadtree -o loadtree.out example.mib</a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="83450"> </a>The <b class="command">-loadtree</b> output mode generates a binary output file that a manager can use to look up object identifiers by name. This is essentially the same information that <b class="command">mibcomp</b> generates in the <b class="command">-nametree</b>, <b class="command">-numbers</b>, and <b class="command">-readtree</b> output modes. The only real difference is that this version is intended to be loaded at run-time by a manager that understands the binary format.</p><dd><p class="Body"><a name="83451"> </a>At present, Wind River Systems provides no tools that use this output format. </p><dd><p class="Body"><a name="83455"> </a>Please also see the descriptions of the output modes <b class="command">-readtree</b> (<a href="x-mibcompOut.html#83555"><i class="title">-readtree</i></a>) and <b class="command">-nametree</b> (<a href="x-mibcompOut.html#84057"><i class="title">-nametree</i></a>).</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="83460"><b class="command">-man</b> </a></i></h4></font><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="83461">mibcomp -man -o man.out example.mib</a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="83462"> </a>The <b class="command">-man</b> output mode generates a file of C code which declares two C variables per MIB variable. The first C variable is an array of <b class="symbol_UC">OIDC_T</b>, and is initialized to the object identifier ofthe MIB variable. If the MIB variable is named <b class="symbol_lc">fooBar</b>, this first C variable is named <b class="symbol_lc">ID_fooBar</b>. The second C variable is an integer, initialized to the length of the object identifier. If theMIB variable is named <b class="symbol_lc">fooBar</b>, this second C variable is named <b class="symbol_lc">len_fooBar</b>.</p><dd><p class="Body"><a name="83463"> </a>The array which stores the object ID has extra space for an instance identifier. In most cases <b class="command">mibcomp</b> can determine the maximum size ofthe instance identifier from the MIB, but there are two cases where the instance length is unbounded and this is not possible:</p></dl><dl class="margin"><p><ol class="List"><li value="1)"><a name="83464"> </a>For an index that includes an <b class="symbol_UC">OBJECT IDENTIFIER</b>, <b class="command">mibcomp</b> allocates 23 <b class="symbol_UC">OID</b> components for the instance.</li></ol></p><p><ol class="List"><li value="2)"><a name="83465"> </a>For an index that includes an <b class="symbol_UC">OCTET STRING</b> without a size constraint, <b class="command">mibcomp</b> allocates 65 <b class="symbol_UC">OID</b> components for the instance.</li></ol></p></dl><dl class="margin"><dd><p class="Body"><a name="83466"> </a>You can change these settings by using the <b class="command">-inst_oid_len</b> and <b class="command">-inst_str_len</b> options (see <a href="x-mibcomp.html#83422"><i class="title">A.&nbsp;The MIB Compiler User's Guide</i></a>). In both of these cases, <b class="command">mibcomp</b> writes a warning comment into the <b class="command">-man</b> output to remind you that the instance-length it used did not come from the MIB and thus may be incorrect.</p><dd><p class="Body"><a name="83470"> </a>The value of the length variable (<b class="symbol_lc">len_fooBar</b>) does not include the extra space for the instance identifier.</p><dd><p class="Body"><a name="83471"> </a>This is a fairly old, experimental format, intended for possible use by a manager application (hence the name <b class="command">man</b>). None of Wind River Systems' current code uses the code produced by this output mode.</p><dd><p class="Body"><a name="83472"> </a>Here is an example of <b class="command">mibcomp</b> output when given the <b class="command">-man</b> option:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="84029">/************************************************************************ ************************************************************************* **** This file was automatically generated by Wind River Systems' **** mibcomp SNMP MIB Compiler. **** This file was generated using the -man switch. **** **** This file contains C data structures representing ASN.1 object IDs. **** The -man.h switch generates a corresponding header file declaring **** these data structures for use in your program. **** **** DO NOT MODIFY THIS FILE BY HAND. **** **** Last build date: Fri May 26 22:06:21 1995 **** from files: **** example1.mib, example2.mib, examples.ctl ************************************************************************* ************************************************************************* */ #include &lt;h/snmp/asn1.h&gt;  OIDC_T ID_ex1Obj1[] = { 1, 3, 6, 1, 4, 1, 731, 8, 1, 1, 1, 0 }; unsigned int len_ex1Obj1 = 11;  OIDC_T ID_ex1Obj2[] = { 1, 3, 6, 1, 4, 1, 731, 8, 1, 1, 2, 0 }; unsigned int len_ex1Obj2 = 11;  OIDC_T ID_ex2Obj1[] = { 1, 3, 6, 1, 4, 1, 731, 8, 2, 1, 1, 0 }; unsigned int len_ex2Obj1 = 11;  OIDC_T ID_ex2Obj2[] = { 1, 3, 6, 1, 4, 1, 731, 8, 2, 1, 2, 0 }; unsigned int len_ex2Obj2 = 11;</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84031"><b class="command">-man.h</b> </a></i></h4></font><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="84032">mibcomp -man.h -o manh.out example.mib</a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="83477"> </a>The <b class="command">-man.h</b> output mode generates a C language header file corresponding to the C file generated by the <b class="command">-man</b> option, as described in <a href="x-mibcompOut.html#83460"><i class="title">-man</i></a>. This header file has <b class="symbol_lc">extern</b> declarations for each variable in the file produced by <b class="command">-man</b>.</p><dd><p class="Body"><a name="83481"> </a>This header file is also used by the file that <b class="command">mibcomp</b> generates whengiven the <b class="command">-array</b> switch. For details, see <a href="x-mibcompOut.html#83428"><i class="title">-array</i></a>.</p><dd><p class="Body"><a name="83485"> </a>Here is an example of <b class="command">mibcomp</b> output when given the <b class="command">-man.h</b> option:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="83486">/************************************************************************ ************************************************************************* **** This file was automatically generated by Wind River Systems' **** mibcomp SNMP MIB Compiler. **** This file was generated using the -man.h switch. **** **** This file contains declarations for C data structures containing **** representations of ASN.1 object identifiers. Running <b class="command">mibcomp </b>**** with the -man switch will produce the corresponding C file. **** **** DO NOT MODIFY THIS FILE BY HAND. **** **** Last build date: Fri May 26 22:06:22 1995 **** from files: **** example1.mib, example2.mib, examples.ctl ************************************************************************* ************************************************************************* */  #include &lt;h/snmp/asn1.h&gt;  extern OIDC_T ID_ex1Obj1[]; extern unsigned int len_ex1Obj1;  extern OIDC_T ID_ex1Obj2[]; extern unsigned int len_ex1Obj2;  extern OIDC_T ID_ex2Obj1[]; extern unsigned int len_ex2Obj1;  extern OIDC_T ID_ex2Obj2[]; extern unsigned int len_ex2Obj2;</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="83488"><b class="command">-mib.c</b> </a></i></h4></font><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="83489">mibcomp -mib.c -o mibc.out example.mib</a></b></pre><dl class="margin"><dd><div class="Indent"><a name="83970"> </a>or</div><br></dl><dd><pre class="Code"><b><a name="83971">mibcomp -o mibc.out example.mib</a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="83492"> </a>The <b class="command">-mib.c</b> output mode generates a file of C code which defines the MIB tree for a WindNet SNMPv1/v2c-based SNMP agent. This is the default <b class="command">mibcomp</b> output mode.</p><dd><p class="Body"><a name="83494"> </a>Each accessible object in the MIB tree must have several method routines associated with it. These associations are set with the <b class="symbol_UC">DEFAULT</b> keyword in MIB specifications. For more information, see <a href="x-mibcomp4.html#83573"><i class="title">The DEFAULT Keyword</i></a>.</p><dd><p class="Body"><a name="83498"> </a>Here is an example of <b class="command">mibcomp</b> output when given the <b class="command">-mib.c</b> option:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="84055">/************************************************************************ ************************************************************************* **** This file was automatically generated by Wind River Systems' **** mibcomp SNMP MIB Compiler. **** This file was generated using the -mib.c switch. **** **** This file contains a representation of a MIB tree suitable **** for use by a WindNet SNMPv1 agent. **** **** DO NOT EDIT THIS FILE BY HAND. **** **** Last build date: Fri May 26 22:06:22 1995 **** from files: **** example1.mib, example2.mib, examples.ctl ************************************************************************* ************************************************************************* */  #define _MIB 1 #include "example.h" #ifndef STATIC #define STATIC static #endif  STATIC MIBARC_T            directory_arcs[] = {                     END_OF_ARC_LIST };  STATIC MIBNODE_T            directory_node = NODE("directory",                     directory_arcs);  STATIC MIBARC_T            mgmt_arcs[] = {                     END_OF_ARC_LIST };  STATIC MIBNODE_T            mgmt_node = NODE("mgmt",                     mgmt_arcs);  STATIC MIBARC_T            experimental_arcs[] = {                     END_OF_ARC_LIST };  STATIC MIBNODE_T            experimental_node = NODE("experimental",                     experimental_arcs);  LEAF_COMS(        ex1Obj1_leaf, ex1Obj1_leaf_crs, "ex1Obj1",VT_NUMBER,                     RW, SCALAR, it_exists,                     get_ex1Obj1, set_ex1Obj1, std_next,                     (char *) &amp;var_ex1Obj1,                     0x0000, ((bits32_t) 0xFFFFFFFFL), 0x1F);  LEAF_COMS(        ex1Obj2_leaf, ex1Obj2_leaf_crs, "ex1Obj2", VT_STRING,                     RO, SCALAR, it_exists,                     get_ex1Obj2, null_set_proc, std_next,                     (char *) &amp;var_ex1Obj2,                     0x0000, ((bits32_t) 0xFFFFFFFFL), 0x1F);  STATIC MIBARC_T            ex1Objs_arcs[] = {                     ARC(1, ex1Obj1_leaf),                     ARC(2, ex1Obj2_leaf),                     END_OF_ARC_LIST }; 

⌨️ 快捷键说明

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