Simple ICMP traceroute
Traceroute shows a path through the Internet from your computer to a specified address. This implementation uses ICMP packages and raw sockets. Only paths up to specified limit of steps (32 by default) are recognized.
When there are replies for any of the requests sent, then reply addresses are displayed with their reply times and average reply time at the end:
<step>. <reply address> -- <reply times> [/ <reply address> -- <reply times>...] (avg <average reply time>)
When there are no replies, then a single asterisk character is displayed:
<step>. *
versions last used by the author are in double parentheses and italic
General:
- Linux-based operating system
((Debian testing)) - C++ compiler
((APT packageg++
, 12.3.+)) - CMake
((APT packagecmake
, 3.26.+)) - GNU Make
((APT packagemake
, 4.3.+))
- Clang-format
((APT packageclang-format
, 14.+))
Traceroute can be built using CMake that generates GNU Make Makefile.
Follow these steps to build:
$ cd /path/to/project/directory/
$ mkdir build
$ cd build
$ cmake ..
$ make
Make sure you've got
sudo
privileges, so as to use raw sockets! Otherwise traceroute app won't work.
Traceroute can be run directly using the executable file in the buildOut/bin
root directory:
$ sudo /path-to-project-directory/buildOut/bin/traceroute OPTIONS ARGUMENTS
traceroute [-L limit] ADDRESS
Track the route of Internet packages on their path to IPv4 address ADDRESS. Only paths of length up to limit are being tracked.
-L limit
Declare maximal path length to track, default is 32.