mib2c
. This is designed to take a portion of the MIB tree
(as defined by a MIB file) and generate the code skeleton necessary to
implement this. This document will cover the use mib2c
,
as well as describing the requirements and functionality of the code
in more detail.
In order to implement a new MIB module, three files are necessary, and these will be considered in turn. Note that, by the very nature of the task, this document cannot cover the details of precisely how to obtain the necessary information from the operating system or application. Instead, it describes the code framework that is needed, freeing the implementer from needing to understand the detailed internals of the agent, and allowing them to concentrate on the particular problem in hand.
It may prove useful to examine some of the existing module implementations
and examples in the light of this description, and suitable examples will
be referred to at the appropriate points. However, it should be remembered
that the UCD agent seeks to support a wide variety of systems, often with
dramatically differing implementations and interfaces, and this is
reflected in the complexity of the code. Also, the agent has developed
gradually over the years, and there is often some measure of duplication
or redundancy as a result.
As the FAQ states, the official slogan of the UCD-SNMP developers is
The current implementation is non-obvious and may need to be improved.This document describes the ideal, straightforward cases - real life is rarely so simple, and the example modules may prove easier to follow at a first reading.
A note regarding terminology - the word "module" is widely used throughout this document, with a number of different meanings.
Anyway, enough waffle - on with the details: The three files needed are
Last modified: Wednesday, 01-Aug-2018 04:41:28 UTC
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.