Skip to content

Commit

Permalink
Draw both source and dest ports
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
insomniacslk committed Feb 5, 2021
1 parent bd24b17 commit 409cedb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dublintraceroute/dublintraceroute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']:
Expand Down

0 comments on commit 409cedb

Please sign in to comment.