This repository implements Transport Layer Protocols in C as part of an academic assignment for a university course in Computer Networks.
✅ The core highlight of this project is found in Part B, where I designed and implemented a fully functional Reliable UDP (RUDP) protocol from scratch — including handshake, retransmission logic, timeouts, sequencing, and integrity validation.
📌 This project is featured in my CV as a demonstration of my ability to implement low-level networking systems in C.
- ✅ TCP Sender/Receiver with Reno & Cubic congestion control
- ✅ Custom Reliable UDP (RUDP) protocol with:
- Handshake mechanism (SYN/ACK)
- Packet acknowledgment (ACK)
- Timeout + retransmissions
- Custom header and checksum verification
- 📊 Performance analysis across various packet loss scenarios
- 🛠️ Written in pure C for Ubuntu 22.04 (no WSL)
| Field | Size | Description |
|---|---|---|
length_data |
4 bytes | Number of bytes in the payload |
sequence_number |
4 bytes | Sequence number of the packet |
checksum |
4 bytes | 16-bit checksum (RFC1071-style, stored as int) |
flags |
4 bytes | Packet type: SYN, ACK, DATA, FIN, etc. |
data |
≤65000B | The actual file content being transmitted |
Total header size: 16 bytes (without data).
Receiver:
./TCP_Receiver -p <PORT> -algo <reno|cubic>Sender:
./TCP_Sender -ip <RECEIVER_IP> -p <PORT> -algo <reno|cubic>Receiver:
./RUDP_Receiver -p <PORT>Sender:
./RUDP_Sender -ip <RECEIVER_IP> -p <PORT>- Tests performed on 0%, 2%, 5%, and 10% simulated packet loss (
tc netem) - 5× repetitions for each scenario and protocol
- Measured: Transfer time and bandwidth (MB/s)
- All output logged and analyzed
.
├── TCP_Sender.c / TCP_Receiver.c # TCP file transfer
├── RUDP_Sender.c / RUDP_Receiver.c # RUDP file transfer
├── RUDP_API.c / RUDP_API.h # Custom protocol logic
├── Makefile # For building the project
└── README.md # You're here!
Noam Cohen
This repository is submitted as part of an academic project and is not to be reused without permission.