ln.skyscanner/Program.cs

109 lines
2.7 KiB
C#
Raw Normal View History

2019-03-11 09:00:07 +01:00
// /**
// * File: Program.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 Renci.SshNet;
using ln.skyscanner.identify;
using System.Net;
using System.Collections.Generic;
using ln.snmp.types;
using System.IO;
using ln.snmp;
2019-03-11 15:08:25 +01:00
using ln.snmp.endpoint;
2019-03-11 09:00:07 +01:00
using System.Diagnostics;
using ln.perfdb.storage;
using ln.logging;
2019-03-11 15:08:25 +01:00
using System.Security.Cryptography;
2019-03-12 00:55:04 +01:00
using ln.snmp.asn1;
using System.Linq;
using ln.types;
using System.Runtime.InteropServices;
using ln.snmp.rfc1213;
2019-03-13 08:20:53 +01:00
using ln.types.sync;
using ln.skyscanner.crawl;
using System.Threading;
using System.Net.NetworkInformation;
2019-03-21 07:43:32 +01:00
using ln.skyscanner.crawl.tests;
using Castle.DynamicProxy;
2019-03-21 14:06:36 +01:00
using ln.types.odb;
2019-03-26 12:53:42 +01:00
using System.Net.Sockets;
using ln.skyscanner.entities;
2019-03-29 08:55:09 +01:00
using ln.types.btree;
using ln.types.test;
2019-03-11 09:00:07 +01:00
namespace ln.skyscanner
{
class MainClass
{
public static void Main(string[] args)
{
2019-03-18 08:12:54 +01:00
FileLogger fileLogger = new FileLogger("skyscanner.log");
2019-03-29 08:55:09 +01:00
fileLogger.MaxLogLevel = LogLevel.INFO;
2019-03-18 08:12:54 +01:00
Logger.Default.Backends.Add(fileLogger);
Logger.ConsoleLogger.MaxLogLevel = LogLevel.INFO;
2019-03-11 09:00:07 +01:00
2019-03-21 07:43:32 +01:00
Initialize();
2019-03-13 14:18:05 +01:00
SkyScanner skyScanner = new SkyScanner(args);
skyScanner.Start();
2019-03-12 00:55:04 +01:00
2019-03-11 09:00:07 +01:00
}
2019-03-12 00:55:04 +01:00
2019-03-21 07:43:32 +01:00
private static void Initialize()
2019-03-12 00:55:04 +01:00
{
2019-03-29 13:57:06 +01:00
SNMPEngine.DefaultEngine.Timeout = 3500;
2019-03-26 12:53:42 +01:00
//using (ODB odb = new ODB("odb"))
//{
2019-03-21 14:06:36 +01:00
2019-03-29 08:55:09 +01:00
//ODBCollection col = odb.GetCollection("test");
2019-03-21 14:06:36 +01:00
2019-03-29 08:55:09 +01:00
//foreach (ODBDocument odoc in col)
//{
// Console.WriteLine("Stored DOC: {0}", odoc);
// if (!odoc.Contains("counter"))
// odoc["counter"] = 0;
// else
// odoc["counter"] = odoc["counter"].AsInt + 1;
2019-03-26 12:53:42 +01:00
2019-03-29 08:55:09 +01:00
// col.Upsert(odoc);
//}
2019-03-26 12:53:42 +01:00
2019-03-29 08:55:09 +01:00
//ODBDocument doc = new ODBDocument();
2019-03-26 12:53:42 +01:00
2019-03-29 08:55:09 +01:00
//doc["snmp.msg"] = "Hallo WelT!";
//doc["name"] = "Harald";
//doc["alter"] = 39;
//doc["genauer"] = 34.5;
//ODBDocument ndoc = new ODBDocument();
//doc["keywords"] = ndoc;
2019-03-26 12:53:42 +01:00
2019-03-29 08:55:09 +01:00
//ndoc["eins"] = 1;
//ndoc["zwei"] = 2;
//ndoc["drei"] = 3;
2019-03-26 12:53:42 +01:00
2019-03-29 08:55:09 +01:00
//Console.WriteLine(doc);
2019-03-26 12:53:42 +01:00
2019-03-29 08:55:09 +01:00
//col.Insert(doc);
2019-03-26 12:53:42 +01:00
2019-03-29 08:55:09 +01:00
//Node node = new Node(CIDR.Parse("1.2.3.4"));
//ODBDocument nodeDoc = ODBMapper.Default.ToODBValue(node).AsDocument;
//Console.WriteLine("Node: {0}", nodeDoc);
2019-03-26 12:53:42 +01:00
2019-03-29 08:55:09 +01:00
//Node node2 = ODBMapper.Default.ToNativeValue<Node>(nodeDoc);
2019-03-26 12:53:42 +01:00
//}
2019-03-12 00:55:04 +01:00
}
2019-03-11 09:00:07 +01:00
}
}