using IFS.Boot; using IFS.CopyDisk; using IFS.FTP; using IFS.Transport; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IFS { public class Entrypoint { static void Main(string[] args) { List ifaces = EthernetInterface.EnumerateDevices(); Console.WriteLine("available interfaces are:"); foreach(EthernetInterface i in ifaces) { Console.WriteLine(String.Format("{0} - address {1}, desc {2} ", i.Name, i.MacAddress, i.Description)); } // Set up protocols: // Connectionless PUPProtocolDispatcher.Instance.RegisterProtocol(new PUPProtocolEntry("Gateway Information", 2, ConnectionType.Connectionless, new GatewayInformationProtocol())); PUPProtocolDispatcher.Instance.RegisterProtocol(new PUPProtocolEntry("Misc Services", 0x4, ConnectionType.Connectionless, new MiscServicesProtocol())); PUPProtocolDispatcher.Instance.RegisterProtocol(new PUPProtocolEntry("Echo", 0x5, ConnectionType.Connectionless, new EchoProtocol())); PUPProtocolDispatcher.Instance.RegisterProtocol(new PUPProtocolEntry("Boot", 0x10, ConnectionType.Connectionless, new BootServerProtocol())); // RTP/BSP based: PUPProtocolDispatcher.Instance.RegisterProtocol(new PUPProtocolEntry("CopyDisk", 0x15 /* 25B */, ConnectionType.BSP, new CopyDiskServer())); PUPProtocolDispatcher.Instance.RegisterProtocol(new PUPProtocolEntry("FTP", 0x3, ConnectionType.BSP, new FTPServer())); // Breath Of Life BreathOfLife breathOfLifeServer = new BreathOfLife(); // TODO: MAKE THIS CONFIGURABLE. PUPProtocolDispatcher.Instance.RegisterInterface(ifaces[2]); while (true) { System.Threading.Thread.Sleep(100); } } } }