// Runs a core scenario's network in Java FILIUS (ScenarioNetwork) and records // what DHCP really does: every frame each network card saw and each host's // address configuration at the end. // // DhcpRun // // The scenario's steps are ignored: the network runs, in real time, for the // given milliseconds. Threads make the times vary from run to run; the order // of one client's messages does not. public class DhcpRun { public static void main(String[] args) throws Exception { ScenarioNetwork network = ScenarioNetwork.read(args[0]); network.start(); Thread.sleep(Long.parseLong(args[1])); ScenarioNetwork.Json out = new ScenarioNetwork.Json(); out.open('{'); network.writeFrames(out); network.writeDevices(out); out.close('}'); network.stop(); ScenarioNetwork.write(args[2], out); System.exit(0); } }