Quicklinks
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:
The ActiveSocket Snmp object defines the following operations:
The SnmpManager object is part of the ActiveSocket component. Overview of all ActiveSocket objects:
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()
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