Home
About NuDesign
Sales
Support
Eval Download
Partners
Testimonials
SNMP Links
Tutorials
News

Frequently Asked Questions

 

Visual xAgentBuilder® for C++
  1. My application is in C, can I benefit from your C++ Agent?,
  2. How do I account for changes in my MIB file?  For example, I use C++ Agent Studio to generate source code to implement my MIB file.  However, later I need to add more OIDs to my MIB file.  How does C++ Agent Studio handle this scenario?
  3. It looks like C++ Agent Studio generates source code for a single MIB file only.  I plan to write a single extension agent that supports 3 MIB files.  How does C++ Agent Studio handle this scenario?
  4. Your support terms indicate that the Annual Support Contract include 10 support incidents. What happens after these are used up?
  5. Agent, when started with the network interface disconnected, refuses to respond even after network connection re-established.
  6. I have successfully built a standalone agent but it does not respond to SNMP requests with large number of varbinds in the pdu.
  7. I have successfully built a standalone agent and run it. But when sending a request to the agent, the request always times out.
  8. I have successfully built a standalone agent, but when started it prints the following message and quits:
Failed to initialize transport. Reason: Winsock error 10048 (WSAEADDRINUSE)?
  9. What is TEP?
  10. How many TEPs (i.e. sockets) will be created by BUdpTransport's Initialize?
  11. How do I send Traps and Notifications from xAgentBuilder built SNMP agent?
  12. How do I send Trap/Informs to specific target (I want to avoid configuration tables)?
  13. What files need to be shipped with my agent and extension agent?
  14. I don't see a "NuDesign Visual xAgentBuilder® for C++" wizard in my Visual C++?
  15. Where can I get an enterprise number for my organization?
  16. It seems that not all properties of the Mib-2 snmp branch are implemented.

 

NuDesign SNMP Agent Service for Microsoft Windows
  1. Known problems and workarounds.

 

Visual MIBrowser®
  1. Known problems and workarounds.
  2. How can I receive traps in this application?
  3. What is the limitation on the Evaluation version?
  4. Can I configure MIBrowser® to "remember" different configurations?
  5. Can I detect alarm conditions with MIBrowser®?
  6. Can I specify a query that can be used with more than one agent?
  7. How can I notify someone of an alarm condition with MIBrowser®.
  8. Where can I get copies of MIBs for inclusion or as example code?.

 

Visual MIBuilder®
  1. How do I know which edit mode (SMI v1 or SMI v2) I am in?
  2. How do change the edit mode?
  3. Does this product support SNMPv3?
  4. Does this product support SNMP v1/v2?
  5. Do I always have to start from the 'enterprise' node?
  6. What is the limitation on the Evaluation version?


Visual xAgentBuilder® for C++



1.

Q:

My application is in C, can I benefit from your C++ Agent?

 

A:

Yes, the only real issue in this regard is C++ support in user’s C development environment.  Does the compiler support it?  Usually, yes and this is all that’s required for embedded RTOS environments already supported by NuDesign.

You can easily reference your MIB instrumentation "C" code from within our C++ wizard generated code.  Though a little trickier, you can also reference our C++ interfaces from within your "C" code.

For referencing your "C" code, for example to determine a value for a 'GET', you link your code with ours and refer to the function or variable as you normally would from "C".  In some compilers and environments, you may need prefix the "C" name with double colons ("::").  For example if a "C" function name is "getMeAValue()", then you may need to reference it as "::getMeAValue()".  In all C++ environments, this notation should be permitted so it's probably advisable just to always use it.

For referring to our code from within "C" you need to create a "C" callable API function on a case by case basis, to reference whatever is required in our code (for example Persistent Storage), from a small C++ module.  The "C" callable function simply needs to be declared from within a special "extern" construct for doing so.  An example of the construct is as follows....

extern "C" {
/*
a small interface function
*/
int performNudesignCall1 ( int param1 )
{
int retVal;
// access NuDesign C++ code here...
retVal = YYYYY.XXXXX();
// where XXXXX is the name of the NuDesign method
// and YYYYY is a object instance.
return retVal;
}
}

From within your "C" code, you'd just call the performNudesignCall1() function as required.

  Back to Top

2.

Q:

How do I account for changes in my MIB file?  For example, I use C++ Agent Studio to generate source code to implement my MIB file.  However, later I need to add more OIDs to my MIB file.  How does C++ Agent Studio handle this scenario?

 

A:

There are a number of relatively straight forward techniques to minimize the impact of changes to a MIB during development.  A few of these are:

  • First, recognize that the wizard produces subagents and that from a single (or multiple) MIB(s), multiple subagents can be produced and loaded into the "master" agent.  Typically subagents are created by selecting various branches within the MIB that represent different areas of instrumentation and producing a subagent to handle each.  By partitioning the agent, it minimizes the likelihood that a change in one subagent will affect another subagent.  Similarly if a new branch is added to the MIB, a new subagent project can be created for it without affecting existing project, incorporating it into the product at the link phase for a static subagent or at load time with a dynamic subagent.
  • As each new project is created, place the generated code for each subagent under a revision control system.  If a change is required to the code, the difference analysis tool from the revision control software gives a clear view of what differences the newly generated code have introduced, so that this may be applied to the development project.  You'll find that with even limited experience with the code produced and given the highly structure nature of the code, you'll quickly be able to work through changes introduced by a MIB change manually.
  • We recommend that you define a software interface layer from our code to your instrumentation code.  The interface could be designed so that it is limited to perhaps a single method call from each of OnGet or OnSet methods, to your code.  This way if a new sub agent needs to be generated, the impact will be limited to cutting and pasting a single method call in each of our methods.  This is particularly helpful when implementing the same agent on multiple platforms where instrumentation is liable to be platform specific.  In essence, you can create platform specific "libraries" of instrumentation, with the core agent code remaining the same for all platforms.

The primary goal of our tools is to get development underway with a minimum of delay due to learning curve issues and to minimize the time introduced to a project by performing time consuming, error prone activities.  In our experience learning curve for a new technology can be a lengthy process with many SNMP development technologies, particularly when multiple platform support is a requirement, since each platform often involves learning about different SNMP development technologies.  Out product spans multiple platforms and the generated code and technology is the same for each platform.

  Back to Top

3.

Q:

It looks like C++ Agent Studio generates source code for a single MIB file only.  I plan to write a single extension agent that supports 3 MIB files.  How does C++ Agent Studio handle this scenario?

 

A:

In fact the Studio does support multiple mib files.  You need to load the mibs and then choose the node/branch from which you want to generate the code.  The mibs can be loaded in the Step 4 of the wizard.  The toolbar has three buttons.  The first button will allow you to load a mib into the project.  It maybe that you have to load the mibs one at a time.

 

Back to Top

4.

Q:

Your support terms indicate that the Annual Support Contract include 10 support incidents.  What happens after these are used up?

 

A:

So far we have not refused anyone because their ten support incidents are up.  This is put in place to save us from a barrage of questions.  We are happy if you are working with our product.  And most times these questions help us in improving the product either by adding newer features or improving the documentation.

 

Back to Top

5.

Q:

Agent, when started with the network interface disconnected, refuses to respond even after network connection re-established.

 

A:

Symptom:

If the standalone (console) SNMP agent created by xAgentBuilder is started when the network cable is disconnected, it will no longer accept SNMP packets from that interface even after the link is restored.  This problem is fixed in xAgentBuilder revision 5.0 and greater.

 

 

Problem:

When agent is started it creates (and binds) socket for each active network interface, i.e. using explicit IP addresses reported by WinSock.  Restoring the link that was initially disconnected does not affect set of sockets known by agent.

 

 

Workaround:

In main.cpp replace:

        int err = transport.Initialize(161);
with:

        BAddress addr[2];
        tUint8 teType[2];

        BAddrINet inetAddr;
        inetAddr.SetPort(161);
        addr[0] = inetAddr;
        teType[0] = TETYPE_RECV;

        addr[1].SetFamily(ADDRESS_FAMILY_INET);
        teType[1] = TETYPE_SEND;

        int err = udpTransport.Initialize(addr, teType, 2);

 

Back to Top

6.

Q:

I have successfully built a standalone agent but it does not respond to SNMP requests with large number of varbinds in the pdu.

 

A:

The probable cause of this behaviour is the size of the maximum SNMP message size that the agent is initialized to handle.

The xAgentBuilder created, standalone agent, defines an instance of the BUdpTransport class, transport, as follows :

BUdpTransport transport;

When not specified, the first parameter for the BUdpTransport constructor is "int maxMsgSize" which has a default value of 2048.

In order to set a new maximum message size, the user could specify a parameter instead.

For example:

BUdpTransport transport(8192);

creates a BUdpTransport transport object which will support a maximum message size of 8KB.

The Initialize method of the BUdpTransport class will adjust the size specified in the constructor to the maximum message size supported by WinSock if that value is lower. For example, if you specify 100000 as the parameter to the constructor, after the Initialize method is called, the actual maximum message size will be set to 65535 which is the maximum message size supported by Winsock.

To check the maximum message size, call the GetMaxMsgSize method. Note that GetMaxMsgSize returns ZERO when called before Initialize method is successfully executed.

 

Back to Top

7.

Q:

I have successfully built a standalone agent and run it. "But when sending a request to the agent, the request always times out."  This problem has been fixed on version 5.0 and greater.

 

A:

The agent reads configuration from a file. The name of the configuration file (<project-name>.XNV) is specified in the line:

BFileNV nvParams("<project-name>.XNV");

The agent (through the nvParams objects) will open the file in the current working directory. If it is missing, an empty one was created. An empty configuration file implies that the agent should drop any packet received.  xAgentBuilder generates the .XNV file with a default configuration and places it in the project directory.  Copy that file into the same directory as your executable, or make a change in the line above to point to the correct location of the file.

Also, note that when you shutdown the agent (by entering "q" at the prompt) it saves the current configuration to the file. Make sure to stop the agent before copying this file from the project directory to the directory where your executable resides.

 

Back to Top

8.

Q:

I have successfully built a standalone agent, but when started it prints the following message and quits:

Failed to initialize transport. Reason: Winsock error 10048 (WSAEADDRINUSE)?

 

A:

The agent accesses the underlying transport through an ITransport derived object.  xAgentBuilder provides a UDP transport class built on top of WinSock.  Here is an excerpt from the generated code where the transport object is created and initialized.

BUdpTransport transport;
int err = transport.Initialize(161);
if (err != X_NO_ERROR)
{

cout << "Failed to initialize transport. Reason: " <<
transport.GetLastError() << endl;
exit(-1);
}

As you can see, the generated agent will try to listen on port 161.  If the another application (probably another SNMP agent) is already using that port, the Initialize method of the BUdpTransport will fail and the above message will be printed.

 

Back to Top

9.

Q:

What is TEP?

 

A:

TEP stands for Transport End-Point. In other words: socket.

 

Back to Top

10.

Q:

How many TEPs (i.e. sockets) will be created by BUdpTransport's Initialize?

 

A:

BUdpTransport is versatile class.  It allows user to fine tune number of sockets to be open for the SNMP entity (agent/manager) and also to dedicate specific sockets to work only for selected subsystem (subsystems are: command responder, notification originator, notification receiver, command generator and proxy forwarder).

Here is the example. Assume that SNMP entity has commandResponder and notificationReceiver.  It does not have any request generating subsystem (cmdGenerator, or notifOriginator or proxyForwarder).  User wants to dedicate 161 to cmdResponder and 162 to notifReceiver.

BUdpTransport transport;

tUint16 port[2] = { 161, 162 };
>tUint8 teType[2] = { TETYPE_CMDRESP, TETYPE_NOTIFRECV };

// [0] 161, TETYPE_CMDRESP, -> messages received on this port
// will be passed to cmdResponder
// [1] 162, TETYPE_NOTIFRECV, -> messages received on this
// port will be passed to notifReceiver

transport.Initialize(port, teType, 2);

// NOTE: no socket will be created for outgoing messages

For more examples, please download sample application.

 

Back to Top

11.

Q:

How do I send Traps and Notifications from an xAgentBuilder built SNMP agent?

 

A:

Here is the example of sending a coldStart notification (assume agent is instance of the BSnmpAgent class):

agent->notifOrig.Notify(eSNMPv1Trap_ColdStart);

As you can see, a single line is enough to perform the notification sending operation.  But where the traps will be sent?  The answer lies in configuration tables.  Please consult Lessons 7 and 9 in the Tutorials in xAgentBuilder's help for the examples.

 

Back to Top

12.

Q:

How do I send Trap/Informs to specific a target (I want to avoid configuration tables)?

 

A:

BSnmpNotifOriginator class implements the notification originator subsystem of the SNMP agent and manager.  Both the BSnmpAgent and BSnmpManger classes have the member object notifOriginator which is an instance of the BSnmpNotifOriginator class. This class implements the INotifOriginator interface (which defines methods for sending notifications that rely on configuration tables). It also provides a few methods for sending notifications directly to specific tagets.

Here is an example; it sends a cold start v1Trap to "127.0.0.1:162" (assume the agent is an instance of the BSnmpAgent class):

BAddrINet addr;
addr.AssignFromDottedDecimalStr("127.0.0.1:162");
BTarget target(addr, "public", 3, 1);

Agent.notifOrig.SendGenericTrapV1(target, eSNMPv1Trap_ColdStart);

Please download sample program that demonstrates usage of the BSnmpNotifOriginator class.

 

Back to Top

13.

Q:

What files need to be shipped with my agent and extension agent?

 

A:

Please read "Redistributing Applications Built Using xAgentBuilder" topic in the help file.

 

Back to Top

14.

Q:

I don't see a "NuDesign Visual xAgentBuilder for C++" wizard in my Visual C++?

 

A:

"NuDesign Visual xAgentBuilder for C++" wizard requires Visual C++ 6.0 SP4 or higher to work properly.  If your Visual C++ is not upgraded to SP4 or higher, the installation program will warn you and it won't copy the wizard file (NDxAB3.awx) to the correct place.  This file (along with the accompanying help file, NDxAB3.hlp) will be, in that case, copied to the "template" subdirectory in the directory where you installed xAgentBuilder.

After you upgrade your Visual C++, you can either reinstall xAgentBuilder, or simply copy NDxAB3.awx and NDxAB3.hlp files to the following directory:

%VISUAL-STUDIO-DIR%\Common\MSDev98\Template

where %VISUAL-STUDIO-DIR% is usually:

c:\Program Files\Miscrosoft Visual Studio

 

Back to Top

15.

Q:

Where can I get an enterprise number for my organization?

 

A:

IANA (Internet Assigned Numbers Authority) maintains Protocol Numbers and Assignment Services. Only ONE MIB/SNMP Private Enterprise number is permitted per organization. To apply online please click here.

 

Back to Top

16.

Q:

It seems that not all properties of the Mib-2 snmp branch are implemented.

 

A:

The short answer is that these objects are defined as OBSOLETE in then current MIB (SNMPv2-MIB) that define them (See RFC1907 and RFC3418 (Status:STANDARD)).  An object designated as OBSOLETE should not be implemented (See RFC 2578, top of page 20 (Status:STANDARD)) and can be removed if already implemented.

In our implementation, we actually implement both sets of objects, but the obsolete objects are only available if the agent has been configured to run in V1 only.  I.e. If the agent is configured to run in v2 and or v3 the obsolete objects appear to be not implemented.

You could modify this behavior if you wish, though it's not recommended.  It should be a relatively straight forward modification as all the code changes should occur in
BSnmpAgentMibImpl::HandlerAt()
in the module SnmpAgent.cpp in the NDSnmp library.

 

Back to Top

 

NuDesign SNMP Agent Service for Microsoft Windows

1.

Q:

Known problems and workarounds.

 

A:

Symptom:

If the NuDesign SNMP Agent Service is started when the network cable is disconnected, it will no longer accept SNMP packets from that interface even after the link is restored.  

 

 

Problem:

When agent is started it creates (and binds) socket for each active network interface, i.e. using explicit IP addresses reported by WinSock.  Restoring the link that was initially disconnected does not affect set of sockets known by agent.

 

 

Workaround:

This problem is fixed in version 3.5 or greater.

 

Back to Top

 

Visual MIBrowser®

1.

Q:

Known problems and workarounds.

 

A:

Symptom:

Rev. 4.3.5 and below of MIBrowser fails to discover SNMP agents with the SNMP Agent Discovery tool.

 

 

Problem:

After initial installation, the default value for Discovery Timeout (set in the agent discovery configuration dialog) has a value of zero (0).  This causes all requests sent by Agent Discovery to immediately timeout, resulting in no discovery packets being sent.

 

 

Workaround:

Set "Discovery Timeout" to some value, other than '0'.  For discovery on locally connected agents, a value of '1' is probably sufficient.  On remotely connected agents, a higher value may be necessary.

 

 

This problem has been fixed in the current release of MIBrowser.

 

Back to Top

2.

Q:

How can I receive traps in this application?

 

A:

Press the  "Trap Rx"  button on the main toolbar to receive SNMP notifications. When traps or notifications are received thereafter, entries for them will be added to the tree view.  Click on the "+" symbol to view the information about the trap.

 

Back to Top

3.

Q:

What is the limitation on the Evaluation version?

 

A:

There is no limitation to the behavior of MIBrowser during the evaluation period of 20 days.  After the evaluation period though, MIBrowser stops operating.

 

Back to Top

4.

Q:

Can I configure MIBrowser to "remember" different configurations?

 

A:

Yes.  You can save the individual operational characteristics of each chart/walk/get/set window (generally referred to as "query").  To save a "query", click on the chart/walk/get/set window you wish to save the characteristics of, then select the "File | Save Query" menu item. You'll then be asked to provide a filename for the Query.  Once it's saved, you can re-execute this query by choosing the "File | Load Query" menu item, which will ask you to select a query to load.

You can also save multiple queries into a single "query group".  Saving to a query group is similar to saving as query, except there is the extra step of specifying a query group name after you've provided a query name.  You initiate the save to group process by selecting the "File | Save Query to Group" menu option.  You can reload the "Query Group" by selecting the "File | Load Query Group" menu item.  Note: You can also manually edit "Query Group" (.NDG files) from "Edit | Query Group")

Lastly, you can load queries or query groups from the command line.  This leads to the possibility of creating different "short cuts" for operationally different configurations of MIBrowser.  To create a short cut to MIBrowser, right click anywhere on you windows desktop and select "New | Shortcut".  Browse to where MIBrowser was installed, select MIBrowser.exe and press "Open".  On the resulting command line (outside the quotes) type in the path to a query or group file.  Give the Shortcut a meaningful name and press the "Finish" button.  An example command line for the shortcut may look like:

"C:\Program Files\NuDesign Tools\Visual MIBrowser\MIBrowser.exe" setup1.ndg

This would invoke the set of queries that are contained in "setup1.ndg".  (Note: the "Start in:" entry of the short cut should specify the directory path in which setup1.ndg resides.)

There are several other options available for the command line to affect the format of MIBrowser when it is executed.  These are documented in "Help", in the "MIBrowser Command Line Interface" section.

 

Back to Top

5.

Q:

Can I detect alarm conditions with MIBrowser?

 

A:

Yes.  Alarm detection is performed from Chart windows.  To have the chart window detect an alarm, you must first specify a threshold for the alarm condition.  Thereafter, whenever the threshold is "crossed" by the graph information, an alarm is "detected".  Depending on other configuration information, this alarm may be forwarded as either an internet email or a SNMP notification (trap, trap v2 or inform).  In all cases, the alarm will always be routed to the "Alarm Log" window.

Note: You may have simultaneous Chart windows, detecting multiple alarm conditions on different agents.

 

Back to Top

6.

Q:

Can I specify a query that can be used with more than one agent?

 

A:

Yes.  If you create a query window (chart/walk/get/set) with a broadcast IP address then save it as a "query", when you reload the query, you'll be asked to select the agent that you wish the query to apply to.

 

Back to Top

7.

Q:

How can I notify someone of an alarm condition with MIBrowser.

 

A:

This would be by configuring alarms to be forwarded as either a trap or email.  To perform this configuration, open the "Tools | Options" dialog and select either "Trap" or "Email" tabs and fill in appropriate information. Note: There is a setting of "Notification Threshold" in both tabs.  This corresponds to the chart window, threshold "Alarm Level" setting and must be set at or below the level specified in the chart threshold setting to cause the notification to be issued.

 

Back to Top

8.

Q:

Where can I get copies of MIBs for inclusion or as example code?

 

A:

There are a few standard MIBs supplied with MIBrowser.  To download a MIB from a much larger collection of standard and private MIBs use this link.

 

Back to Top

 

Visual MIBuilder®

1.

Q:

How do I know which edit mode (SMI v1 or SMI v2) I am in?

 

A:

The status bar of the Visual MIBuilder window tells you the currently selected node, the edit mode, current date and time.

 

Back to Top

2.

Q:

How do change the edit mode?

 

A:

When Visual MIBuilder is first started it defaults to SMI v2 edit mode.  From then on MIBuilder will come up in the last edit mode it was in.  The edit mode will also track the edit mode of whatever MIB is opened, including new MIBs where you chose the edit mode through a dialog box as shown to the right.

 

Back to Top

3.

Q:

Does this product support SNMPv3?

 

A:

SNMP v1 requires the MIBs to written in SMI v1 syntax. SNMP v2 and v3 require SMI v2.  This product provides both SMI v1 and v2 modes.

 

Back to Top

4.

Q:

Does this product support SNMP v1/v2?

 

A:

As above: SNMP v1 requires the MIBs to written in SMI v1 syntax.  SNMP v2 and v3 require SMI v2.  This product provides both SMI v1 and v2 modes.

 

Back to Top

5.

Q:

Do I always have to start from the 'enterprise' node?

 

A:

No. Most mib designers may want to start from the enterprise node.  The application allows a designer to start from any node.  To start from a different node, first delete the enterprise node, and then drag the desired node from the imported mibs section to MIB Tree.  The desired node should show up under the MIB Tree and subsequent nodes can be entered underneath it.

 

Back to Top

6.

Q:

What is the limitation on the Evaluation version?

 

A:

Eval version of this application only allows the user to save a MIB file if it has 25 or fewer nodes.

 

Back to Top