問題タブ [sharp-snmp]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
sharp-snmp - Lextm SharpSnmpLib Exception {「応答でエラーが発生しました」}
ライブラリを試しており、提供されているサンプル コードを使用しています。snmpwalk を使用でき、正常に動作します。
snmpget -c public localhost .1.3.6.1.2.1.1.1.0
出力:
SNMPv2-MIB::sysContact.0 = STRING: Administrator admin@test.com
End of MIB
ManageEngine MIBBrowserも使用 しましたが、正常に動作しますが、ライブラリを使用すると{"error in response"} エラーが発生し、エラーの詳細を確認すると、ErrorStatusはNoSuchNameです。
これが私のコードです
c#
var result = Messenger.Get(VersionCode.V1,
new IPEndPoint(IPAddress.Parse("192.168.0.101"), 161),
new OctetString("public"),
new List<Variable> { new Variable(new ObjectIdentifier(ObjectIdentifier.Convert(".1.3.6.1.2.1.1.4"))) },
60000);
私は何を間違っていますか?