2.2   Configuring VxWorks for Use with WindNet SNMPv1/v2c

Many WindNet SNMPv1/v2c facilities can be configured into VxWorks by defining the various configuration constants presented in this section. For a detailed discussion on different approaches to configuring WindNet SNMPv1/v2c, see 5. Configuring the WindNet SNMPv1/v2c Agent.

The default location of these INCLUDE options is the EXCLUDED FACILITIES section of the configuration file $WIND_BASE/target/config/all/configAll.h. To define them, move them to the INCLUDED FACILITIES section.


*   

NOTE: VxWorks is not SNMP-capable unless you reconfigure configAll.h and rebuild VxWorks as shown here.

For general information on configuring VxWorks, see the VxWorks Programmer's Guide: Configuration.

2.2.1   Standard Included Facilities

The constants INCLUDE_SNMPD and INCLUDE_MIB2_ALL, listed in Table 2-1, configure VxWorks for running an SNMP agent that offers all MIB- II services. These are the default services shipped with the WindNet SNMPv1/v2c agent; you must configure VxWorks

Table 2-1:  WindNet SNMPv1/v2c Configuration Constants


Constant
 
Facility Included
 

INCLUDE_SNMPD
 
SNMP agent
 
INCLUDE_MIB2_ALL
 
All MIB-II groups
 

to use these facilities by editing configAll.h as shown.

WindNet SNMPv1/v2c features agent scalability. If you desire a configuration other than the default, you can rebuild the SNMP agent to support only the wanted MIB-II groups. If you do not need all of the provided MIB-II variables, you can define a subset by including or excluding variables by group (see 5.1.2 Scalability and MIB-II Facilities).

Table 2-2:  MIB-II Facilities Constants


Constant
 
Facility Included
 

INCLUDE_MIB2_SYSTEM
 
MIB-II system group
 
INCLUDE_MIB2_IF
 
MIB-II interface group
 
INCLUDE_MIB2_AT
 
MIB-II AT group
 
INCLUDE_MIB2_IP
 
MIB-II IP group
 
INCLUDE_MIB2_ICMP
 
MIB-II ICMP group
 
INCLUDE_MIB2_UDP
 
MIB-II UDP group
 
INCLUDE_MIB2_TCP
 
MIB-II TCP group
 

The WindNet SNMPv1/v2c agent is shipped with a default configuration that includes all MIB-II groups. (Note that this does not automatically configure VxWorks for SNMP; to use SNMPv1/v2c with VxWorks, you must define INCLUDE_MIB2_ALL in configAll.h.)

Because WindNet SNMPv1/v2c is a scalable product, you can include or exclude from the agent any of the MIB-II groups defined by the constants listed in Table 2-2.

For information about MIB-II VxWorks system interface routines, see the manual entry for m2Lib in the VxWorks Reference Manual. For sample method-routine code which corresponds to the MIB groups mentioned in Table 2-2, see 4.2.2 $WIND_BASE/target/src/snmpv1/agent/.

2.2.2   Standard Configuration Definitions

Default values for the configuration and MIB-II system group variables listed in Table 2-3 are also provided in configAll.h.

Table 2-3:  WindNet SNMP Configuration Constants with Default Values


Constant
 
Default Value
 

MIB2_SYS_DESCR
 
"VxWorks SNMPv1/v2c Agent"
 
MIB2_SYS_CONTACT
 
"Wind River Systems"
 
MIB2_SYS_LOCATION
 
"Planet Earth"
 
MIB2_SYS_OBJID_LEN
 
2
 
MIB2_SYS_OBJID
 
{ 0, 0 }
 
SNMP_TRACE_LEVEL
 
0
 

The MIB-II system group variables defined in configAll.h initialize the MIB-II system group in the agent. Their values can be modified to customize the agent (see 5.1.3 Standard Configuration Definitions).

2.2.3   Enabling Agent Debugging

WindNet SNMPv1/v2c has the capability to trace message traffic and output this data as debugging information. To enable tracing on the agent, set the configuration constant SNMP_TRACE_LEVEL (in configAll.h) to indicate a level of verbosity, then rebuild VxWorks. For information on different message-tracing levels, see 5.1.3 Standard Configuration Definitions.

Once the tracing facility is operational, output messages appear on the target console window each time an SNMP message is received or transmitted.