Object Ipv6AddressResolver

  • All Implemented Interfaces:

    
    public class Ipv6AddressResolver
    
                        

    Resolves the device's globally-routable IPv6 source address without emitting any packets.

    The resolution uses the UDP-connect trick: DatagramSocket.connect performs a local routing/source-address lookup only — it never sends or receives data. No send()/receive() or any other I/O may EVER be added to this path; doing so would turn an attacker-influenceable destinationIp into an outbound probe.

    The method never throws — every failure emits a telemetry failure event with the appropriate TelemetryConstant.ErrorCode.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String resolve(String destinationIp, String trigger)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • resolve

        @WorkerThread() final String resolve(String destinationIp, String trigger)
        Parameters:
        destinationIp - the IPv6 destination used only for the local source-address lookup.
        trigger - the resolution trigger, emitted in the resolve/encode/failure telemetry payloads.
        Returns:

        the 22-character base64url-encoded global IPv6 source address, or null on any failure.