From 409cedbeac5c2e1808e308a825de935d41005ac1 Mon Sep 17 00:00:00 2001 From: Andrea Barberio Date: Fri, 5 Feb 2021 11:19:53 +0000 Subject: [PATCH] Draw both source and dest ports Both ports are more useful. This also helps when a traceroute iterated over source ports instead of assuming that the iterated port is always the destination one. Signed-off-by: Andrea Barberio --- dublintraceroute/dublintraceroute.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dublintraceroute/dublintraceroute.py b/dublintraceroute/dublintraceroute.py index da3d57a..c7d73b5 100644 --- a/dublintraceroute/dublintraceroute.py +++ b/dublintraceroute/dublintraceroute.py @@ -182,7 +182,8 @@ def to_graphviz(traceroute, no_rtt=False): else: next_nodename = next_received['ip']['src'] if index == 0: - edgeattrs['label'] = 'dport\n{dp}'.format(dp=flow) + u = nexthop['sent']['udp'] + edgeattrs['label'] = 'srcport {sp}\ndstport {dp}'.format(sp=u['sport'], dp=u['dport']) rtt = nexthop['rtt_usec'] try: if previous_nat_id != nexthop['nat_id']: