SNMP Subagent Programmer's Guide
Writing and Compiling MIBs
SNMP Subagent Programmer’s Guide—119728 3-19
Compiling MIBs
The information in the GDMOC output file depends on the extensions you encode in
your MIB definition. Table 3-1 summarizes the dependencies between your extensions
and GDMOC behavior.
Section 4, “Writing Subagent Logic,” provides additional information about MIB object
variables, table registration, and next, locator, and access functions you can encode in
your subagent.
Table 3-1. Relationship Between MIB Extensions and GDMOC Behavior
Extensions GDMOC Behavior
None Assumes that all C variables in your subagent logic are
global variables that have the same name in C as the
name you provide in your MIB definitions.
If the object is a table, assumes that your subagent
registers each entry individually.
Generates all access methods for the object.
C_VARIABLE global-name Assumes that the object’s value is maintained in a global
C variable named as you specify in global-name.
Generates all access methods for the object.
C_STRUCT struct-name,
FIELD field-name
C_TYPE struct-name,
FIELD field-name
Assumes that the object’s value is maintained in the field
identified by field-name of a global C structure identified
by struct-name. This approach can be used for scalar
objects or for tables for which you register every entry.
Generates all access methods for the scalar object or
table.
C_ACCESS_FUNC Assumes that your subagent provides all access methods
for the object.
Generates calls to access functions provided by your
subagent.
C_LOCATOR_FUNC
C_NEXT_FUNC
Assumes that the object is a table for which your
subagent registers only the table, not individual rows.
Generates access methods that call the locator and next
functions your subagent provides.
C_LOCATOR_FUNC Assumes that the locator function provided by your
subagent should be called before any Get, GetNext, or Set
operations on the object are performed.
Generates access methods that call the locator function
your subagent provides.