SNMP Subagent Programmer's Guide
Writing and Compiling MIBs
SNMP Subagent Programmer’s Guide—119728 3-17
Encoding MIBs
REFERENCE "reference-text"
is an optional clause for documenting the relationship between this trap definition
and a trap definition appearing elsewhere.
trap-number
is an integer that uniquely identifies the trap within the management enterprise
named in the ENTERPRISE clause.
Example
The EMS Trap MIB, provided by Tandem, has a trap definition that looks like this:
emsMessage TRAP-TYPE
ENTERPRISE snmpagent
VARIABLES { trapSSID,
trapEventNumber,
trapContentStandard,
trapSubject,
trapProcess,
trapGenerationtime,
trapCritical,
trapText }
DESCRIPTION "A generic format for an EMS event."
::= 0
Isolating Standard Definitions
You may want to keep the standard encoding separate from the extensions, since some
managers can compile only concise MIB constructs. Refer to the documentation
provided with individual managers to determine their specific MIB setup requirements.
There are several approaches you can use to isolate standard definitions from the
extensions. One approach is to encode extensions at the end of your MIB definition.
Alternatively, you can encode the extensions in a file that includes the standard concise
MIB definitions. This approach minimizes the changes that might be required when
SNMP-type-definitions
MIB-name DEFINITIONS ::=BEGIN
object-name-definitions
MIB-object-definitions
[trap-definitions]
END
EXTEND OBJECT-TYPE MIB-object-name
WITH extensions
IN C