4.5   MIB Tree

The MIB-II management information base (MIB) tree is defined in $WIND_BASE/target/src/snmpv1/agent/snmpMib2.c1 . The branches of the tree correspond to the components of the object identifiers naming the management objects. The sequence of components in an object identifier forms a path through the tree leading to a leaf on the tree.

Each internal node of the tree is defined by an instance of MIBNODE_T. Each leaf is defined by an instance of MIBLEAF_T.

Associated with each internal leaf is a list of the nodes and leaves descending from that node. This list is defined by an array of instances of MIBARC_T. Each list must contain at least one element.

WindNet SNMPv1/v2c provides several popular MIB definition files:

$WIND_BASE/target/src/snmpv1/mibs/*.mib
$WIND_BASE/target/src/snmpv1/agent/snmpMib2.mib

Use these files as templates to write your own MIBs. For more information on ASN.1 syntax and on MIB files in general, see the references listed in E. SNMP Reference List. For information on mibcomp, the MIB compiler, see A. The MIB Compiler User's Guide.


1:  mibcomp's output from snmpMib2.mib (using the -mib.c option ) is a C representation of the MIB data tree named snmpMib2.c, which we present complete with ties to method routines. See -mib.c.