Traceroute.Result.Probe (traceroute v0.2.3)

View Source

Represents a single probe response in a traceroute.

A probe is recorded when a router along the path responds with an ICMP Time Exceeded message after the packet's TTL reaches zero.

Fields

  • :ttl - The TTL value used for this probe (hop number)
  • :time - Round-trip time in microseconds
  • :source_addr - IP address of the responding router as a tuple
  • :source_domain - Hostname of the responding router (or IP string if DNS lookup fails)
  • :reply - The parsed ICMP response struct

Summary

Functions

Creates a new Probe from the TTL, response time, IPv4 header, and ICMP data.

Returns the round-trip time formatted in milliseconds.

Types

t()

@type t() :: %Traceroute.Result.Probe{
  reply: Traceroute.Protocols.ICMP.t(),
  source_addr: :inet.ip_address(),
  source_domain: String.t(),
  time: non_neg_integer(),
  ttl: pos_integer()
}

Functions

new(ttl, time, ip_header, icmp)

Creates a new Probe from the TTL, response time, IPv4 header, and ICMP data.

time_ms(probe)

@spec time_ms(t()) :: float()

Returns the round-trip time formatted in milliseconds.