Newer
Older
# Implementation of TRTP Protocol - LINFO1341 Project
For the course **LINFO1341 : Conputer Network**, given to 3rd year computer science students at UCLouvain, we had to implement a transport protocol. The protocol is entitled **Truncated Relieable Transport Protocol (TRTP)** on top of a Ipv6 Network layer. The protocol also implement the **Forward Erasure Correction (FEC)** to recover corrupted packets. The full description of the protocol is to be found in the `statement.pdf`.
In order to execute the code, one must first execute the Makefile:
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
For debugging please run
```
make debug
```
Then use the specified arguments explained in the `statement.pdf`.
## 3. Folder Organization
```
| headers/
| linksimulator/
| src/
| test_files/
| tests/
| unwanted_logs/
```
### 3. 1. `linksimulator/`
This folder contains a [git repository](https://github.com/cnp3/Linksimulator). We use the linksimulaor to simulate a network with certain configurations like packets loss, delays, etc. Full description in the `linksimulator/README.md`. We did not write any of the code in the folder.
### 3. 2. `test_files/`
This folder contains testing files that we will be sendig between the `receiver` and the `sender`. Any file added to this folder will automatically be used in tests suites.
## 4. Testing
For the testing we have a specific directory that contains our shell script tests. In order to execute our tests we advise to run the following Makefile command
```
make tests -s
```
The silent argument `-s` is to silence any Makefile output and only leave the messages of the tests. In order to test the transfer of a file, you have to add a file in the `test_files`. The suite cases will automatically load the fle and transfer using our protocol.
We have two types of tests suites. *Simple* and *Advanced* test suites.
### 4. 1. *Simple* Test Suites
Simple tests don't use `linksimulator`, however they use `Valgrind` to check memory usage in both the sender and the receiver. After executing the `make [debug]`. One can run a simple test with the following command :
```
./tests/simple_test.sh <path_to_file>
```
The output for each file sent using the simple test is to be found in the `unwanted_logs/`. They respect the following format :
| File in `unwanted_logs/` | Contains |
| :-- | :-- |
| `<file_basename>`_received_file.`<file_extension>` | This is the file received by the `receiver`.|
| `<file_basename>`_receiver.log | Contains the valgrind log of the `receiver`. |
| `<file_basename>`_sender.log | Contains the valgrind log of the `sender`. |
| receiver.log | Contains the output on the stderr of the `receiver`. |
| sender.log | Contains the output on the stderr of the `sender`. |
The stdout prints *Le transfert est réussi!*, upon success else it prints the comparison between the sent file and the received file.