public override bool InitServer() { tysos.Syscalls.ProcessFunctions.RegisterSpecialProcess(this, tysos.Syscalls.ProcessFunctions.SpecialProcessType.Net); // Register handlers for devices while (tysos.Syscalls.ProcessFunctions.GetVfs() == null) { ; } vfs = tysos.Syscalls.ProcessFunctions.GetVfs(); vfs.RegisterAddHandler("class", "netdev", tysos.Messages.Message.MESSAGE_NET_REGISTER_DEVICE, true); /* Start protocol handlers */ var _arp = new arp(); tysos.Process p_arp = tysos.Process.CreateProcess("arp", new System.Threading.ThreadStart(_arp.MessageLoop), new object[] { _arp }); p_arp.Start(); arp = _arp; ipv4 _ipv4 = new ipv4(); tysos.Process p_ipv4 = tysos.Process.CreateProcess("ipv4", new System.Threading.ThreadStart(_ipv4.MessageLoop), new object[] { _ipv4 }); p_ipv4.Start(); return(true); }
public icmp(ipv4 IP) { ip = IP; }