Solaris System Management Agent Developer's Guide

demo_module_1 Code Example for Scalar Objects

The demo_module_1 code example is provided to help you understand how to modify the code generated by the mib2c command to perform a scalar data retrieval. The demo_module_1 code example is located by default in the directory /usr/demo/sma_snmp/demo_module_1.

The README_demo_module_1 file contains instructions that describe how to perform the following tasks:

The demo_module_1 is set up to allow you to generate code templates me1LoadGroup.c and me1LoadGroup.h. You can then compare the generated files to the files demo_module_1.c and demo_module_1.h. The mib2c utility generates me1LoadGroup.c, which contains the init_me1LoadGroup() function. You should compare this function to the init_demo_module_1() function in the demo_module_1.c file.

The demo_module_1.c and demo_module_1.h files have been modified appropriately to retrieve scalar data. You can use these files as a model for learning how to work with scalar data in your own module. The instructions then explain how to compile the modified source files to create a functioning module.