3
Creating a Subagent Using the eSNMP API
This chapter describes how to use the eSNMP API to create a MIB subagent that
manages entities or applications. Topics included in this chapter are:
•
Creating a MIB specification (Section 3.1)
•
The structure of management information (Section 3.2)
•
Creating a MIB source file (Section 3.3)
•
Including the routines and building the subagent (Section 3.4)
•
Including your subagents in startup and shutdown procedures (Section 3.5)
Note
To use this eSNMP API to create a subagent, you must have a C compiler
running in your development environment.
3.1 Creating a MIB Specification
The creation of a management information base (MIB) begins with data
gathering. During this phase, the developer identifies the information to
manage, based on the entities that the network manager needs to examine and
manipulate. Each resource that a MIB manages is represented by an object.
After gathering the data, the developer uses Abstract Syntax Notation 1 (ASN.1)
to specify the objects in the MIB.
3.2 The Structure of Management Information
The structure of management information (SMI), which is specified in RFCs 1155
and 1902, describes the general framework within which a MIB can be defined
and constructed. The SMI framework identifies the data types that can be used
in the MIB and how resources within the MIB are represented and named.
SMI avoids complex data types to simplify the task of implementation and to
enhance interoperability. To provide a standard representation of management
information, the SMI specifies standard techniques for the following:
•
Defining the structure of a particular MIB
•
Defining individual objects, including the syntax and value of each object
•
Encoding object values
Creating a Subagent Using the eSNMP API 3–1