Skip to content

ref-humbold/Traceroute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traceroute

Release License

Simple ICMP traceroute

About

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.

Output format

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>. *

Dependencies

Standard build & run

versions last used by the author are in double parentheses and italic

General:

  • Linux-based operating system
    ((Debian testing))
  • C++ compiler
    ((APT package g++, 12.3.+))
  • CMake
    ((APT package cmake, 3.26.+))
  • GNU Make
    ((APT package make, 4.3.+))

Automated formatting


How to build?

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

How to run?

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

Synopsis

traceroute [-L limit] ADDRESS

Description

Track the route of Internet packages on their path to IPv4 address ADDRESS. Only paths of length up to limit are being tracked.

Options

-L limit

Declare maximal path length to track, default is 32.