ln.skyscanner/crawl/service/Ubiquity.cs

59 lines
1.9 KiB
C#

//// /**
//// * File: Ubiquity.cs
//// * Author: haraldwolff
//// *
//// * This file and it's content is copyrighted by the Author and / or copyright holder.
//// * Any use wihtout proper permission is illegal and may lead to legal actions.
//// *
//// *
//// **/
//using System;
//using System.Linq;
//using ln.snmp.endpoint;
//using ln.snmp;
//using System.Collections.Generic;
//using ln.snmp.types;
//namespace ln.skyscanner.crawl.service
//{
// public class Ubiquity : CrawlService
// {
// public Ubiquity()
// : base("ubiquity")
// {
// }
// public override bool Check(Crawl crawl)
// {
// if (crawl.CheckRequiredOption("snmp"))
// {
// using (SnmpInterface snmp = SNMP.GetSnmpInterface(crawl.Host))
// {
// if (crawl.Host.GetHint("snmp.orids", new string[0]).Contains("1.3.6.1.4.1.41112"))
// {
// List<Sequence> test = snmp.snmpWalk("1.3.6.1.4.1.41112.1.3.2.1.11");
// //List<Sequence> test2 = snmp.snmpWalk("1.3.6.1.4.1.41112.1.3.3.1.66");
// if (test.Count > 0)
// crawl.Host.SetHint("ubiquity.ptp", true);
// else
// crawl.Host.SetHint("ubiquity.ptp", false);
// test = snmp.snmpWalk("1.3.6.1.4.1.41112.1.4.7.1.1");
// if (test.Count > 0)
// crawl.Host.SetHint("ubiquity.ptmp", true);
// else
// crawl.Host.SetHint("ubiquity.ptmp", false);
// }
// }
// }
// return false;
// }
// public override bool HostProvidesOption(Crawl crawl, params object[] parameters)
// {
// return false;
// }
// }
//}