SNMP Subagent Programmer's Guide

Encoding MIBs
3-2 119728SNMP Subagent Programmer’s Guide
Writing and Compiling MIBs
MIB-object-definitions
describe the characteristics of each object in your MIB.
scalar-object-definitions
describe scalar MIB objects. Encode scalar object definitions as described later
in this section, under “Scalar Object Definitions.
table-definitions
describe tabular MIB objects. Encode table definitions as described later in this
section, under “Table Definitions.
trap-definitions
describe any traps your subagent generates. Encoding conventions appear later in
this section, under “Trap Definitions.
You can also embed comments and GDMOC preprocessor directives in your MIB
definition, as the following subsection explains.
GDMOC Comments and Preprocessor Directives
Anywhere within your MIB definition, you can embed comments and GDMOC
preprocessor directives.
Comments
Precede information you want GDMOC to ignore with a double hyphen.
For example:
-- definition of my MIB:
myMibDefinition DEFINITIONS ::= BEGIN--My MIB definition name
...
Preprocessor Directives
You can use the following GDMOC preprocessor directives to control GDMOC
behavior when it compiles your MIB definition. Note, however, that these constructs
may not be recognized by MIB compilers on manager stations, so you need to remove
them before installing your MIB on a manager station.
scalar-object-definitions | table-definitions
-- information-to-be-ignored
#define | #else | #endif | #if | #ifdef | #ifndef |
#include