Version: 2.8.5
Create custom SNMP Manager, Trap and Agent applications for monitoring and controlling network devices.

Snmp Agent ActiveX Control

Use the SNMP Agent control to easily build SNMP agents. Provides an easy-to-use interface that handles the details of processing and responding to an SNMP manager's request. Features include:

  • Supports SNMP versions 1 and 2.
  • Requires no other system support besides basic Winsock transport.
  • No knowledge of SNMP message formats required.
  • Reads MIB files and compiles them into easy-to-use objects.
  • Snmp Agent control handles all Get/Set requests and error reporting. Automatically switches between v1 and v2 messages.
  • Build a message by setting properties, adding variables (OIDs) using simple Variable Objects, and sending the message. It doesn't get any easier!

Development Environments

  • Visual Studio .NET (.NET Framework)
  • Visual Basic (VB)
  • Visual C++ (VC++)
  • FoxPro
  • PowerBuilder
  • Delphi
  • C++ Builder
  • ASP
  • Office 97/2000

Interface

Public Properties
AgentUptime Elapsed time the Agent has been active.
Auto Enables the automatic processing of all received Get/Set requests.
Community Community name to which the agent belongs.
LocalAddress Returns the address in use while the socket is active and an empty string when the UDP socket is closed.
LocalPort Returns the port number in use while the socket is active and 0 when the socket is closed. When the Protocol property of the UDP Control is not ptUdp, LocalPort returns 0.
ManagerName Name (hostname or IP address in dot notation) of the SNMP manager associated with the Message property.
ManagerPort Port of the SNMP manager associated with the Message property.
Message Current SnmpMessage Object.
Mib SnmpMib Object used for storing the Management Information Base (MIB).
SendDatagramCount Number of datagrams queued for sending.
TrapManagers Collection of remote names and ports of managers that will receive trap messages.
Public Methods
About Show the About Box.
Close Release system resources.
Open Allocate a socket for sending and receiving datagrams.
Send Encode and send an SNMP message
Trace Start or stop the accumulation of trace or debug data. Once started, this method accumulates data until it is turned off.
Public Events
Error Fires when an error condition occurs.
Request Fires when an SNMP request arrives. Use the Message, ManagerName and ManagerPort properties to obtain the decoded message and its source.
Response Fires immediately before a response is encoded and sent to a manager. Use the Message, ManagerName, and ManagerPort properties to obtain the decoded message and its destination.

Code Example

How easy is the Agent control to use? Check out the following VB example below, which demonstrates how to set values in a MIB (Management Information Base).

' Load MIB files included with Dart's sample MIB Viewer application
Agent1.Mib.Load "C:\smi.mib" 
Agent1.Mib.Load "C:\mib_ii.mib" 

' Set sysContact variable
Agent1.Mib.Variables("sysContact").Value = "DartMan"

' Set udpInDatagrams variable
Agent1.Mib.Variables("udpInDatagrams").Value = 0

' Allocate a socket (will probably default to 161)
Agent1.Open

' Display new values
Text1.Text = Agent1.Mib.Variables("sysContact").Value
Text2.Text = Agent1.Mib.Variables("udpInDatagrams").Value

Related Products: