Esempio n. 1
0
        static void Main(string[] args)
        {
            var config = PXEConfig.Load();

            config.Save();

            var pxe_server = new PXEServer(config);

            pxe_server.Start();


            Console.WriteLine("Press ENTER to exit");
            Console.ReadLine();

            pxe_server.Stop();
        }
Esempio n. 2
0
        public PXEServer(PXEConfig config)
        {
            BindAddress = IPAddress.Parse(config.BindAddress);
            NetMask     = IPAddress.Parse(config.NetMask);

            DHCPPort = config.DHCPPort;
            HTTPPort = config.HTTPPort;
            TFTPPort = config.TFTPPort;

            HTTPBootFile = config.HTTPBootFile;

            ServerDirectory = config.ServerDirectory;
            loader          = Enum.Parse <Loader>(config.Loader);
            if (config.Verbose)
            {
                Trace.Listeners.Add(new ConsoleTraceListener());
            }
        }