Traceroute.Result.Hop (traceroute v0.2.5)

View Source

Represents a hop in a traceroute, containing one or more probe results.

A hop groups all probe responses for a given TTL value. When multiple probes are sent in parallel, they are collected into a single hop.

Fields

  • :ttl - The TTL value used for this hop (hop number)
  • :probes - List of probe results for this hop

Summary

Functions

Creates a new Hop 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.Hop{
  probes: [Traceroute.Result.Probe.t()],
  ttl: pos_integer()
}

Functions

new(ttl, probe_or_probes)

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

source_addr(hop)

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

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