This page talks about developing applications and agents based on some simple example code. If you are new to SNMP agent developemnt, you might want to try letting mib2c generate code for you. There is an extensive tutorial on the MIBs for Dummies style of code generation here.
The examples found below should give you enough of a starting point to begin developing simple programs using the net-snmp libraries. Here are the files that we are going to talk about and generate:
File | Description |
---|---|
Makefile | A simple makefile used to build the projects |
snmpdemoapp.c | The sample application code |
asyncapp.c | The asynchronous application code |
NET-SNMP-TUTORIAL-MIB.txt | The MIB we'll be writing code for in the various pieces of the agent extension tutorial |
nstAgentModuleObject.h | The complied-in mib module's header file |
nstAgentModuleObject.c | The complied-in mib module's C source code |
nstAgentSubagentObject.h | The sub-agent's mib module header file |
nstAgentSubagentObject.c | The sub-agent's mib module's C source code |
example-demon.c | The main() code for the subagent demon we'll be writing |
nstAgentPluginObject.h | The plugin's mib module header file |
nstAgentPluginObject.c | The plugin's mib module's C source code |
Note: These demonstrations require net-snmp-5.0.1 or higher.
Last modified: Friday, 03-Jul-2020 23:07:48 UTC
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.