The demo_module_2 code example is provided to help you understand how to modify the code generated by the mib2c command to perform data retrieval from simple tables. The demo_module_2 code example is located by default in the directory /usr/demo/sma_snmp/demo_module_2.
The README_demo_module_2 file contains instructions that describe how to do the following tasks:
Generate code templates from a MIB that contains a simple table
Compile source files to generate a shared library object that implements a module
Set up the agent to dynamically load the module
Test the module with snmp commands to show that the module is functioning as expected
The demo_module_2 is set up to allow you to generate code templates me1FileTable.c and me1FileTable.h. You can then compare the generated files to the files demo_module_2.c and demo_module_2.h.
The mib2c utility generates me1FileTable.c, which contains the init_me1FileTable() function. You should compare this function to the init_demo_module_2() function in the demo_module_2.c file.