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

SnmpTrap Object

Use the SnmpTrap object to easily capture SNMP Traps and generate notifications of any kind. Features include:

  • Easily generate and send traps from an agent using the Agent control.
  • Supports SNMP versions 1 and 2.
  • No knowledge of SNMP trap formats required.

 

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
Description Human readable description of the object represented.
Enterprise Object Identifier (OID) of the network management subsystem that generated the trap.
Name Human readable identifier that represents the object (for example, sysDescr).
Oids Collection of OIDs representing the variables contained in the trap.
Reference Reference to another document. This document should have information about the object.
SpecificTrap Enterprise-specific type of trap represented by the message.
Status Status of the SnmpVariable Object.

Code Example

How easy is the Trap Object to use? Check out the following VB example below, which demonstrates cross-referencing a MIB object when receiving a trap to display a description of the trap.

Dim Message As SnmpMessage
Dim Trap As SnmpTrap
Dim Mib As SnmpMib
Dim Packet() As Byte

Mib.Load "c:\MIBs\Dart.mib"
Udp1.Receive Packet
Message.Decode Packet

For Each Trap In Mib.Traps
   If Trap.Enterprise = Message.Enterprise Then
      If Trap.SpecificTrap = Message.SpecificTrap Then
         List1.AddItem Trap.Description
      End If
   End If
Next