1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
23 HREF="net-snmp-ecos-port.html"><LINK
25 TITLE="Unimplemented features"
26 HREF="net-snmp-unimplemented-features.html"><LINK
29 HREF="net-snmp-agent-manpages-snmpd.conf.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="net-snmp-unimplemented-features.html"
65 >Chapter 47. SNMP for <SPAN
77 HREF="net-snmp-agent-manpages-snmpd.conf.html"
91 NAME="NET-SNMP-MIB-COMPILER">MIB Compiler</H1
96 >/snmp/agent/VERSION/utils/mib2c</TT
98 there are the following files:</P
106 CLASS="PROGRAMLISTING"
107 >README-eCos notes about running with a nonstandard
109 README.mib2c the README from UCD; full instructions on
111 mib2c the perl program
112 mib2c.conf a configuration file altered to include the
114 mib2c.conf-ORIG copyright and better #include paths; and
116 mib2c.storage.conf other config files, not modified.
117 mib2c.vartypes.conf</PRE
122 >mib2c is provided BUT it requires the SNMP perl package SNMP-3.1.0,
123 and that in turn requires perl nsPerl5.005_03 (part of
124 Red Hat Linux from 6.0, April 1999).</P
126 >These are available from the CPAN (“the Comprehensive
127 Perl Archive Network”) as usual;
129 HREF="http://www.cpan.org/"
131 >http://www.cpan.org/</A
133 and links from there. Specifically:</P
141 HREF="http://people.netscape.com/kristian/nsPerl/"
143 >http://people.netscape.com/kristian/nsPerl/</A
149 HREF="http://people.netscape.com/richm/nsPerl/nsPerl5.005_03-11-i686-linux.tar.gz"
151 >http://people.netscape.com/richm/nsPerl/nsPerl5.005_03-11-i686-linux.tar.gz</A
158 HREF="http://www.cpan.org/modules/01modules.index.html"
160 >http://www.cpan.org/modules/01modules.index.html</A
166 HREF="http://cpan.valueclick.com/modules/by-category/05_Networking_Devices_IPC/SNMP/"
168 >http://cpan.valueclick.com/modules/by-category/05_Networking_Devices_IPC/SNMP/</A
174 HREF="http://www.cpan.org/authors/id/G/GS/GSM/SNMP.tar.gz"
176 >http://www.cpan.org/authors/id/G/GS/GSM/SNMP.tar.gz</A
181 >(note that the .tar.gz files are not browsable)</P
183 >For documentation on the files produced, see the documentation
186 HREF="http://ucd-snmp.ucdavis.edu/"
188 >http://ucd-snmp.ucdavis.edu/</A
190 in general, and file <TT
195 >It is likely that the output of mib2c will be further customized
196 depending on eCos customer needs; it’s easy to do this
197 by editing the mib2c.conf file to add or remove whatever you need
198 with the resulting C sources.</P
200 >The UCD autoconf-style configuration does not apply to eCos.
201 So if you add a completely new MIB to the agent, and support it
202 using mib2c so that the my_new_mib.c file contains
203 a init_my_new_mib() routine to register
204 the MIB handler, you will also need to edit a couple of control
205 files; these claim to be auto-generated, but in the eCos release,
206 they’re not, don’t worry.</P
214 CLASS="PROGRAMLISTING"
215 >PACKAGES/net/snmp/agent/VERSION/include/mib_module_includes.h</PRE
220 >contains a number of lines like</P
228 CLASS="PROGRAMLISTING"
229 >#include “mibgroup/mibII/interfaces.h”</PRE
234 >so add your new MIB thus:</P
242 CLASS="PROGRAMLISTING"
243 >#include “mibgroup/mibII/my_new_mib.h”</PRE
254 CLASS="PROGRAMLISTING"
255 >PACKAGES/net/snmp/agent/VERSION/include/mib_module_inits.h </PRE
260 >contains a number of lines like</P
268 CLASS="PROGRAMLISTING"
275 >and so on; add your new MIB as follows:</P
283 CLASS="PROGRAMLISTING"
284 >init_my_new_mib(); </PRE
289 >and this should work correctly.</P
296 SUMMARY="Footer navigation table"
307 HREF="net-snmp-unimplemented-features.html"
325 HREF="net-snmp-agent-manpages-snmpd.conf.html"
335 >Unimplemented features</TD
341 HREF="net-snmp-ecos-port.html"