SNMP Manager Programmer's Guide

Introduction to Manager Services
SNMP Manager Programmer’s Guide134249
1-14
Defining Manager Logic
binding specification contains a numeric identifier for a MIB object known as an
instance identifier. The instance identifier consists of the object’s OID and a suffix,
used primarily to unambiguously identify objects that have multiple instances, such as
objects that are part of table entries.
Consider, for example, the interfaces group of MIB-II. It contains a scalar object
(ifNumber) and a table (ifTable) whose entries each consist of 22 objects:
iso (1)
org (3)
dod (6)
internet (1)
mgmt (2)
mib-II (1)
interfaces (2)
ifNumber (1)
ifTable (2)
ifEntry (1)
ifIndex (1)
ifDescr (2)
ifType (3)
.
.
.
ifSpecific (22)
The instance identifier of ifNumber is its OID with a suffix of 0, an SNMP convention
used to indicate that the object has only one instance:
1.3.6.1.2.1.2.1.0
The instance identifier of any object in an ifTable entry is the OID of the object with a
suffix identifying the value of the entrys index (the value of ifIndex, in this case). The
following instance identifier identifies the third instance of ifDescr:
1.3.6.1.2.1.2.2.1.2.3
Identifying a MIB object by name is easier for the user of a manager application than
identifying it by using an instance identifier. The user may be familiar with MIB object
names, or may know resources represented as MIB objects by some other name. Your
MIB handling logic in this case needs to map object names specified by the user to MIB
instance identifiers.
The MIB compiler provided with Manager Services provides some assistance for
handling MIB objects. Given a MIB file as input, the MIB compiler can generate output
useful as reference while coding MIB object handling logic. The MIB compiler can also
generate program-readable output you can use in your MIB handling logic to help
resolve names into instance identifiers.
Packet Handling and Transmission
Manager Services provides library functions and supporting data structures (defined in
header files) for constructing, encoding, and decoding request and trap packets.