Logo
Home page Net-SNMP

Archive Search:

Require all words?

Site Search:
Google
Net-SNMP Tutorial -- Toolkit

Net-SNMP Tutorial -- Toolkit


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:

FileDescription
Makefile A simple makefile used to build the projects
snmpdemoapp.cThe sample application code
asyncapp.cThe asynchronous application code
NET-SNMP-TUTORIAL-MIB.txtThe 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.

Sections

  1. Programming a simple application.
  2. Programming a asynchronous application.
  3. How to program a mib module to serve information described by an SNMP MIB, and how to compile it into the net-snmp snmpd agent.
  4. Compiling a mib module to be used as a dynamically loaded shared object.
  5. Writing a subagent program to attach to the master SNMP agent.
  6. Extend the agent using perl and the NetSNMP::agent perl module.
  7. Letting mib2c generate code for you.
    1. General Overview
    2. mib2c.mfd.conf tutorial

    Special Notes

  8. Using our header files in your own autoconf based package

Net-SNMP Users

Valid CSS!


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.