The Agent Toolkit C Edition supports the WindRiver VxWorks 6.x real time operating system.
The configuration used for the agent porting is as follows
VxWorks operating system version: 6.6
Wind River System UDP stack version: BSD4.4
Wind River System version: The Wind River System includes Workbench 3.0 and operating system 6.6
Host Operating system : Windows XP + SP 2
It is also possible to port the agent generated using the Agent Toolkit C Edition with Wind River VxWorks installed in Linux or Solaris operating system.
Compiling and Running an Agent in Workbench IDE for VxWorks
When we compile the source code in VxWorks, we specify a word called
"target". The target is the type of the real operating system
(there are many serial numbers) or it may be a simulator. In this document
we specify the target type as "Simulator"
The user typically has to follow the following procedure:
Start Agent Compiler in Windows NT and open a new project. Load a MIB say RFC1213-MIB in the workspace dialog of the Agent Compiler.
Select Operating System as VxWorks in the General Settings tab of the Agent Compiler.
Deselect "Absolute path for Agent Root Directory" in General Settings tab of the Agent Compiler.
Generate the code for the MIB. The stub files will be generated under the <WebNMS>/C-Agent/projects/<ProjectName>/agent/stubs/rfc1213-mib directory.
Now, create a project in Workbench development environment as shown below
Creating a Project for a Downloadable Application
Start Workbench IDE of Wind River from Start menu -> Programs -> Wind River VxWorks -> Workbench 3.0
Specify the Workspace directory if required.
Click on File menu -> New -> Project in Workbench. This will popup a "New Project Wizard"
Select "VxWorks downloadable Kernel Module Project" under Wind River VxWorks 6.x
Click on Next button and specify the Project name (say rfc1213-mib), project path / directory where the project has to be created. It is usually most convenient to use the same name for the directory and project, but it is not mandatory
If the "Project Structure" option is asked, it can be left as it is. Click on Next button.
In the "Build Defaults" window, Make sure that the "Use Workspace defaults" option is selected. Click on Next button
Leave the "Build Support" window as it is and click on Next button.
In the "Build Specs" windows, all the available build specs (based on your BSP support) will be shown and all might be enabled by default.
Based on your Target BSP, choose the BSP that you want and un-select the rest. In our case, we have taken the Boad Support Package as SIMNTgnu
In the Build Target screen, specify the "Build Target Name" and "Build Output file name" if you wish to configure the same. Click Next button.
Verify your project settings and Click Finish
Make sure the Build Tool option has the value as "Linker" and click on Next.
In the Indexer screen, Click on "Enable Project Settings" if the source code needs to be indexed.
Click on Finish button.
This will create a new project in the Workbench Project Explorer.
Compiling and Building agent project files
In the Workbench, Select the newly created project under the "Project Explorer" tab,
Click the right button of the mouse and bring up the Context Menu. Select the "Import" option.
In the Import window, select the "File System" option under the "General" as the "Import Source" and click on Next button.
In the "Import File System" window, click on the Browse button and specify / select the agent project source files directory (where the *.c files has been generated. By default, it will be under "WebNMS/C-Agent/projects/<rfc1213-mib>/agent" directory.
Select the folders till the "src" directory which contains the C (*.c) files.
In the Project Explorer, select the project name and click the right button of the mouse to bring up the context menu
In the context menu, select "Properties".
In the Properties window, select "Build Properties" in the tree.
Go to Build Tools tab. In the command text area of the "Build Spec - Specific Settings" panel, add the following include directories before " %include% "
Include directories
|
-DVXWORKS -fsigned-char -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/main/include -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/system/include -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/utils/incude -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/stubs/<Mib-Module>/include -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/management/inlcude -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/management/inlcude/monitor -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/management/inlcude/timer |
If SNMP agent / adapter option is selected, add
|
-I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/snmp/include -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/snmp/include/cmu |
If the created SNMP agent project is of type SNMPv3, add
|
-I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/snmp/include/snmpv3 -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/snmp/include/snmpv3/acl -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/snmp/include/snmpv3/security |
If the agent is of type TL1 or TL1 Adapter option is selected in the Multi-Protocol Agent, then add
|
-I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/tl1/include -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/tl1/include/security |
If the agent is of type CLI or TL1 Adapter option is selected in the Multi-Protocol Agent, then add
|
-I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/cli/include -I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/cli/include/security |
In case of Multi-Protocol agent, if you have loaded the CCS (CLI command set) file during the stub code generation, then add
|
-I<WebNMS>/C-Agent/projects/<Project-Name>/agent/stubs/<ccs-file-name>/include/ |
If HTTP option is selected applicable only for Multi-Protocol agent
|
-I<WebNMS>/C-Agent/projects/<Project-Name>/agent/source/protocols/http/include |
To build a project with the default options, select the name of the project (in the Prject Explorer tab) and then select Build project from the context menu.
Any compiler errors or warnings include the name of the file, the line number, and the text of the error or warning text. Double-clicking the line containing the error message opens the file in the editor with a context pointer on the offending line. The error or warning text is also displayed in the status bar at the bottom of the Workbench window.
To force a rebuild of all project objects, select Rebuild All from the context menu (which performs a make clean before the build).
Before you can download and run an application, you must boot VxWorks on the target system, have access to a WindRiver registry, configure and start a target server. In our case the target is simulator. So configure the target system as simulator with IP address and with required properties.
You can download the output image to the BSP or to the target server by selecting the Project Excplorer tab -> Project name -> "Build Targets" -> "Full image" <project-name.out>, bring up the context menu and click on the Download option.
Start the Interpreter (shell) and type "sp StartAgent" in the prompt.
This agent will be started and you can see the log messages printed in the shell if you have enabled the Debugging option in the agent project. Alternatively, you can verify by executing the command "i" in the shell which show the list of tasks and threads spawned by the tasks running in the target system
Testing
To test the SNMP Agent / Adapter, Start MIB Browser application and load the RFC-1213 MIB.
Specify the IP Address of the target system and the port number as 161 in the MIB Browser.
You can go Get / Get-Next / Set operations to the agent.
To test the CLI / TL1 agent, start the command prompt / console in the host system.
Execute the following command
|
telnet <target-ip-address> <tcp / telnet port number> |
Where
TCP port number is 9099 and 2323 for TL1 and CLI agents respectively and
Telnet port number is 9090 and 2020 for TL1 and CLI agents respectively
Trouble Shooting
Compilation Error in "agent/source/system/include/config.h":
The reason is that the file will be generated from Agent Compiler based on the Agent Compiler configuration. For each configuration, for example if you enable "SNMPv3", the macro "#define SNMPV3" is added in this file. If any error occurs, please refer to the config.h header file.
Enabling "PRIVACY" Option in the Agent Compiler "Compile Options" Tab:
Since there are some restrictions on exporting this (AES / DES) software, we do not bundle it. If you compile the source files with "#define PRIVACY" in config.h header file, it will give compilation error. Please contact us at cagent-support@webnms.com for further details on how to add privacy support to your application.
|
|
Note: Craft Interface and SSH interface support is not available in VxWorks RTOS for both CLI and TLI agents |