Bug 22770

Summary: traceroute enhancement for multiple paths
Product: Base System Reporter: jesper <jesper>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: ncbp
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description jesper 2000-11-11 16:30:00 UTC
	When using traceroute, and multiple paths exist, we currently get a 
ugly and hard to read output like the below

$ /usr/sbin/traceroute pannxt1
traceroute to pannxt1.ip.tele.dk (195.249.8.42), 30 hops max, 40 byte packets
 1  eth9-0-0.sltnxt2.ip.tele.dk (193.162.159.76)  1.098 ms  0.885 ms  0.833 ms
 2  pos0-3.155M.arcnxg2.ip.tele.dk (195.249.12.245)  0.988 ms  1.003 ms  0.901 ms
 3  atm0-0-0-72.60M.abnxt2.ip.tele.dk (195.249.11.25)  16.220 ms  8.541 ms  8.289 ms
 4  fe1-0-0.100M.abnxt1.ip.tele.dk (195.249.112.225)  11.734 ms  8.727 ms  10.048 ms
 5  ser3-0.bstnxt1.ip.tele.dk (195.249.13.45)  11.791 ms ser6-2.bstnxt1.ip.tele.dk (195.249.13.69)  9.034 ms ser3-1.bstnxt1.ip.tele.dk (195.249.4.109)  8.462 ms
 6  ser3-2.pannxt1.ip.tele.dk (195.249.5.21)  8.954 ms *  9.245 ms

With my patch the output is much nicer

$ /usr/local/sbin/traceroute pannxt1
traceroute to pannxt1.ip.tele.dk (195.249.8.42), 30 hops max, 40 byte packets
 1  eth9-0-0.sltnxt2.ip.tele.dk (193.162.159.76)  1.101 ms  1.008 ms  0.913 ms
 2  pos0-3.155M.arcnxg2.ip.tele.dk (195.249.12.245)  1.329 ms  0.961 ms  1.016 ms
 3  atm0-0-0-72.60M.abnxt2.ip.tele.dk (195.249.11.25)  8.499 ms  13.927 ms  8.320 ms
 4  fe1-0-0.100M.abnxt1.ip.tele.dk (195.249.112.225)  8.812 ms  8.898 ms  8.980 ms
 5  ser3-1.bstnxt1.ip.tele.dk (195.249.4.109)  8.643 ms
    ser3-0.bstnxt1.ip.tele.dk (195.249.13.45)  11.241 ms
    ser6-2.bstnxt1.ip.tele.dk (195.249.13.69)  9.013 ms
 6  ser3-2.pannxt1.ip.tele.dk (195.249.5.21)  9.083 ms *  9.084 ms

Fix: Apply the below patch to /usr/src/contrib/traceroute/traceroute.c
How-To-Repeat: 	run traceroute to a distination where multiple paths exist.
Comment 1 Will Andrews freebsd_committer freebsd_triage 2000-12-03 23:27:11 UTC
State Changed
From-To: open->closed

Since Craig (traceroute maintainer at LBL) won't merge this into the official 
traceroute distribution, it can't be put on the vendor branch and thus it's 
not worth it.  As Craig sugested, you can just make a sed script or something.