SNMP Subagent Programmer's Guide
Writing and Compiling MIBs
SNMP Subagent Programmer’s Guide—119728 3-7
Encoding MIBs
encoding is kept separate from the extensions are discussed later in this section, under
“Isolating Standard Definitions.”
scalar-object-name
is a logical name for the MIB object. By convention, OBJECT-TYPE names are
encoded with an initial lowercase letter:
myObject OBJECT-TYPE
SYNTAX abstract-syntax
assigns a standard SNMP data type to the MIB object. The value of abstract-syntax
can be one of these.
range
is encoded as follows.
size
is encoded as follows.
string-size
is encoded as follows.
scalar-object-name OBJECT-TYPE
SYNTAX abstract-syntax
ACCESS object-access
extensions
STATUS support-type
[DESCRIPTION "object-description"]
[REFERENCE "cross-reference"]
[DEFVAL "{"default-value"}"]
::= "{"object-name"}"
INTEGER range | Counter | Gauge | TimeTicks | IpAddress |
OCTET STRING size | DisplayString size |
OBJECT IDENTIFIER | Opaque | PhysAddress
(number [..number ... | number ...]) | empty
(SIZE string-size) | empty
number [..number]