A collection of custom-built network diagnostic utilities written in C. This toolkit includes tools for measuring Round Trip Time (RTT), benchmarking UDP throughput (similar to iperf), and mapping network hops using raw ICMP sockets.
-
RTT Echo Suite (
RTT_Echo/)- A UDP server and client designed to measure packet latency.
- Calculates real-time Round Trip Time (RTT) and packet loss percentages over a specified interval.
-
Throughput Benchmarker (
Throughput_Test/)- An
iperf-like UDP client that utilizes non-blocking sockets to stress-test network links. - Logs real-time throughput (Mbps) and average delay metrics to a CSV file.
- Includes a Python visualization script (
plot_throughput.py) to generate throughput vs. delay graphs using Matplotlib.
- An
-
Custom Traceroute (
Traceroute/)- Maps the network path to a specific domain or IP address.
- Built using raw sockets (
IPPROTO_ICMPandIPPROTO_UDP) to manually manipulate IP Time-To-Live (TTL) fields and catchICMP_TIME_EXCEEDEDandICMP_DEST_UNREACHresponses.
- C Compiler:
gcc - Python 3: Required for generating throughput graphs.
- Dependencies:
pip install matplotlib
- Dependencies:
- Root Permissions: The Traceroute tool requires
sudoprivileges to open raw sockets.
1. Compilation:
cd RTT_Echo
gcc rtt_server.c -o rtt_server
gcc rtt_client.c -o rtt_client2. Running the Server: The server listens for UDP packets on a specified port and echoes them back exactly.
# In Terminal 1
./rtt_server <port>
# Example:
./rtt_server 80013. Running the Client: The client sends packets containing a sequence number and timestamp, waits for echoes, and computes RTT.
# In Terminal 2
./rtt_client <server_ip> <port> <num_messages> <interval_ms> <packet_size>
# Example (sending 10 packets to localhost:8001, every 1000ms, 64 bytes each):
./rtt_client 127.0.0.1 8001 10 1000 64Dependency Note: The Throughput_Test Client relies on the rtt_server built in RTT_Echo! Please ensure the server from RTT_Echo is running before running the client for Throughput_Test
1. Compilation:
cd Throughput_Test
gcc iperf_client.c -o iperf_client2. Start the Server (if not already running):
# In Terminal 1
cd ../RTT_Echo
./rtt_server 80013. Run the iperf Client:
# In Terminal 2
cd ../Throughput_Test
./iperf_client <server_ip> <port> <duration_sec> <packet_size>
# Example (testing throughput to localhost:8001 for 10 seconds, 1024 bytes per packet):
./iperf_client 127.0.0.1 8001 10 1024This will perform the throughput test and automatically generate a file named iperf_metrics.csv.
4. Generate Graphs:
# In Terminal 3 (or after the iperf_client finishes)
# Requires matplotlib (pip install matplotlib)
python3 plot_throughput.pyThis script will read iperf_metrics.csv and generate throughput_delay_graph.png, showing throughput and delay over time.
Compile and run the traceroute tool against a target domain (requires root for raw socket access):
1. Compilation:
cd Traceroute
gcc traceroute.c -o traceroute2. Running Traceroute:
Since this program uses raw ICMP sockets (IPPROTO_ICMP) to receive data, it requires administrative capabilities (sudo).
sudo ./traceroute <destination_ip_or_domain>
# Example:
sudo ./traceroute google.comThank you for visiting!



