@Override public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= (serviceName == null) ? 0 : serviceName.hashCode();
    h *= 1000003;
    h ^= (ipv4 == null) ? 0 : ipv4.hashCode();
    h *= 1000003;
    h ^= (ipv6 == null) ? 0 : ipv6.hashCode();
    h *= 1000003;
    h ^= port;
    return h;
  }
Adapted from code in {@code com.google.common.net.InetAddresses.ipStringToBytes}. This version
separates detection from parsing and checks more carefully about embedded addresses.
zipkin/src/main/java/zipkin2/Endpoint.java