I'm writing a script for SNMP get's and all is working well until I have to get a UInt64 value.
According to de SNMP Sharp documentation
C# TYPE SNMP#NET CLASS
If I run the script on a OID with a Counter64 property the script only prints Test1.
I've been searching for quite a while but I don't understand what I need to adjust.
Code:
Imports System.Collections.Generic Imports SnmpSharpNet Sub Main(parm as object) Try Dim host As String = "192.168.148.101" Dim community As String = "public" Dim requestOid As String Dim result As Dictionary(Of Oid, AsnType) requestOid = "1.3.6.1.2.1.31.1.1.1.6" Dim snmp As SimpleSnmp = New SimpleSnmp(host, community) result = snmp.Walk(SnmpVersion.Ver1, requestOid) If result IsNot Nothing Then Dim kvp As KeyValuePair(Of Oid, AsnType) hs.WriteLog("Script", "Test1") For Each kvp In result hs.WriteLog("Script", "Test2") hs.WriteLog("Script", kvp.Key.ToString()) hs.WriteLog("Script", SnmpConstants.GetTypeName(kvp.Value.Type)) hs.WriteLog("Script", kvp.Value.ToString()) Next End If Catch ex As Exception hs.WriteLog("Warning", ex.Message) End Try End Sub
C# TYPE SNMP#NET CLASS
Int32. | Counter32, Integer32 |
UInt32 | Gauge32, UInteger32 |
UInt64 | Counter64 |
I've been searching for quite a while but I don't understand what I need to adjust.
Comment