diff --git a/docs/types.rst b/docs/types.rst index 2becca4..eb0ee9d 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -96,9 +96,11 @@ protocol str One of ``ICMP``, ``TCP``, ``UDP`` hops list A list of :ref:`traceroute-hop` objects total_hops int The total number of hops ip_path list A list of dicts containing the IPs at each hop. This is just for convenience as all of these values are accessible via the :ref:`traceroute-hop` and :ref:`traceroute-packet` objects. -last_rtt float The RTT from the last successful hop +last_median_rtt float The median value of all RTTs from the last successful hop destination_ip_responded bool Set to ``True`` if the last hop was a response from the destination IP last_hop_responded bool Set to ``True`` if the last hop was a response at all +is_success bool Set to ``True`` if the traceroute finished successfully +last_hop_errors list A list of last hop's errors ======================== ======== =================================================================================== @@ -114,6 +116,7 @@ Property Type Explanation ===================== ===== ================================================================ index int The hop number, starting with 1 packets list A list of tracroute :ref:`traceroute-packet` objects +median_rtt float The median value of all RTTs of the hop ===================== ===== ================================================================ diff --git a/ripe/atlas/sagan/traceroute.py b/ripe/atlas/sagan/traceroute.py index f94fd11..41d5989 100644 --- a/ripe/atlas/sagan/traceroute.py +++ b/ripe/atlas/sagan/traceroute.py @@ -191,7 +191,11 @@ def set_is_success(self, last_hop): self.set_last_hop_errors(last_hop) def set_last_hop_errors(self, last_hop): - """Sets the last hop's errors..""" + """Sets the last hop's errors.""" + if last_hop.is_error: + self.last_hop_errors.append(last_hop.error_message) + return + for packet in last_hop.packets: if packet.is_error: self.last_hop_errors.append(packet.error_message)