ft_traceroute is a simplified implementation of the classic traceroute utility. It traces the route that packets take to a network host, displaying each hop along the way.
- Sends UDP probes with increasing TTL to discover each hop to the destination.
- Displays the IP address and round-trip time for each hop.
- Bonus: Additional options and features (see below).
./ft_traceroute <destination>For the bonus version (with extra options):
./ft_traceroute_bonus <destination> [options]Options available in all versions:
--helpShow the help message
Available only in the bonus version (ft_traceroute_bonus):
-f, --first-hop=NUMSet the initial hop (TTL) value (default: 1)-m, --max-hop=NUMSet the maximum number of hops to probe (default: 64)-p, --port=PORTSet the destination port for probes (default: 33434)-q, --tries=NUMSet the number of probe packets per hop (default: 3)--resolve-hostnamesResolve and display hostnames in addition to IP addresses-w, --wait=NUMSet the timeout in seconds to wait for each response (default: 3)-?, --helpShow the help message--usageShow a short usage message-V, --versionShow program version information
sudo ./ft_traceroute google.com# Set first hop to 5, max hop to 30, and use 5 tries per hop
sudo ./ft_traceroute_bonus -f 5 -m 30 -q 5 8.8.8.8To build the project with bonus features, run:
make bonusOr, to build the mandatory part only:
make- GCC or Clang
- Make
- Root privileges may be required to receive raw icmp packets.
- This project is for educational purposes.
WTFPL – Do What the Fuck You Want to Public License
