// /** // * 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(); if (dhcpServer.Interfaces.Length == 0) dhcpServer.AddInterface(IPv4.Parse("10.118.200.254")); dhcpServer.Interfaces[0].InterfaceAddress = IPv4.Parse("10.118.200.254"); if (dhcpServer.IPPools.Length == 0) { dhcpServer.AddPool(new IPPool("default", IPv4.Parse("10.118.200.50"), IPv4.Parse("10.118.200.99"))); } if (dhcpServer.Interfaces[0].Pool == null) { dhcpServer.Interfaces[0].Pool = dhcpServer.IPPools[0]; dhcpServer.Commit(dhcpServer.Interfaces[0].Pool); } dhcpServer.Start(); //RadiusServer radiusServer = new RadiusServer(new IPEndPoint(IPAddress.Any, 1812)); //radiusServer.MessageReceived = (s, m) => Logging.Log("JO"); //Thread.Sleep(10000); //radiusServer.Close(); } } }