docs: private void createMonitor(LinkListener l) throws KNXException
  	{
  		final KNXMediumSettings medium = (KNXMediumSettings) options.get("medium");
  		if (options.containsKey("serial")) {
  			final String p = (String) options.get("serial");
  			try {
  				m = new KNXNetworkMonitorFT12(Integer.parseInt(p), medium);
  			}
  			catch (final NumberFormatException e) {
  				m = new KNXNetworkMonitorFT12(p, medium);
  			}
  		}
  		else {
  			// create local and remote socket address for monitor link
  			final InetSocketAddress local = createLocalSocket((InetAddress) options
  				.get("localhost"), (Integer) options.get("localport"));
  			final InetSocketAddress host = new InetSocketAddress((InetAddress) options
  				.get("host"), ((Integer) options.get("port")).intValue());
  			// create the monitor link, based on the KNXnet/IP protocol
  			// specify whether network address translation shall be used,
  			// and tell the physical medium of the KNX network
  			m = new KNXNetworkMonitorIP(local, host, options.containsKey("nat"), medium);
  		}
  		// add the log writer for monitor log events
  		LogManager.getManager().addWriter(m.getName(), w);
  		// on console we want to have all possible information, so enable
  		// decoding of a received raw frame by the monitor link
  		m.setDecodeRawFrames(true);
  		// listen to monitor link events
  		m.addMonitorListener(l);
  		// we always need a link closed notification (even with user supplied listener)
  		m.addMonitorListener(new LinkListener() {
  			public void indication(FrameEvent e)
  			{}
  
  			public void linkClosed(CloseEvent e)
  			{
  				System.out.println("network monitor exit, " + e.getReason());
  				synchronized (NetworkMonitor.this) {
  					NetworkMonitor.this.notify();
  				}
  			}
  		});
  	}