90 lines
2.3 KiB
C#
90 lines
2.3 KiB
C#
// /**
|
|
// * 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 System.Collections.Generic;
|
|
using ln.snmp;
|
|
using ln.logging;
|
|
using ln.skyscanner.entities;
|
|
using ln.types.threads;
|
|
using ln.types.net;
|
|
using ln.types.odb;
|
|
using ln.types.odb.index;
|
|
|
|
namespace ln.skyscanner
|
|
{
|
|
class MainClass
|
|
{
|
|
|
|
|
|
public static void Main(string[] args)
|
|
{
|
|
new IPv4(0);
|
|
|
|
FileLogger fileLogger = new FileLogger("skyscanner.log");
|
|
fileLogger.MaxLogLevel = LogLevel.INFO;
|
|
Logger.Default.Backends.Add(fileLogger);
|
|
|
|
Logger.ConsoleLogger.MaxLogLevel = LogLevel.INFO;
|
|
|
|
Initialize();
|
|
|
|
SkyScanner skyScanner = new SkyScanner(args);
|
|
skyScanner.Start();
|
|
}
|
|
|
|
private static void Initialize()
|
|
{
|
|
SNMPEngine.DefaultEngine.Timeout = 3500;
|
|
|
|
//using (ODB odb = new ODB("odb"))
|
|
//{
|
|
|
|
//ODBCollection col = odb.GetCollection("test");
|
|
|
|
//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;
|
|
|
|
// col.Upsert(odoc);
|
|
//}
|
|
|
|
//ODBDocument doc = new ODBDocument();
|
|
|
|
//doc["snmp.msg"] = "Hallo WelT!";
|
|
//doc["name"] = "Harald";
|
|
//doc["alter"] = 39;
|
|
//doc["genauer"] = 34.5;
|
|
//ODBDocument ndoc = new ODBDocument();
|
|
//doc["keywords"] = ndoc;
|
|
|
|
//ndoc["eins"] = 1;
|
|
//ndoc["zwei"] = 2;
|
|
//ndoc["drei"] = 3;
|
|
|
|
//Console.WriteLine(doc);
|
|
|
|
//col.Insert(doc);
|
|
|
|
//Node node = new Node(CIDR.Parse("1.2.3.4"));
|
|
//ODBDocument nodeDoc = ODBMapper.Default.ToODBValue(node).AsDocument;
|
|
//Console.WriteLine("Node: {0}", nodeDoc);
|
|
|
|
//Node node2 = ODBMapper.Default.ToNativeValue<Node>(nodeDoc);
|
|
|
|
//}
|
|
}
|
|
|
|
}
|
|
}
|