SNMP Subagent Programmer's Guide
SNMP Subagent Programmer’s Guide—119728 3-1
3
Writing and Compiling MIBs
This section describes how to encode Management Information Bases (MIBs) and how 
to compile them using the MIB compiler, GDMOC (Guideline for Definition of 
Managed Objects Compiler).
Encoding MIBs
When you use SNMP, you define a MIB to model the information your subagent makes 
available for management. The manager views managed information as modeled in the 
MIB.
To create a MIB, you write a MIB definition. The MIB definition models each object 
managed by your subagent source code and each trap your subagent generates. In 
SNMP terminology, a managed object is called a “MIB object.” The MIB definition 
describes how your MIB objects are to be viewed from an SNMP manager perspective; 
it is independent of how you implement variables for MIB object values in your 
subagent.
To write a MIB definition, you use an extended version of the standard SNMP concise 
MIB conventions described in RFC 1155 and RFC 1212. For traps, you use the standard 
conventions described in RFC 1215. This subsection describes all the extensions in 
detail, and summarizes the standard syntax; extensions are highlighted in bold type. 
Refer to the RFCs for complete information about the standard components of MIB 
definitions.
A MIB definition has several components. 
MIB-definition-name
is a name you assign to your MIB definition.  
snmp-type-definitions
map the standard SNMP data types of your MIB objects to C data types. More 
information on this topic appears later in this section, under “SNMP Type 
Definitions.” 
object-name-definitions
uniquely identify your MIB in the SNMP name hierarchy.  Encoding conventions 
appear later in this section, under “Object Name Definitions.”
MIB-definition-name DEFINITIONS ::= BEGIN
snmp-type-definitions
object-name-definitions
MIB-object-definitions
[trap-definitions]
END










