📄 x-mibcompout.html
字号:
STATIC MIBNODE_T ex1Objs_node = NODE("ex1Objs", ex1Objs_arcs); STATIC MIBARC_T ex1_arcs[] = { ARC(1, ex1Objs_node), END_OF_ARC_LIST }; STATIC MIBNODE_T ex1_node = NODE("ex1", ex1_arcs); LEAF_COMS( ex2Obj1_leaf, ex2Obj1_leaf_crs, "ex2Obj1", VT_NUMBER, RW, SCALAR, it_exists, get_ex2Obj1, set_ex2Obj1, std_next, (char *) &var_ex2Obj1, 0x0000, 0xDEADBEEF, 0xFF); LEAF_COMS( ex2Obj2_leaf, ex2Obj2_leaf_crs, "ex2Obj2", VT_STRING, RO, SCALAR, it_exists, get_ex2Obj2, null_set_proc, std_next, ((void *) 0), 0x0000, 0xDEADBEEF, 0xFF); STATIC MIBARC_T ex2Objs_arcs[] = { ARC(1, ex2Obj1_leaf), ARC(2, ex2Obj2_leaf), END_OF_ARC_LIST }; STATIC MIBNODE_T ex2Objs_node = NODE("ex2Objs", ex2Objs_arcs); STATIC MIBARC_T ex2Trap_arcs[] = { END_OF_ARC_LIST ; STATIC MIBNODE_T ex2Trap_node = NODE("ex2Trap", ex2Trap_arcs); STATIC MIBARC_T ex2Traps_arcs[] = { ARC(1, ex2Trap_node), END_OF_ARC_LIST ; STATIC MIBNODE_T ex2Traps_node = NODE("ex2Traps", ex2Traps_arcs); STATIC MIBARC_T ex2_arcs[] = { ARC(1, ex2Objs_node), ARC(2, ex2Traps_node), END_OF_ARC_LIST }; STATIC MIBNODE_T ex2_node = NODE("ex2", ex2_arcs); STATIC MIBARC_T examples_arcs[] = { ARC(1, ex1_node), ARC(2, ex2_node), END_OF_ARC_LIST }; STATIC MIBNODE_T examples_node = NODE("examples", examples_arcs); STATIC MIBARC_T wrs_arcs[] = { ARC(8, examples_node), END_OF_ARC_LIST }; STATIC MIBNODE_T wrs_node = NODE("wrs", wrs_arcs); STATIC MIBARC_T enterprises_arcs[] = { ARC(731, wrs_node), END_OF_ARC_LIST ; STATIC MIBNODE_T enterprises_node = NODE("enterprises", enterprises_arcs); STATIC MIBARC_T private_arcs[] = { ARC(1, enterprises_node), END_OF_ARC_LIST }; STATIC MIBNODE_T private_node = NODE("private", private_arcs); STATIC MIBARC_T internet_arcs[] = { ARC(1, directory_node), ARC(2, mgmt_node), ARC(3, experimental_node), ARC(4, private_node), END_OF_ARC_LIST }; STATIC MIBNODE_T internet_node = NODE("internet", internet_arcs); STATIC MIBARC_T dod_arcs[] = { ARC(1, internet_node), END_OF_ARC_LIST }; STATIC MIBNODE_T dod_node = NODE("dod", dod_arcs); STATIC MIBARC_T org_arcs[] = { ARC(6, dod_node), END_OF_ARC_LIST } STATIC MIBNODE_T org_node = NODE("org", org_arcs); STATIC MIBARC_T iso_arcs[] = { ARC(3, org_node), END_OF_ARC_LIST }; STATIC MIBNODE_T iso_node = NODE("iso", iso_arcs); STATIC MIBARC_T mib_root_arcs[] = { ARC(1, iso_node), END_OF_ARC_LIST }; MIBNODE_T mib_root_node = NODE("mib_root", mib_root_arcs);</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84057"><b class="command">-nametree</b> </a></i></h4></font><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="84058">mibcomp -nametree -o nametree.out example.mib</a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="83503"> </a>The <b class="command">-nametree</b> output mode generates C code that defines an array of C structures that an SNMP 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">-loadtree</b>, <b class="command">-numbers</b>, and <b class="command">-readtree</b> output modes. The only real difference is that this output format version is intended to be compiled into a manager.</p><dd><p class="Body"><a name="83504"> </a>This is a fairly old, experimental format, intended for possible use by a manager application. None of Wind River Systems' current code uses the code produced by this output mode.</p><dd><p class="Body"><a name="83508"> </a>Please also see the descriptions of the output modes <b class="command">-loadtree</b> (<a href="x-mibcompOut.html#83448"><i class="title">-loadtree</i></a>) and <b class="command">-readtree</b> (<a href="x-mibcompOut.html#83555"><i class="title">-readtree</i></a>).</p><dd><p class="Body"><a name="83512"> </a>Here is an example of <b class="command">mibcomp</b> output when given the <b class="command">-nametree</b> option:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="83513">/************************************************************************ ************************************************************************* **** This file was automatically generated by Wind River Systems' **** mibcomp SNMP MIB Compiler. **** This file was generated using the -nametree switch. **** **** This file contains a MIB tree for use by managers programs to **** translate from object IDs to names and back. **** **** 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 ****************************************************************************** ****************************************************************************** */ struct nametree { unsigned long number; struct nametree *parent; struct nametree *sibling; struct nametree *children; char *name; unsigned char type; }; extern struct nametree mibt[]; extern int mibt_entries; #if defined(C_CODE) struct nametree mibt[] = { /* asn # parent siblings children name type */ /* 0 */ { 1, 0, 0, &mibt[ 1], "iso", 0 }, { 3, &mibt[ 0], 0, &mibt[ 2], "org", 0 }, { 6, &mibt[ 1], 0, &mibt[ 3], "dod", 0 }, { 1, &mibt[ 2], 0, &mibt[ 4], "internet", 0 }, { 1, &mibt[ 3], &mibt[ 5], 0, "directory", 0 }, { 2, &mibt[ 3], &mibt[ 6], 0, "mgmt", 0 }, { 3, &mibt[ 3], &mibt[ 7], 0, "experimental", 0 }, { 4, &mibt[ 3], 0, &mibt[ 8], "private", 0 }, { 1, &mibt[ 7], 0, &mibt[ 9], "enterprises", 0 }, { 731, &mibt[ 8], 0, &mibt[ 10], "wrs", 0 }, /* 10 */ { 8, &mibt[ 9], 0, &mibt[ 11], "examples", 0 }, { 1, &mibt[ 10], &mibt[ 17], &mibt[ 12], "ex1", 0 }, { 1, &mibt[ 11], 0, &mibt[ 13], "ex1Objs", 0 }, { 1, &mibt[ 12], &mibt[ 16], &mibt[ 14], "ex1Obj1", VT_NUMBER }, { 1, &mibt[ 13], &mibt[ 15], 0, "one", 0 }, { 2, &mibt[ 14], 0, 0, "two", 0 }, { 2, &mibt[ 12], 0, 0, "ex1Obj2", VT_STRING }, { 2, &mibt[ 10], 0, &mibt[ 18], "ex2", 0 }, { 1, &mibt[ 17], &mibt[ 23], &mibt[ 19], "ex2Objs", 0 }, { 1, &mibt[ 18], &mibt[ 22], &mibt[ 20], "ex2Obj1", VT_NUMBER }, /* 20 */ { 1, &mibt[ 19], &mibt[ 21], 0, "one", 0 }, { 2, &mibt[ 20], 0, 0, "two", 0 }, { 2, &mibt[ 18], 0, 0, "ex2Obj2", VT_STRING }, { 2, &mibt[ 17], 0, &mibt[ 24], "ex2Traps", 0 }, { 1, &mibt[ 23], 0, 0, "ex2Trap", 0 }, }; int mibt_entries = sizeof(mibt)/sizeof(struct nametree); #endif /* CODE */</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="83515"><b class="command">-numbers</b> </a></i></h4></font><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="83516">mibcomp -numbers -o numbers.out example.mib</a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="83517"> </a>The <b class="command">-numbers</b> option generates a listing of every node in the MIB tree, along with each node's object identifier <b class="symbol_UC">OBJECT IDENTIFIER</b> and, if the node is a leaf, the SYNTAX of theMIB object that occupies this leaf. The <b class="command">-numbers</b> output is intended as a reference and as an aid in debugging; it is not intended for use as input to another program.</p><dd><p class="Body"><a name="83518"> </a>If you are looking for a machine-parsable representation of a MIB, please see the descriptions of the <b class="command">-readtree</b>, <b class="command">-loadtree</b>, and <b class="command">-nametree</b> output modes, in <a href="x-mibcompOut.html#83555"><i class="title">-readtree</i></a>,<a href="x-mibcompOut.html#83448"><i class="title">-loadtree</i></a>, and <a href="x-mibcompOut.html#84057"><i class="title">-nametree</i></a>, respectively.</p><dd><p class="Body"><a name="83528"> </a>Here is an example of <b class="command">mibcomp</b> output when given the <b class="command">-numbers</b> option:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="83529">; This file was automatically generated by Wind River Systems' ; <b class="command">mibcomp</b> SNMP MIB Compiler. ; Listing of MIB nodes and leaves generated using the -numbers switch. ; ; Last build date: Fri May 26 22:06:22 1995; from files: ; example1.mib, example2.mib, examples.ctl 1 iso NODE 1.3 org NODE 1.3.6 dod NODE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -