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. -->
12 >Configuring eCos</TITLE
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="Starting the SNMP Agent"
26 HREF="net-snmp-starting-the-snmp-agent.html"><LINK
29 HREF="net-snmp-test-cases.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="net-snmp-starting-the-snmp-agent.html"
65 >Chapter 47. SNMP for <SPAN
77 HREF="net-snmp-test-cases.html"
91 NAME="NET-SNMP-CONFIGURING-ECOS">Configuring eCos</H1
93 >To use the SNMP agent, the SNMP library and agent packages must be
94 included in your configuration. To incorporate the stack into your
95 configuration select the SNMP library and SNMP agent packages in the
96 eCos Configuration Tool, or at the command line type:
108 >ecosconfig add snmplib snmpagent</B
116 >After adding the networking, common ethernet device drivers,
117 snmp library and snmp agent packages, there is no configuration
118 required. However there are a number of configuration options
119 that can be set such as some details for the System MIB, and
120 disabling SNMPv3 support (see below).</P
122 >Starting the SNMP agent is not integrated into network
127 started automatically in normal eCos startup -
128 it is up to the application to start the agent when it is ready,
129 at least after the network interfaces are both ‘up’.</P
135 NAME="NET-SNMP-VERSION-USAGE">Version usage (v1, v2 or v3)</H2
137 >The default build supports all three versions of the SNMP protocol, but without
138 any dispatcher functionality (rfc 2571, section 3.1.1.2). This has the
139 following implications :</P
141 > 1. There is no community authentication for v1 and v2c.</P
143 >2. Security provided by v3 can be bypassed by using v1/v2c protocol.</P
145 >To provide the dispatcher with rfc 2571 type functionality, it is required to
146 set up security models and access profiles. This can be provided in the normal
147 Unix style by writing the required configurations in <TT
151 file. Application code may setup profiles in <TT
155 optionally set the environment variable <TT
159 point to the file if it is not in the usual location. The whole concept works
160 in the usual way as with the standard UCD-SNMP distribution.</P
167 NAME="TRAPS">Traps</H2
169 >The support of the <TT
174 HREF="net-snmp-agent-manpages-snmpd.conf.html"
177 and there may be problems for it working as expected. Moreover, in systems that do not
178 have filesystem support, there is no way to configure a trap-session in the
181 >For reasons mentioned above, applications need to initialize their own trap
182 sessions and pass it the details of trap-sink. The following is a small sample
183 for initializing a v1 trap session :</P
191 CLASS="PROGRAMLISTING"
192 >typedef struct trap {
193 unsigned char ip [4];
195 unsigned char community [256];
199 unsinged char sink [16];
204 if (trapsink.ip != 0) {
205 sprintf (sink, "%d.%d.%d.%d",
206 trapsink[0], trapsink[1], trapsink[2], trapsink[3]);
207 if (create_trap_session (sink,
209 (char *)trapsink.community,
211 SNMP_MSG_TRAP) == 0) {
212 log_error ("Creation of trap session failed \n");
224 NAME="NET-SNMP-SNMPD-CONF"><TT
229 >Using snmpd.conf requires the inclusion of one of the file-system packages
230 (eg. CYGPKG_RAMFS) and CYGPKG_FILEIO. With these two packages included, the
231 SNMP sub-system will read the snmpd.conf file from the location specified in
235 >, or the standard builtin locations, and use
236 these profiles. Only the profiles specified in the <TT
241 HREF="net-snmp-agent-manpages-snmpd.conf.html"
244 been tested and shown to work. Other profiles which have been implemented in
252 because the sole purpose of adding support for the snmpd.conf file has been to
258 >At startup, the SNMP module tries to look for file <TT
262 If this file is not available, the module successively looks for files
272 >snmpd.local.conf</TT
273 > at the locations pointed to by <TT
276 > environment variable. In case <TT
279 > is not defined, the search sequence is carried out in default directories.
280 The default directories are :<TT
285 >/usr/local/share/snmp</TT
290 The configurations read from these files are used to control both, SNMP
291 applications and the SNMP agent; in the usual UNIX fashion.</P
293 >The inclusion of snmpd.conf support is enabled by default when suitable
294 filesystems and FILEIO packages are active.</P
302 SUMMARY="Footer navigation table"
313 HREF="net-snmp-starting-the-snmp-agent.html"
331 HREF="net-snmp-test-cases.html"
341 >Starting the SNMP Agent</TD
347 HREF="net-snmp-ecos-port.html"