internal static int AppMain(ServiceParameters parameters) { NicDeviceContract /*.Imp*/ nicImp = parameters.NicEndpointRef.Acquire(); nicImp.RecvSuccess(); //delete nicImp; DebugStub.WriteLine("Closed nic contract via reflection\n"); ARP arp = new ARP(); IP.Initialize(arp); Ethernet.Initialize(arp); NetStackApplication app = new NetStackApplication(parameters); try { return(app.Run()); } finally { //delete app; Dbg("NetStack is terminating."); } }