Solaris System Management Agent Developer's Guide

Modifying Code Templates

The code templates that are generated by mib2c include code that registers the OIDs for the MIB data and handles the requests for the data. The init_module routine in the mibnode.c template provides the basic code for data retrieval. You must modify the templates to provide the data collection and data management, or instrumentation, of your module. See init_module Routine for information about modifying the initialization routine.

The following table shows where to find more information about how to do various types of data collection.

Table 2–2 Data Collection Documentation

Type of data 

Reference 

Scalar objects 

Scalar Objects

Simple tables 

Simple Tables

General tables 

General Tables

Long running 

Chapter 8, Long–Running Data Collection