code: func getReachabilityFrom(localAddr, remoteAddr *wire.NetAddress) int {
  	const (
  		Unreachable = 0
  		Default     = iota
  		Teredo
  		Ipv6Weak
  		Ipv4
  		Ipv6Strong
  		Private
  	)
  
  	if !IsRoutable(remoteAddr) {
  		return Unreachable
  	}
  
  	if IsOnionCatTor(remoteAddr) {
  		if IsOnionCatTor(localAddr) {
  			return Private
  		}
  
  		if IsRoutable(localAddr) && IsIPv4(localAddr) {
  			return Ipv4
  		}
  
  		return Default
  	}
  
  	if IsRFC4380(remoteAddr) {
  		if !IsRoutable(localAddr) {
  			return Default
  		}
  
  		if IsRFC4380(localAddr) {
  			return Teredo
  		}
  
  		if IsIPv4(localAddr) {
  			return Ipv4
  		}
  
  		return Ipv6Weak
  	}
  
  	if IsIPv4(remoteAddr) {
  		if IsRoutable(localAddr) && IsIPv4(localAddr) {
  			return Ipv4
  		}
  		return Unreachable
  	}
  
  	/* ipv6 */
  	var tunnelled bool
  	// Is our v6 is tunnelled?
  	if IsRFC3964(localAddr) || IsRFC6052(localAddr) || IsRFC6145(localAddr) {
  		tunnelled = true
  	}
  
  	if !IsRoutable(localAddr) {
  		return Default
  	}
  
  	if IsRFC4380(localAddr) {
  		return Teredo
  	}
  
  	if IsIPv4(localAddr) {
  		return Ipv4
  	}
  
  	if tunnelled {
  		// only prioritise ipv6 if we aren't tunnelling it.
  		return Ipv6Weak
  	}
  
  	return Ipv6Strong
  }
docs: // getReachabilityFrom returns the relative reachability of the provided local
  // address to the provided remote address.