private static Link<?> loadTopologyLink(List<String> tokens, Network network) throws Exception {
		if (tokens.size() != 6)
			throw new Exception("Invalid number of parameters in link declaration");
		Node n1= network.getNodeByName(tokens.get(1));
		HardwareInterface<? extends Message> if1= n1.getInterfaceByName(tokens.get(2));
		Node n2= network.getNodeByName(tokens.get(3));
		HardwareInterface<? extends Message> if2= n2.getInterfaceByName(tokens.get(4));
		if (!if1.getType().equals("eth") || !if2.getType().equals("eth"))
			throw new Exception("cannot connect interfaces [" + n1 + "." + if1 + "," + n2 + "." + if2 + "]");
		return new Link<EthernetFrame>((EthernetInterface) if1, (EthernetInterface) if2,
			Double.valueOf(tokens.get(5)));
	}