Reliable Datagram Protocol (RDP)

General description:
This was one of the projects that I developed for the network course in 2007. The main idea was to develope an application layer on top of UDP layer in order to make UDP reliable similar to TCP. In other words, the implemnted RDP layer was going to add the following features to UDP layer:

- Error Control
- Flow Control
- Checksum

Implementation period: Oct - Nov 2007.

RDP Sender:

I developed an RDP sender (talker.c) which was responsible for sending packets and waiting for acks. The goal was to transmit a large file from a node in Internet to another remote node in Internet successfully. The assumption was that the network can randomly corrupt, delay and drop packets. Thus, the sender was implemented in a way to simulate a TCP transmitter behavior. It basically was using a sliding window along two threads one resposible for sending data packets (RDP packets) and the other one responsible for receiving acks from the RDP receiver.

RDP Receiver:

The RDP receiver (listener.c) was also developed in order to simulate the behavior of a TCP receiver. Similar to the sender, it uses a sliding window in order to store received packets and pass them to the application layer. The receiver also has two threads one responsible for receiving RDP data packets and storing them in a circular buffer for the application layer and the other one responsible for sending acks to the RDP sender.

How to test?:

For testing our RDP protocol, we had a relay node which was acting as an intermediate node between the RDP sender/receiver and was responsible to emulate Internet properties. In particular, the relay node could randomly corrupt, add delay and drop RDP packets.

Language: C
No of lines: 1954
Used data structures: Circular buffers
Used libraries: POSIX Thread, UNIX sockets, POSIX signals