WIP
parent
2ef1f5473b
commit
f400029843
10
Program.cs
10
Program.cs
|
@ -15,10 +15,11 @@ using System.Collections.Generic;
|
||||||
using ln.snmp.types;
|
using ln.snmp.types;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using ln.snmp;
|
using ln.snmp;
|
||||||
using ln.snmp.channel;
|
using ln.snmp.endpoint;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using ln.perfdb.storage;
|
using ln.perfdb.storage;
|
||||||
using ln.logging;
|
using ln.logging;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace ln.skyscanner
|
namespace ln.skyscanner
|
||||||
{
|
{
|
||||||
|
@ -77,17 +78,18 @@ namespace ln.skyscanner
|
||||||
SNMPEngine.DEBUG = true;
|
SNMPEngine.DEBUG = true;
|
||||||
|
|
||||||
SNMPEngine engine = new SNMPEngine();
|
SNMPEngine engine = new SNMPEngine();
|
||||||
engine.Timeout = 3000;
|
engine.Timeout = 4000;
|
||||||
|
|
||||||
SnmpV1Endpoint v1endpoint = new SnmpV1Endpoint(engine, new IPEndPoint(IPAddress.Parse("10.113.254.4"), 161), "ghE7wUmFPoPpkRno");
|
SnmpV1Endpoint v1endpoint = new SnmpV1Endpoint(engine, new IPEndPoint(IPAddress.Parse("10.113.254.4"), 161), "ghE7wUmFPoPpkRno");
|
||||||
SnmpV2Endpoint v2endpoint = new SnmpV2Endpoint(engine, new IPEndPoint(IPAddress.Parse("10.113.254.4"), 161), "ghE7wUmFPoPpkRno");
|
SnmpV2Endpoint v2endpoint = new SnmpV2Endpoint(engine, new IPEndPoint(IPAddress.Parse("10.113.254.4"), 161), "ghE7wUmFPoPpkRno");
|
||||||
|
|
||||||
USMEndpoint v3endpoint = new USMEndpoint(engine, new IPEndPoint(IPAddress.Parse("10.255.3.41"), 161));
|
USMEndpoint v3endpoint = new USMEndpoint(engine, new IPEndPoint(IPAddress.Parse("10.255.3.41"), 161));
|
||||||
v3endpoint.AuthMethod = SnmpV3AuthMethod.SHA;
|
v3endpoint.AuthMethod = SnmpV3AuthMethod.SHA;
|
||||||
v3endpoint.AuthKey = "qVy3hnZJ2fov";
|
v3endpoint.AuthKeyPhrase = "qVy3hnZJ2fov";
|
||||||
|
//v3endpoint.AuthKeyPhrase = "maplesyrup";
|
||||||
v3endpoint.Username = "skytron";
|
v3endpoint.Username = "skytron";
|
||||||
|
|
||||||
SNMPInterface intf = v3endpoint;
|
SnmpEndpoint intf = v3endpoint;
|
||||||
|
|
||||||
Stopwatch stopWatch = Stopwatch.StartNew();
|
Stopwatch stopWatch = Stopwatch.StartNew();
|
||||||
Sequence[][] ifTable = intf.snmpWalk(new String[] {
|
Sequence[][] ifTable = intf.snmpWalk(new String[] {
|
||||||
|
|
Loading…
Reference in New Issue