Chapter 15. IMPLEMENTING YOUR SNMP MIB

In this chapter we will implement the MIB we developed in Chapter 14 by writing an extension to the Net-SNMP agent to add support for the LAD-MIB. We'll cover the following topics:

  • The Net-SNMP Agent

  • The MIB skeleton: mib2c

  • The header file: ladProject.h

  • The code file: ladProject.c

  • Makefile revisited

  • Debugging

  • Traps

Remember that our goal is to implement a working SNMP agent that supports our MIB. When queried for the objects we have defined, the agent will respond with the current values of those objects. We will also be able to assign values to the objects we defined with read-write access. For example, we will be able to use the snmptable command to retrieve values from the Alarm table, as shown below. Don't be ...

Get Linux Appliance Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.