SNMP Manager Programmer's Guide

Using the MIB Compiler
SNMP Manager Programmer’s Guide–134249
3-4
-readtree
generates an output file containing ASCII text describing MIB objects. The file can
be loaded at run time by a manager that can interpret the text format to perform
OID-to-name conversion and vice versa. Because the -readtree file is dynamically
read, changing its contents does not require manager recompilation. The following
example shows the -readtree output for the hrDevice group in the Host Resources
MIB:
$obj 1.3.6.1.2.1.25 host 0
$obj 1.3.6.1.2.1.25.3 hrDevice 0
$obj 1.3.6.1.2.1.25.3.1 hrDeviceTypes 0
$obj 1.3.6.1.2.1.25.3.1.1 hrDeviceOther 0
$obj 1.3.6.1.2.1.25.3.1.2 hrDeviceUnknown 0
$obj 1.3.6.1.2.1.25.3.1.3 hrDeviceProcessor 0
$obj 1.3.6.1.2.1.25.3.1.4 hrDeviceNetwork 0
$obj 1.3.6.1.2.1.25.3.1.5 hrDevicePrinter 0
$obj 1.3.6.1.2.1.25.3.1.6 hrDeviceDiskStorage 0
$obj 1.3.6.1.2.1.25.3.1.10 hrDeviceVideo 0
$obj 1.3.6.1.2.1.25.3.1.11 hrDeviceAudio 0
$obj 1.3.6.1.2.1.25.3.1.12 hrDeviceCoprocessor 0
$obj 1.3.6.1.2.1.25.3.1.13 hrDeviceKeyboard 0
$obj 1.3.6.1.2.1.25.3.1.14 hrDeviceModem 0
$obj 1.3.6.1.2.1.25.3.1.15 hrDeviceParallelPort 0
$obj 1.3.6.1.2.1.25.3.1.16 hrDevicePointing 0
$obj 1.3.6.1.2.1.25.3.1.17 hrDeviceSerialPort 0
$obj 1.3.6.1.2.1.25.3.1.18 hrDeviceTape 0
$obj 1.3.6.1.2.1.25.3.1.19 hrDeviceClock 0
$obj 1.3.6.1.2.1.25.3.1.20 hrDeviceVolatileMemory 0
$obj 1.3.6.1.2.1.25.3.1.21 hrDeviceNonVolatileMemory 0
$obj 1.3.6.1.2.1.25.3.2 hrDeviceTable 0
$obj 1.3.6.1.2.1.25.3.2.1 hrDeviceEntry 0
$obj 1.3.6.1.2.1.25.3.2.1.1 hrDeviceIndex VT_NUMBER
$obj 1.3.6.1.2.1.25.3.2.1.2 hrDeviceType VT_OBJECT
$obj 1.3.6.1.2.1.25.3.2.1.3 hrDeviceDescr VT_STRING
$obj 1.3.6.1.2.1.25.3.2.1.4 hrDeviceID
VT_OBJECT
$obj 1.3.6.1.2.1.25.3.2.1.5 hrDeviceStatus VT_NUMBER
$enum 1.3.6.1.2.1.25.3.2.1.5 unknown(1)
$enum 1.3.6.1.2.1.25.3.2.1.5 running(2)
$enum 1.3.6.1.2.1.25.3.2.1.5 warning(3)
$enum 1.3.6.1.2.1.25.3.2.1.5 testing(4)
$enum 1.3.6.1.2.1.25.3.2.1.5 down(5)
$obj 1.3.6.1.2.1.25.3.2.1.6 hrDeviceErrors VT_COUNTER
Lines beginning with $obj describe node and leaf objects. Lines beginning with
$enum describe enumerated values associated with an object. Comment lines begin
with a semicolon (;), and all fields are separated by one or more SPACE or TAB
characters.