ft_traceroute is a project undertaken at 42 School that involves re-coding the traceroute command.
This implementation of traceroute uses TCP packets for probes and raw sockets to receive ICMP responses and therefore must be run as root.
You will need make
and gcc
to compile.
-
Clone the repository:
git clone https://github.com/rkowalsk/ft_traceroute.git
-
Navigate to the project directory:
cd ft_traceroute
-
Compile the program:
make
-
Run the ft_traceroute command as root:
./ft_traceroute [options] host
Example:
sudo ./ft_traceroute fsf.org
-f first_ttl
Start from the first_ttl hop (default is 1)-m max_ttl
Set the max number of hops (max TTL to be reached) (default is 30)-N squeries
Set the number of probes to be tried simultaneously (default is 16)-q nqueries
Set the number of probes per each hop (default is 3)-p port
Set the destination port to use (incremented by each probe, default is 33434)-z sendwait
Minimal time interval between probes (default 0). Automatically sets squeries to 1, overriding any value set by -N. If the value is more than 10, then it specifies a number in milliseconds, else it is a number of seconds--help
Show the help