public BroadcastReceiver(NetInterface net) {
		this.net = net;

		// find a free UDP port for this application, in case several
		// applications run on the same machine
		port = NetInterface.BROADCAST_PORT;
		int i = 0;
		boolean portOK = false;
		while (!portOK && i < NetInterface.NB_BROADCAST_PORTS) {
			try {
				// FIXME: cannot use the Inet address of the first connected
				// interface
				// socket = new DatagramSocket(port,
				// net.getAddress().getInetAddress());
				// String ipAddress = socket.getLocalAddress().getHostAddress();
				socket = new DatagramSocket(port);
				portOK = true;
			} catch (SocketException e) {
				// port already in use, try next
				port++;
				i++;
			}
		}
		if (!portOK) {
			System.out.println("No broadcast port available.");
			System.exit(30);
		}
		if (verbose) {
			System.out.println("Net: broadcast receiver ready on port " + port);
		}
		start();
	}