docs: private KNXNetworkLink createLink() throws KNXException
  	{
  		final KNXMediumSettings medium = (KNXMediumSettings) options.get("medium");
  		if (options.containsKey("serial")) {
  			// create FT1.2 network link
  			final String p = (String) options.get("serial");
  			try {
  				return new KNXNetworkLinkFT12(Integer.parseInt(p), medium);
  			}
  			catch (final NumberFormatException e) {
  				return new KNXNetworkLinkFT12(p, medium);
  			}
  		}
  		// create local and remote socket address for network 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());
  		final int mode = options.containsKey("routing") ? KNXNetworkLinkIP.ROUTER
  			: KNXNetworkLinkIP.TUNNEL;
  		return new KNXNetworkLinkIP(mode, local, host, options.containsKey("nat"),
  			medium);
  	}