ActiveSocket

 Product Overview

 ActiveSocket Objects:
 
 How to use

 Online Samples

 Download (.exe)

 Brochure (.pdf)

 Manual (.htm)

 Release Notes


Support

 Knowledge Base

 Forum

 Contact Support


Purchase

 Licensing

 Pricing

 Order now


Related documents

 Tutorials

 Tools


  Download ActiveSocket Network Communications Toolkit 4.0  (5330 KB - .exe file)
  Download Manual  (505 KB - .htm file)

ActiveSocket - SnmpManager Object

SNMP stands for Simple Network Management Protocol. Simple Network Management Protocol is a set of standards for communication with devices connected to a TCP/IP network. It is often used to communicate with hubs and switches.

Since it was developed in 1988, the Simple Network Managment Protocol has become the de facto standard for network management. Because it is a simple solution, requiring little code to implement, vendors can easily build SNMP agents to their products. SNMP is extensible, allowing vendors to easily add network management functions to their existing products. SNMP also separates the managment architecture from the architecture of the hardware devices, which broadens the base of multivendor support. Perhaps most important, unlike other so-called standards, SNMP is not a mere paper specification, but an implementation that is widely available today.

ActiveSocket is compliant with SNMP v1 and SNMP v2c. ActiveSocket automatically detects which SNMP version is running on the remote agent and adapts to it.

The ActiveSocket SNMP object supports different data types, including:
  • String types (also called "octet strings");
  • Integer types (16bit, 32bit and unsigned integers);
  • IP Address types;
  • Timetick types;
  • Counter types (32bit and 64bit counters);
  • OID types (also called "Object ID's");
  • Other, less frequently used datatypes.

The ActiveSocket Snmp object defines the following operations:
  • Get - Allows the ActiveSocket Snmp object to retrieve an object variable from the (remote) agent;
  • GetNext - Allows the ActiveSocket Snmp object to retrieve the next object variable from a table or list within an agent;
  • Set - Allows the ActiveSocket Snmp object to set values for object variables within an agent;

The SnmpManager object is part of the ActiveSocket component. Overview of all ActiveSocket objects:
      » Icmp
      » Http
      » Ftp & FtpFile
      » DnsServer & DnsRecord
      » Ntp
      » Ssh
      » Rsh
      » SnmpManager
      » SnmpTrapManager
      » SnmpMibBrowser
      » Tcp
      » Udp
      » IPtoCountry
      » Wake-on-LAN


SnmpManager Sample code

     VBScript sample: SNMP Get

   Set objManager = CreateObject("ActiveXperts.SnmpManager")

   objManager.Initialize

   objManager.Open "server03", "public"
   If( objManager.LastError <> 0 ) Then
     objManager.Shutdown
     WScript.Quit
   End If

   
   Set objSnmpObject = objManager.Get( "system.sysDescr.0" )
   If( objManager.lastError = 0 ) Then
     WScript.Echo " OID  : " & objSnmpObject.OID
     WScript.Echo "Value : " & objSnmpObject.Value
     WScript.Echo "Type  : " & objSnmpObject.Type
   End If
   objManager.Close()
   objManager.Shutdown()


     Visual Basic .NET sample: SNMP Walker
Imports ASOCKETLib

Module Module1
    Sub Main()
        Dim objManager As SnmpManager = New SnmpManager
        Dim objSnmpObject As SnmpObject
        Dim strOID As String = "system.sysDescr.0", strNextOID As String

        objManager.Initialize()
        objManager.Open("dell03", "public")
        If (objManager.LastError = 0) Then
            objSnmpObject = objManager.Get(strOID)
            While (objManager.LastError = 0)
                Console.WriteLine(objSnmpObject.OID + " : ")
                Console.WriteLine(" Value:" & objSnmpObject.Value)
                Console.WriteLine(" Type:" & objSnmpObject.Type)
                objSnmpObject = objManager.GetNext()
            End While
        End If
        objManager.Close()
        objManager.Shutdown()
        Console.WriteLine("Ready.")
    End Sub
End Module


On ftp.activexperts-labs.com, you can find a lot of ActiveSocket samples. These samples are also part of the ActiveSocket installation.
» Visit ftp.activexperts-labs.com




Copyright ©1999-2007 ActiveXperts Software. All rights reserved.