public void addInterface(HardwareInterface<? extends Message> iface)
	throws Exception {
    	if (iface.getNode() != this)
    		throw new Exception("Interface already belongs to another host");
    	if (ifaces.contains(iface))
    		throw new Exception("Host already contains this interface [" + iface + "]");
		ifaces.add(iface);
				
		List<HardwareInterface<? extends Message>> ifacesList= ifacesByType.get(iface.getType());
		if (ifacesList == null) {
			ifacesList= new ArrayList<HardwareInterface<? extends Message>>();
			ifacesByType.put(iface.getType(), ifacesList);
		}
		iface.setIndex(ifacesList.size());
		ifacesList.add(iface);
		ifacesByName.put(iface.getName(), iface);
    }