traviscross / mtr

Official repository for mtr, a network diagnostic tool
http://www.bitwizard.nl/mtr/
GNU General Public License v2.0
2.7k stars 341 forks source link

multiple addresses per hop #109

Open pekeler opened 8 years ago

pekeler commented 8 years ago

When running interactively, I may get multiple addresses per hop such as here

 4. ffm-bb1-link.telia.net (80.91.246.224)    0.0%    15   22.7  19.0  10.1  62.7  14.3
 5. ash-bb3-link.telia.net (213.155.135.57)   0.0%    15  125.7  81.7  10.7 146.7  60.7
    nyk-bb1-link.telia.net (213.155.131.145)
    nyk-bb1-link.telia.net (213.155.131.147)
    ffm-b1-link.telia.net (62.115.116.160)
    ffm-b1-link.telia.net (62.115.116.164)
    ash-bb3-link.telia.net (62.115.139.43)
    ffm-b1-link.telia.net (62.115.116.158)
    ash-bb3-link.telia.net (62.115.139.41)
 6. ffm-bb2-link.telia.net (62.115.141.238)   0.0%    15  140.7  79.7  10.5 140.7  53.4

Why don't we get this information when running --report or in split mode?

rewolff commented 8 years ago

For report mode I would hazard a guess that the support for multiple address per hop was implemented, and then "report mode" was not upgraded to support it.

For split mode, the idea is that mtr would eventually be split into several separate processes. One doing the network stuff and the display parts running one at a time as a separate process.

I would expect split mode to simply output the information that it has gathered: "got a response from hop 5 from IP xxxx after YYY ms."

pekeler commented 8 years ago

Just noticed that this issue is in the TODO since 2008 https://github.com/traviscross/mtr/blob/faa1bd87e4325b604223aaa8ad5517872ccb7336/TODO#L44-L47

rewolff commented 8 years ago

Well... Sounds about right.... :-) When I started being mtr-maintainer, I had the occasional "day" that I could spend on mtr and would implement things myself. Nowadays I'm too busy with other stuff that I can manage merging stuff from others, but I'm not available for "Could you make this extension for me?" kind of work.

Feel free to clone the repository and submit a pull request or a patch. This -r stuff and the other IP addresses isn't that difficult. Could be 1 hour of "getting to know your way around" and 20 minutes of coding, but it depends enormously on your experience level.

atib92 commented 4 years ago

I was experimenting with the code and tried to fix this. Patch here : https://github.com/traviscross/mtr/compare/master...atib92:mtr-109

Before :

before

After :

after