Tutorial xAgentBuilder

Tutorial – C++ SNMP Agent Studio – Visual xAgentBuilder® 9 for C++

The Visual xAgentBuilder® 9 evaluation demonstrates the speed and ease with which you can create an SNMP agent from a MIB file.

Open Microsoft Visual C++. (this page is for Visual Studio.NET, please click here for Visual Studio 6).

We will examine how to create an example agent with Visual xAgentBuilder 9 for C++ using the example MIB, NDGarage.mib packaged with the product.

  • Open the New Project dialog box.
  • Select the Visual xAgentBuilder 9 for C++ template.
  • Enter the Project name.

You should see the following window:


  • Click OK. The following window appears:


This wizard page describes the current application settings for the xAgentBuilder 9 project that you are creating.

If you want to use configuration parameters from the another xAgentBuilder 9 project, click on the Load settings … button and select the xAgentBuilder 9 configuration file.  After this action you can click Finish button, and the project will be created using loaded parameters.  Or, you can first adjust settings to fit your requirements.

  • Click Projects hyper-link.


In this step we can select the type of agent project that we want to create. By default both ExtensionDLL and Console is selected.  Static lib is grayed out and shown as selected.  The Static lib project is in fact the place where instrumentation will be created.  Both ExtensionDLL and Console projects simply add some “boiler plate” code and link to the static library. Further information is available in the “Understanding Projects and Files Created by Visual xAgentBuilder 9 for C++” topic in this applications help file.

If the HTML check box is selected (which is default) a set of web pages will be generated for this agent and web server code will be added to the agent code.

  • Click on the Proxy selection in the menu at the left of the window and following window should appear:


In this step you can select whether you want to add proxy support to the agent. Proxy support can only be added to the standalone agent, so standalone (Console) agent must be seleted in the previous step.  Code for the proxy will be added conditionally.  You can choose this option now, and later recompile your project with ND_SNMPv3_PROXY macro undefined to remove proxy support from the agent.

  • Click Subtrees hyper-link. The following two windows should appear:


Click w7load button and the Load MIB File dialog appears.  Select NDGarageV2.mib (in the Tutorial directory to access the NDGarage-MIB) and click OK.

  • Expand the tree by clicking the w7expand button.
    You should see the following window.


  • Drag the garage node from the tree to the Subtrees list box (as shown with red line).  If you made mistake and wish to remove a node from the list, select it and click on the Remove button.  Visual xAgentBuilder 9 for C++ should now look like this:


  • Click the Default Values hyper-link.  The following window appears.


Here you can select default values for the MIB objects that will be implemented in the agent.

  • Click the Finish button.  In a moment the project will be created:


  • Build the solution. Right click GarageEXE project and select “Set as StartUp Project“. Start the agent with F5 key.  The following should appear when
    you run it:


  • Use MIBrowser to interrogate the agent via SNMP, use Web Browser to view the agent through HTTP or type ‘?’ at the prompt to get a list of commands that you can use from command line to view/modify agent state and/or MIB objects.


Previous    Next

Introduction Visual MIBuilder Visual xAgentBuilder 9 Visual MIBrowser