code: private static List<InetAddress> getMulticastAddresses() throws SocketException, UnknownHostException {
          List<InetAddress> addresses = NetworkUtil.getMulticastAddresses();
          if (addresses.size() == 0) {
              throw new UnknownHostException("Cannot find address of local host which can be used for sending discovery request");
          }
          return addresses;
      }
docs: All addresses which can be used for sending multicast addresses