In the directory /snmp/agent/VERSION/utils/mib2c, there are the following files:
README-eCos notes about running with a nonstandard perl path. README.mib2c the README from UCD; full instructions on using mib2c mib2c the perl program mib2c.conf a configuration file altered to include the eCos/UCD mib2c.conf-ORIG copyright and better #include paths; and the ORIGinal. mib2c.storage.conf other config files, not modified. mib2c.vartypes.conf |
mib2c is provided BUT it requires the SNMP perl package SNMP-3.1.0, and that in turn requires perl nsPerl5.005_03 (part of Red Hat Linux from 6.0, April 1999).
These are available from the CPAN (“the Comprehensive Perl Archive Network”) as usual; http://www.cpan.org/ and links from there. Specifically:
PERL itself: http://people.netscape.com/kristian/nsPerl/
http://people.netscape.com/richm/nsPerl/nsPerl5.005_03-11-i686-linux.tar.gz
http://cpan.valueclick.com/modules/by-category/05_Networking_Devices_IPC/SNMP/
(note that the .tar.gz files are not browsable)
For documentation on the files produced, see the documentation available at http://ucd-snmp.ucdavis.edu/ in general, and file AGENT.txt in particular.
It is likely that the output of mib2c will be further customized depending on eCos customer needs; it’s easy to do this by editing the mib2c.conf file to add or remove whatever you need with the resulting C sources.
The UCD autoconf-style configuration does not apply to eCos. So if you add a completely new MIB to the agent, and support it using mib2c so that the my_new_mib.c file contains a init_my_new_mib() routine to register the MIB handler, you will also need to edit a couple of control files; these claim to be auto-generated, but in the eCos release, they’re not, don’t worry.
PACKAGES/net/snmp/agent/VERSION/include/mib_module_includes.h |
contains a number of lines like
#include “mibgroup/mibII/interfaces.h” |
so add your new MIB thus:
#include “mibgroup/mibII/my_new_mib.h” |
PACKAGES/net/snmp/agent/VERSION/include/mib_module_inits.h |
contains a number of lines like
init_interfaces(); init_dot3(); |
and so on; add your new MIB as follows:
init_my_new_mib(); |
and this should work correctly.