ln.skyspot/Program.cs

54 lines
1.4 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 ln.radius;
using System.Net;
using System.Threading;
using ln.logging;
using System.Net.Sockets;
using Newtonsoft.Json;
using ln.dhcp;
using ln.types.net;
namespace skyspot
{
class MainClass
{
public static void Main(string[] args)
{
new IPv4(0);
DHCPServer dhcpServer = new DHCPServer();
dhcpServer.EnsureInterface(IPv4.Parse("10.119.1.1"));
dhcpServer.EnsureInterface(IPv4.Parse("10.119.0.52"));
dhcpServer.EnsurePool("default", IPv4.Parse("10.119.1.50"), IPv4.Parse("10.119.1.99"));
foreach (DHCPServerInterface serverInterface in dhcpServer.Interfaces)
{
if (serverInterface.Pool == null)
{
serverInterface.Pool = dhcpServer.IPPools[0];
dhcpServer.Commit(serverInterface);
}
}
dhcpServer.Start();
//RadiusServer radiusServer = new RadiusServer(new IPEndPoint(IPAddress.Any, 1812));
//radiusServer.MessageReceived = (s, m) => Logging.Log("JO");
//Thread.Sleep(10000);
//radiusServer.Close();
}
}
}