Traceroute.Result.DestinationReached (traceroute v0.2.5)

View Source

Represents a successful traceroute result where the destination was reached.

This result is returned when:

  • An ICMP Echo Reply is received from the target IP
  • An ICMP Destination Unreachable (Port Unreachable) is received for UDP probes
  • A TCP connection is established or reset by the target

When multiple probes are sent in parallel, they are collected into a single DestinationReached result with all probes listed.

Fields

  • :ttl - The TTL value at which the destination was reached (hop count)
  • :probes - List of individual probe results for this destination

Summary

Functions

Creates a new DestinationReached result from a TTL and a single probe or list of probes.

Returns the source address from the first probe, or nil if no probes.

Types

t()

@type t() :: %Traceroute.Result.DestinationReached{
  probes: [Traceroute.Result.Probe.t()],
  ttl: pos_integer()
}

Functions

new(ttl, probe_or_probes)

Creates a new DestinationReached result from a TTL and a single probe or list of probes.

source_addr(destination_reached)

@spec source_addr(t()) :: :inet.ip4_address() | nil

Returns the source address from the first probe, or nil if no probes.