Creating A Mib Source File; Writing The Asn.1 Input File; Processing The Input File With The Mib Compiler - Compaq TCP/IP Services for OpenVMS Programming And Reference Manual

Tcp/ip services for openvms
Table of Contents

Advertisement

Normally, it is the nonleaf nodes that are registered as a subtree with the master
agent. However, leaf nodes, or even specific instances, can be registered as a
subtree.
The master agent delivers requests to the subagent that has the MIB subtree
with the longest prefix and the highest priority.

3.3 Creating a MIB Source File

Creating the MIB source file requires the following four-step process:
1. Write the ASN.1 input files, as described in Section 3.3.1.
2. Process the input files with the MIB compiler, as described in Section 3.3.2.
3. Compile and link the routines, as described in Section 3.4.
4. Include the subagent, as described in Section 3.5.

3.3.1 Writing the ASN.1 Input File

After you have assigned names and OIDs to all of the objects in the MIB, create
an ASN.1 source file using ASCII statements.
Providing information about ASN.1 syntax and programming is beyond
the scope of this guide. For more information about ASN.1 programming,
refer to one or more of the documents on this subject provided by the
International Organization for Standardization (ISO).
Instead of creating ASN.1 files yourself, you can create .MY files from existing
ASCII files (for example, from RFCs) by using the MIB-converter facility provided
with TCP/IP Services. This facility uses a UNIX
OpenVMS as well as on appropriately configured UNIX systems. For details
about the facility, see the MIB-CONVERTER.AWK file, which is located in
the [.SNMP] subdirectory of TCPIP$EXAMPLES. Standard .MY files are also
provided for your convenience.
The custom MIB definition files have the default extension .MY.

3.3.2 Processing the Input File with the MIB Compiler

Process your ASN.1 source files with the MIB compiler using the DCL command
MIBCOMP.
If you are familiar with processing on UNIX systems, you can use the
UNIX utilities
The compilation process produces two template C programming modules that
are used in building the executable subagent code. When you run the compiler,
specify all the ASN.1 source files for a given subagent. Whenever any of these
source files are updated, you must repeat the compilation process.
The syntax for the MIBCOMP command is as follows:
MIBCOMP MIB-source-file "subtree" [/PREFIX=prefix-name] [/PRINT_TREE] [/SNMPV2]
Creating a Subagent Using the eSNMP API
3.2 The Structure of Management Information
Note
Note
and
. See Section 3.3.2.1 for more information.
snmpi
mosy
Creating a Subagent Using the eSNMP API 3–5
script, which runs on
awk

Advertisement

Table of Contents
loading

Table of Contents