private void handleResponsePacket(DatagramPacket packet) {
		try {
			String strPacket = new String(packet.getData(), 0, packet.getLength());
			Log.d(LOG_TAG, "response=" + strPacket);
			String tokens[] = strPacket.trim().split("\\n");
			Log.d(LOG_TAG, "tokens.length=" + tokens.length);

			String location = null;
			boolean foundSt = false;
			for (int i = 0; i < tokens.length; i++) {
				String token = tokens[i].trim();
				if (token.startsWith(HEADER_LOCATION)) {
					// LOCATION: http://192.168.0.51:47944/dd.xml
					location = token.substring(10).trim();
				} else if (token.startsWith(HEADER_ST)) {
					// ST: urn:dial-multiscreen-org:service:dial:1
					String st = token.substring(4).trim();
					if (st.equals(SEARCH_TARGET)) {
						foundSt = true;
					}
				}
			}

			if (!foundSt || location == null) {
				Log.w(LOG_TAG, "Malformed response: " + strPacket);
				return;
			}

			BroadcastAdvertisement advert;
			try {
				URL uri = new URL(location);
				InetAddress address = InetAddress.getByName(uri.getHost());
				advert = new BroadcastAdvertisement(location, address, uri.getPort());
			} catch (Exception e) {
				return;
			}

			mHandler.onBroadcastFound(advert);
		} catch (Exception e) {
			Log.e(LOG_TAG, "handleResponsePacket", e);
		}
	}