diff --git a/.gitignore b/.gitignore
index 6f3007984042ed242514f672889e8f278a7576c3..2d0728febc80be2c71e761c567863de643f48974 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
 *.o
 .vscode/
-tests_logs/*
+tests_logs/
 log_files/
 *.zip
 linksimulator/
diff --git a/Makefile b/Makefile
index 2e5aabb1e5fe2ce0a3820b4ca918ac4bcc3c05ea..19d84b45c1e2a42f74e9c5dc71a75d011918e931 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ RECEIVER_OBJECTS = $(RECEIVER_SOURCES:.c=.o)
 SENDER = sender
 RECEIVER = receiver
 
-all: debug
+all: aux
 
 aux: $(RECEIVER) $(SENDER)
 
@@ -50,6 +50,9 @@ tests: debug
 debug: CFLAGS += -D_DEBUG
 debug: clean aux
 
+perfomance: aux
+	@./tests/run_perfomance.sh
+
 # Place the zip in the parent repository of the project
 ZIP_NAME="../projet1_ingenzi_demeester.zip"
 
diff --git a/maldives.log b/maldives.log
index d98e18e2fcf332f4ddd1ac4aeb365a1db46541e9..e91d474d30d2830983c68e6dda12fb22a17e9732 100644
--- a/maldives.log
+++ b/maldives.log
@@ -20,5 +20,3 @@ Maldives (DNS)
 --- 103.110.109.106 ping statistics ---
 120 packets transmitted, 105 received, 12,5% packet loss, time 119255ms
 rtt min/avg/max/mdev = 230.242/352.584/744.943/93.245 ms
-
-
diff --git a/performance_results/ideal/output.gif b/performance_results/ideal/output.gif
new file mode 100644
index 0000000000000000000000000000000000000000..f82eea1117a98a8c36fb615c5f34a3488272405c
Binary files /dev/null and b/performance_results/ideal/output.gif differ
diff --git a/performance_results/ideal/receiver_1_with_FEC.csv b/performance_results/ideal/receiver_1_with_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..6ff186209aeb8cff2fcad20d86b39a306f9d8e7e
--- /dev/null
+++ b/performance_results/ideal/receiver_1_with_FEC.csv
@@ -0,0 +1,12 @@
+data_sent:0
+data_received:5809
+data_truncated_received:22
+fec_sent:0
+fec_received:736
+ack_sent:30748
+ack_received:0
+nack_received:0
+packet_ignored:433
+throughput:160229
+packet_duplicated:1283
+packet_recovered:137
diff --git a/performance_results/ideal/receiver_1_without_FEC.csv b/performance_results/ideal/receiver_1_without_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..26ada8959f8a4e53aead72711992b3fd322312a6
--- /dev/null
+++ b/performance_results/ideal/receiver_1_without_FEC.csv
@@ -0,0 +1,12 @@
+data_sent:0
+data_received:5548
+data_truncated_received:24
+fec_sent:0
+fec_received:0
+ack_sent:27989
+ack_received:0
+nack_received:0
+packet_ignored:314
+throughput:142028
+packet_duplicated:1022
+packet_recovered:0
diff --git a/performance_results/ideal/receiver_2_with_FEC.csv b/performance_results/ideal/receiver_2_with_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..2712335800c0c6f0a6ff33ded7b801d4e7be2187
--- /dev/null
+++ b/performance_results/ideal/receiver_2_with_FEC.csv
@@ -0,0 +1,12 @@
+data_sent:0
+data_received:5727
+data_truncated_received:23
+fec_sent:0
+fec_received:773
+ack_sent:31194
+ack_received:0
+nack_received:0
+packet_ignored:382
+throughput:157803
+packet_duplicated:1201
+packet_recovered:129
diff --git a/performance_results/ideal/receiver_2_without_FEC.csv b/performance_results/ideal/receiver_2_without_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..29b36fce60cf762fd23ab52e33266ef88e32ab47
--- /dev/null
+++ b/performance_results/ideal/receiver_2_without_FEC.csv
@@ -0,0 +1,12 @@
+data_sent:0
+data_received:5606
+data_truncated_received:27
+fec_sent:0
+fec_received:0
+ack_sent:30308
+ack_received:0
+nack_received:0
+packet_ignored:310
+throughput:143513
+packet_duplicated:1080
+packet_recovered:0
diff --git a/performance_results/ideal/receiver_3_with_FEC.csv b/performance_results/ideal/receiver_3_with_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e1dce55267a22248d1aac8570171249906de5e6c
--- /dev/null
+++ b/performance_results/ideal/receiver_3_with_FEC.csv
@@ -0,0 +1,12 @@
+data_sent:0
+data_received:5956
+data_truncated_received:18
+fec_sent:0
+fec_received:736
+ack_sent:38703
+ack_received:0
+nack_received:0
+packet_ignored:447
+throughput:0.001891
+packet_duplicated:1430
+packet_recovered:140
diff --git a/performance_results/ideal/receiver_3_without_FEC.csv b/performance_results/ideal/receiver_3_without_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..7bb934be9ef82f9860c4209b96d7c4235ddc7008
--- /dev/null
+++ b/performance_results/ideal/receiver_3_without_FEC.csv
@@ -0,0 +1,12 @@
+data_sent:0
+data_received:5818
+data_truncated_received:19
+fec_sent:0
+fec_received:0
+ack_sent:36408
+ack_received:0
+nack_received:0
+packet_ignored:430
+throughput:0.001804
+packet_duplicated:1292
+packet_recovered:0
diff --git a/performance_results/ideal/sender_1_with_FEC.csv b/performance_results/ideal/sender_1_with_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..da7642f23a9ecd50d36caff12fb4bcb91c5e6310
--- /dev/null
+++ b/performance_results/ideal/sender_1_with_FEC.csv
@@ -0,0 +1,13 @@
+data_sent:35290
+data_received:0
+data_truncated_received:0
+fec_sent:1132
+fec_received:0
+ack_sent:0
+ack_received:30748
+nack_received:22
+packet_ignored:0
+throughput:0
+min_rtt:4
+max_rtt:243
+packet_retransmitted:30764
diff --git a/performance_results/ideal/sender_1_without_FEC.csv b/performance_results/ideal/sender_1_without_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..1d7090bceafc91524c9ac491c9948420afd79570
--- /dev/null
+++ b/performance_results/ideal/sender_1_without_FEC.csv
@@ -0,0 +1,13 @@
+data_sent:32534
+data_received:0
+data_truncated_received:0
+fec_sent:0
+fec_received:0
+ack_sent:0
+ack_received:27989
+nack_received:24
+packet_ignored:0
+throughput:0
+min_rtt:6
+max_rtt:221
+packet_retransmitted:28008
diff --git a/performance_results/ideal/sender_2_with_FEC.csv b/performance_results/ideal/sender_2_with_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..d8d8f26fb6d67a4f5946388cef31048a2097bff2
--- /dev/null
+++ b/performance_results/ideal/sender_2_with_FEC.csv
@@ -0,0 +1,13 @@
+data_sent:35700
+data_received:0
+data_truncated_received:0
+fec_sent:1132
+fec_received:0
+ack_sent:0
+ack_received:31158
+nack_received:23
+packet_ignored:0
+throughput:0
+min_rtt:3
+max_rtt:261
+packet_retransmitted:31174
diff --git a/performance_results/ideal/sender_2_without_FEC.csv b/performance_results/ideal/sender_2_without_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..2472fdd387bc3c73a5163e3db5e73162bdf6ec1d
--- /dev/null
+++ b/performance_results/ideal/sender_2_without_FEC.csv
@@ -0,0 +1,13 @@
+data_sent:34834
+data_received:0
+data_truncated_received:0
+fec_sent:0
+fec_received:0
+ack_sent:0
+ack_received:30290
+nack_received:27
+packet_ignored:0
+throughput:0
+min_rtt:4
+max_rtt:257
+packet_retransmitted:30308
diff --git a/performance_results/ideal/sender_3_with_FEC.csv b/performance_results/ideal/sender_3_with_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..9b12bfa1fe354bcad2609ccce0616598dae94f88
--- /dev/null
+++ b/performance_results/ideal/sender_3_with_FEC.csv
@@ -0,0 +1,13 @@
+data_sent:43186
+data_received:0
+data_truncated_received:0
+fec_sent:1132
+fec_received:0
+ack_sent:0
+ack_received:38652
+nack_received:18
+packet_ignored:0
+throughput:0.000000
+min_rtt:4
+max_rtt:242
+packet_retransmitted:38660
diff --git a/performance_results/ideal/sender_3_without_FEC.csv b/performance_results/ideal/sender_3_without_FEC.csv
new file mode 100644
index 0000000000000000000000000000000000000000..023d6a31ddf27660f5d4a9e19dd6b1c5f96b084b
--- /dev/null
+++ b/performance_results/ideal/sender_3_without_FEC.csv
@@ -0,0 +1,13 @@
+data_sent:40947
+data_received:0
+data_truncated_received:0
+fec_sent:0
+fec_received:0
+ack_sent:0
+ack_received:36408
+nack_received:19
+packet_ignored:0
+throughput:0.000000
+min_rtt:1
+max_rtt:301
+packet_retransmitted:36421
diff --git a/src/packet_interface.c b/src/packet_interface.c
index a255a01a67b5e0921fc35806f8cfb9950da3e79a..3fe2a110e2fe0cb21f1155cfdf34e4a82550c82b 100644
--- a/src/packet_interface.c
+++ b/src/packet_interface.c
@@ -40,12 +40,12 @@ pkt_status_code pkt_decode_ack_nack(const char *data, const size_t len, pkt_t *p
     if ( calculate_crc(data, 6) != crc1 )
         return E_CRC; 
 
-    const uint32_t timestamp;
-    memcpy((void *) &timestamp, &data[2], 4);
+    uint32_t timestamp;
+    memcpy((void *) &timestamp, (const void *) &data[2], 4);
 
     // Copy the information to pkt
     memcpy(&(pkt->header.front), data, 1);
-    const uint8_t seqnum = (uint8_t) data[1];
+    uint8_t seqnum = (uint8_t) data[1];
     pkt_set_seqnum(pkt, seqnum);
     pkt_set_timestamp(pkt, timestamp);
     pkt_set_crc1(pkt, crc1);
@@ -58,7 +58,7 @@ pkt_status_code pkt_decode_data_fec(const char *data, const size_t len, pkt_t *p
     uint16_t payload_length, actual_indicated_length;
     ptypes_t type = (data[0] & TYPE_MASK) >> TYPE_SHIFT; 
 
-    memcpy((void *) &actual_indicated_length, (void *) &data[1], 2);
+    memcpy((void *) &actual_indicated_length, (const void *) &data[1], 2);
     actual_indicated_length = ntohs(actual_indicated_length);
     payload_length = (type == PTYPE_DATA) ? actual_indicated_length : MAX_PAYLOAD_SIZE; // Fec are always of length 512
 
@@ -85,11 +85,11 @@ pkt_status_code pkt_decode_data_fec(const char *data, const size_t len, pkt_t *p
 
     // We set the TR to 0 in order to calculcate the CRC on the header
     char modified_header[8]; 
-    memcpy((void *) &modified_header, (void *) data, 8);
+    memcpy((void *) &modified_header, (const void *) data, 8);
     modified_header[0] = modified_header[0] & TR_SETTER_TO_ZERO; 
 
     uint32_t crc1;
-    memcpy((void *) &crc1, (void *) &data[8], 4);
+    memcpy((void *) &crc1, (const void *) &data[8], 4);
     crc1 = ntohl((uint32_t) crc1);
     if ( calculate_crc(modified_header, 8) != crc1 )
         return E_CRC; 
@@ -138,8 +138,8 @@ pkt_status_code pkt_encode_ACK_NACK(const pkt_t *pkt, char *buf, size_t *len)
     size_t required = ACK_OR_NACK_HEADER_SIZE;
     if (*len < required)
         return E_NOMEM;
-    memcpy((void *) &buf[0], (void *) &(pkt->header.front),   1);
-    memcpy((void *) &buf[1], (void *) &(pkt->header.seqnum),  1);
+    memcpy((void *) &buf[0], (const void *) &(pkt->header.front),   1);
+    memcpy((void *) &buf[1], (const void *) &(pkt->header.seqnum),  1);
     uint32_t timestamp = pkt_get_timestamp(pkt);
     memcpy((void *) &buf[2], (void *) &timestamp,             4);
     uint32_t crc1      = htonl(calculate_crc(buf, 6));
@@ -152,10 +152,10 @@ pkt_status_code pkt_encode_DATA_FEC(const pkt_t *pkt, char *buf, size_t *len)
 {   
     // Let's first copy the header
     if ( *len < PKT_MIN_HEADERLEN ) return E_NOMEM;
-    memcpy((void *) &buf[0],   (void *) &(pkt->header.front),   1);
+    memcpy((void *) &buf[0], (const void *) &(pkt->header.front),   1);
     uint16_t n_length  = htons(pkt_get_length(pkt));
     memcpy((void *) &buf[1], (void *) &n_length,                2);
-    memcpy((void *) &buf[3], (void *) &(pkt->header.seqnum),    1);
+    memcpy((void *) &buf[3], (const void *) &(pkt->header.seqnum),    1);
     uint32_t timestamp = pkt_get_timestamp(pkt);
     memcpy((void *) &buf[4], (void *) &timestamp,               4);
     uint32_t crc1      = htonl(calculate_crc(buf, 8));
@@ -174,7 +174,7 @@ pkt_status_code pkt_encode_DATA_FEC(const pkt_t *pkt, char *buf, size_t *len)
     *len =  sizeof(header_t) + TIMESTAMP_SIZE + CRC_SIZE + payload_length;
     if ( payload_length > 0 )
     {
-        memcpy((void *) &buf[12], (void *) pkt->payload, payload_length);
+        memcpy((void *) &buf[12], (const void *) pkt->payload, payload_length);
         uint32_t crc2 = htonl(calculate_crc(&buf[12], payload_length));
         memcpy((void *) &buf[12 + payload_length], (void *) &crc2, CRC_SIZE);
         *len = *len + CRC_SIZE;
diff --git a/src/receiver_utils.c b/src/receiver_utils.c
index 7a0f85d848b418bf60dc47bdfa7584afbf4fa591..ff3586eeb527ee80357424e3ec0e4ff6d3cd80e4 100644
--- a/src/receiver_utils.c
+++ b/src/receiver_utils.c
@@ -81,7 +81,7 @@ int consume_data_pkt(receiver_state_t * state, uint8_t seqnum_to_consume)
         return -1;
     }
     fflush(stdout);
-    state->latest_timestamp  = pkt_get_timestamp(state->recvd_data_buf[seqnum_to_consume]);
+    state->latest_receiver_timestamp  = pkt_get_timestamp(state->recvd_data_buf[seqnum_to_consume]);
     pkt_del(state->recvd_data_buf[seqnum_to_consume]);
     state->recvd_data_buf[seqnum_to_consume] = NULL;
     return 0;
@@ -233,7 +233,7 @@ int prepare_ack_to_send(receiver_state_t * state)
             return -1;
         }
     }
-    if (pkt_set_timestamp(state->ack_to_send, state->latest_timestamp) != 0)
+    if (pkt_set_timestamp(state->ack_to_send, state->latest_receiver_timestamp) != 0)
     {
         ERROR("Setting up timestamp for the packet");
         return -1;
@@ -487,7 +487,8 @@ int handle_valid_pkt(receiver_state_t * state, const pkt_t * pkt)
                seqnum, pkt_get_timestamp(pkt), state->recv_window_start, (state->recv_window_start + RECV_MAX_SLCTV_RPT_WDW) % TWO_EXP_EIGHT);
         return prepare_ack_to_send(state);
     }
-        
+    
+    state->timestamp_last_packet = time((time_t *) &(state->timestamp_last_packet));
     uint8_t tr = pkt_get_tr(pkt);
     if (tr == 1)
     {   /* If truncated */
@@ -546,6 +547,7 @@ int handle_incoming(struct pollfd * pfd, receiver_state_t * state)
  * 
  * @param pfd:    The pfd of the socket on which to receive file from.
  * @param state:  The buffer state.
+ * 
  * @returns As soons as the whole file is received.
  */
 void reception_loop(struct pollfd * pfd, receiver_state_t * state)
@@ -564,7 +566,9 @@ void reception_loop(struct pollfd * pfd, receiver_state_t * state)
         if (pfd->revents & POLLIN)
         {
             if (handle_incoming(pfd, state) != 0)   
+            {
                 return;
+            }
             if (state->last_data_packet < TWO_EXP_EIGHT)        /* This means we received last data packet transfer */     
                 gettimeofday(&last_packet_received, NULL);
  
@@ -634,7 +638,6 @@ void state_del(receiver_state_t * state)
     free(state->ack_to_send);
     free(state->stats);
     free(state);
-
 }
 
 void receiver_read_write_loop(int sfd, const char * pathname)
@@ -650,9 +653,16 @@ void receiver_read_write_loop(int sfd, const char * pathname)
     pfd->fd             = sfd; 
     pfd->events         = POLLIN | POLLOUT;
     if (wait_for_client(sfd) == 0)
+    {   
+        state->timestamp_first_packet = time((time_t *) &(state->timestamp_first_packet));
         reception_loop(pfd, state);
+    }
     DEBUG("Done the transfer with done status being %s", (state->transfer_done) ? "true" : "false");
-
+    sleep(2);
+    double time = difftime(state->timestamp_last_packet, state->timestamp_first_packet);
+    DEBUG("The difference between the two is %f seconds", (double) state->timestamp_last_packet - state->timestamp_first_packet);
+    DEBUG("The transfer took %f seconds", time);
+    state->stats->throughput = ((state->stats->data_received + state->stats->packet_recovered) * MAX_PAYLOAD_SIZE) / time;
     write_stats_to_file(pathname, state->stats, RECEIVER);
     state_del(state);
     free(pfd);
diff --git a/src/receiver_utils.h b/src/receiver_utils.h
index 1f77b62006483afcfa2f59ea326724f3ae2a1a43..e34e503d4e995c3ef5ab9f80d2e705768d7d786c 100644
--- a/src/receiver_utils.h
+++ b/src/receiver_utils.h
@@ -34,13 +34,15 @@
 #define FEC_CALCULATED_ON 4
 
 
-/* Represent the receiver's connection state */
-typedef struct __attribute__((__packed__))
+/* Represent the receiver's connection state 
+   Can't be a packed struct because of the struct timeval
+*/
+typedef struct
 {
     uint8_t curr_recv_window;
     uint8_t recv_window_start;        
     uint8_t last_received_in_order;
-    uint32_t latest_timestamp;
+    uint32_t latest_receiver_timestamp;
     pkt_t * recvd_data_buf[TWO_EXP_EIGHT]; 
     pkt_t * ack_to_send;
     pkt_t * nack_to_send[RECV_MAX_SLCTV_RPT_WDW];
@@ -49,6 +51,8 @@ typedef struct __attribute__((__packed__))
     uint16_t last_data_packet;
     uint16_t next_to_consume;
     transfer_stats_t * stats;
+    time_t timestamp_first_packet;
+    time_t timestamp_last_packet;
 } receiver_state_t;
 
 
diff --git a/src/utils.c b/src/utils.c
index 435fe402c2030ea21878c5dabceba6823af36347..de85d076686c8968a03f8b1cff19db7c0dd8b412 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -141,6 +141,9 @@ void write_stats_to_file(const char * pathname, transfer_stats_t * stats_file, a
     ret = sprintf((char *) &buffer, "packet_ignored:%llu\n", stats_file->packet_ignored);
     ret = write(fd, buffer, strlen(buffer));
 
+    ret = sprintf((char *) &buffer, "throughput:%llu\n", stats_file->throughput);
+    ret = write(fd, buffer, strlen(buffer));
+
     if (caller == RECEIVER)
     {
         ret = sprintf((char *) &buffer, "packet_duplicated:%llu\n", stats_file->packet_duplicated);
@@ -166,4 +169,4 @@ void write_stats_to_file(const char * pathname, transfer_stats_t * stats_file, a
     ret--; // dump
     DEBUG("Wrote the transfer statistics to %s.", pathname);
     return;
-}
\ No newline at end of file
+}
diff --git a/src/utils.h b/src/utils.h
index 4d07cc142cc7f67fb7b42b10931d56dbdcccf150..192160348aa755fe202b2b652e98d5a13033dbb7 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -7,6 +7,7 @@
 #include <netdb.h>
 #include <netinet/in.h>
 #include <poll.h>
+#include <time.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -35,6 +36,7 @@ typedef struct __attribute__((__packed__))
     unsigned long long int min_rtt;
     unsigned long long int max_rtt;
     unsigned long long int packet_retransmitted;
+    unsigned long long int throughput;
 } transfer_stats_t;
 
 /* The type of agents */ 
diff --git a/tests/perfomance_test.sh b/tests/perfomance_test.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9a94fabd01af6cd0d2f6012d7d5812bb5b1eb0c0
--- /dev/null
+++ b/tests/perfomance_test.sh
@@ -0,0 +1,116 @@
+#!/bin/bash
+
+GREEN='\033[0;32m'
+RED='\033[0;31m'
+NC='\033[0m'
+
+if [ -z "$1" ]; then 
+  echo "Not given the file to send"
+  exit 1
+fi 
+
+if [ -z "$2" ]; then 
+  echo "Not given the output dir to send"
+  exit 1
+fi 
+
+FILENAME=$1
+OUTPUT_DIR=$2
+BASENAME=$(basename $FILENAME)
+BSN_PRE="${BASENAME%.*}"
+BSN_EXT="${BASENAME##*.}"
+
+MODES=(
+  'with_FEC'
+  'without_FEC'
+)
+
+echo -e "The linksimulator paramateres are:
+        \t\t-ERROR RATE: ${ERROR_RATE}%    \t-DELAY:  ${DELAY}ms
+        \t\t-CUT RATE:   ${CUT_RATE}%      \t-JITTER: ${JITTER}ms 
+        \t\t-LOSS RATE:  ${LOSS_RATE}%\n"
+
+ITER=0
+OUTPUT=${OUTPUT_DIR}/output.${BSN_EXT}
+
+for ITER in 1 2 3; do 
+  for MODE in "${MODES[@]}"; do
+    
+    RECEIVER_STATS=${OUTPUT_DIR}/receiver_${ITER}_${MODE}.csv
+    SENDER_STATS=${OUTPUT_DIR}/sender_${ITER}_${MODE}.csv
+    touch ${RECEIVER_STATS} ${SENDER_STATS} ${OUTPUT}
+
+    # The next 2 lines come from: https://unix.stackexchange.com/questions/55913/whats-the-easiest-way-to-find-an-unused-local-port
+    # We use this to be sure we're using unused port
+    port1=$(comm -23 <(seq 65000 65200 | sort) <(ss -Htan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 1)
+    port2=$(comm -23 <(seq 65000 65200 | sort) <(ss -Htan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 1)
+
+    #####   Launching the link simulator   #####
+    ./linksimulator/link_sim -p $port2 -P $port1 -l ${LOSS_RATE} -d ${DELAY} -e ${ERROR_RATE} -c ${CUT_RATE} -j ${JITTER} \
+      1>/dev/null 2>&1 & link_pid=$!
+
+    #####   Launching the receiver and capturinig its output   #####
+    ./receiver ::1 $port1 -s ${RECEIVER_STATS} 1> ${OUTPUT} 2> /dev/null & receiver_pid=$!
+
+    cleanup()
+    {
+        kill -9 $receiver_pid
+        kill -9 $link_pid
+        exit 0
+    }
+    trap cleanup SIGINT  # Kill the background procces in case of ^-C
+
+    # Checking the mode (with out without FEC)
+    if [ $MODE = "with_FEC" ]; then
+      # We start the transfer
+      if ! ./sender -f ${FILENAME} ::1 $port2 -c -s ${SENDER_STATS} 2> /dev/null ; then
+        echo "The sender crashed!"
+        err=1  # We record the error
+      fi
+    else
+      # We start the transfer
+      if ! ./sender -f ${FILENAME} ::1 $port2 -s ${SENDER_STATS} 2> /dev/null ; then
+        echo "The sender crashed!"
+        err=1  # We record the error
+      fi
+    fi
+
+    sleep 5 # We wait 5s for the receiver to finish up
+
+    if kill -0 $receiver_pid &> /dev/null ; then
+      echo "The receiver didn't stop at the end of the transfer!"
+      kill -9 $receiver_pid
+      err=1
+    else  # We check the return value of the receiver
+      if ! wait $receiver_pid ; then
+        echo "Crash of the receiver!"
+        cat ${DIR}/adv_${BSN_PRE}_receiver.log
+        err=1
+      fi
+    fi
+
+    # Stop the link simulator
+    kill -9 $link_pid
+    wait $link_pid 2>/dev/null
+
+    # We verify that the transfer ran through properly
+    if [[ "$(md5sum ${FILENAME} | awk '{print $1}')" != "$(md5sum ${OUTPUT} | awk '{print $1}')" ]]; then
+      echo "The transfer corrupted the file!"
+      echo "Binary difference between the 2 files: (expected vs actual)"
+      diff -C 9 <(od -Ax -t x1z ${FILENAME}) <(od -Ax -t x1z ${OUTPUT})
+      if [ $MODE = "with_FEC" ]; then
+        echo -e "${RED}The transfer (with FEC) has failed!${NC}"
+      else
+        echo -e "${RED}The transfer (without FEC) has failed!${NC}"
+      fi
+      exit 1
+    else
+      if [ $MODE = "with_FEC" ]; then
+        echo -e "${GREEN}The transfer (with FEC) at ${ITER} iteration has succeeded!${NC}"
+      else
+        echo -e "${GREEN}The transfer (without FEC) at ${ITER} iteration has succeeded!${NC}"
+      fi
+    fi
+  done
+done
+exit ${err:-0}  # In case of error, we return the error code
\ No newline at end of file
diff --git a/tests/performances_tests.sh b/tests/performances_tests.sh
deleted file mode 100644
index e13371856e44ad86e2b3e9486af8dadbd01f875d..0000000000000000000000000000000000000000
--- a/tests/performances_tests.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-
-# File use for the test of performance
-file_to_transfer='tests_files/smile.png'
-
-# Chosen parameters for the test of performance
-ERROR_RATE=20
-CUT_RATE=30
-DELAY=0
-JITTER=0
-LOSS_RATE=25
-
-if [ ! -d "tests_logs/performance_tests/" ]; then
-  mkdir 'tests_logs/performance_tests/'
-fi
diff --git a/tests/run_perfomance.sh b/tests/run_perfomance.sh
new file mode 100755
index 0000000000000000000000000000000000000000..2a2128d2e454dc16c866c20d36e6444748ca5d53
--- /dev/null
+++ b/tests/run_perfomance.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# File use for the test of performance
+FILE_TO_TRANSFER='tests_files/thumbs-up-nod.gif'
+
+### 1. Ideal Case Transferr
+
+# Chosen parameters for Ideal scenario
+ERROR_RATE=1
+CUT_RATE=1
+DELAY=100
+JITTER=100
+LOSS_RATE=1
+if [ ! -d "performance_results/" ]; then
+  mkdir "performance_results/"
+fi
+
+if [ ! -d "performance_results/ideal" ]; then
+  mkdir "performance_results/ideal"
+fi
+export ERROR_RATE CUT_RATE DELAY JITTER LOSS_RATE && ./tests/perfomance_test.sh ${FILE_TO_TRANSFER} "performance_results/ideal/"
\ No newline at end of file
diff --git a/tests/simple_test.sh b/tests/simple_test.sh
index db3611d979edb6d89785badc2b4439a60c647bc0..1f1b9f37147eba67254f642fcff45c31890447a2 100755
--- a/tests/simple_test.sh
+++ b/tests/simple_test.sh
@@ -7,9 +7,9 @@ fi
 
 FILENAME=$1
 BASENAME=$(basename $FILENAME)
-BSNM_PRE="${BASENAME%.*}"
-BSNM_EXT="${BASENAME##*.}"
-TEST_OUTPUT_FILES="tests_logs/simple_tests/${BSNM_PRE}"
+BSN_PRE="${BASENAME%.*}"
+BSN_EXT="${BASENAME##*.}"
+TEST_OUTPUT_FILES="tests_logs/simple_tests/${BSN_PRE}"
 GREEN='\033[0;32m'
 NC='\033[0m'
 
@@ -19,11 +19,11 @@ if [ ! -d "tests_logs/simple_tests/" ]; then
 fi
 mkdir "${TEST_OUTPUT_FILES}/" 2>/dev/null  
 
-touch "${TEST_OUTPUT_FILES}/${BSNM_PRE}_received_file.${BSNM_EXT}" \
-      "${TEST_OUTPUT_FILES}/valgrind_${BSNM_PRE}_receiver.log"     \
-      "${TEST_OUTPUT_FILES}/valgrind_${BSNM_PRE}_sender.log"       \
-      "${TEST_OUTPUT_FILES}/${BSNM_PRE}_sender.log"                \
-      "${TEST_OUTPUT_FILES}/${BSNM_PRE}_receiver.log"
+touch "${TEST_OUTPUT_FILES}/${BSN_PRE}_received_file.${BSN_EXT}" \
+      "${TEST_OUTPUT_FILES}/valgrind_${BSN_PRE}_receiver.log"     \
+      "${TEST_OUTPUT_FILES}/valgrind_${BSN_PRE}_sender.log"       \
+      "${TEST_OUTPUT_FILES}/${BSN_PRE}_sender.log"                \
+      "${TEST_OUTPUT_FILES}/${BSN_PRE}_receiver.log"
 
 
 # The next line come from: https://unix.stackexchange.com/questions/55913/whats-the-easiest-way-to-find-an-unused-local-port
@@ -31,9 +31,9 @@ touch "${TEST_OUTPUT_FILES}/${BSNM_PRE}_received_file.${BSNM_EXT}" \
 port=$(comm -23 <(seq 65000 65200 | sort) <(ss -Htan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 1)
 
 # We launch the receiver and capture its output
-valgrind --leak-check=full --log-file=${TEST_OUTPUT_FILES}/valgrind_${BSNM_PRE}_receiver.log \
-              ./receiver ::1 $port -s ${TEST_OUTPUT_FILES}/${BSNM_PRE}_receiver_stats.csv 1> ${TEST_OUTPUT_FILES}/${BSNM_PRE}_received_file.${BSNM_EXT} \
-              2> ${TEST_OUTPUT_FILES}/${BSNM_PRE}_receiver.log & receiver_pid=$!
+valgrind --leak-check=full --log-file=${TEST_OUTPUT_FILES}/valgrind_${BSN_PRE}_receiver.log \
+              ./receiver ::1 $port -s ${TEST_OUTPUT_FILES}/${BSN_PRE}_receiver_stats.csv 1> ${TEST_OUTPUT_FILES}/${BSN_PRE}_received_file.${BSN_EXT} \
+              2> ${TEST_OUTPUT_FILES}/${BSN_PRE}_receiver.log & receiver_pid=$!
 
 cleanup()
 {
@@ -44,10 +44,10 @@ cleanup()
 trap cleanup SIGINT  # Kill the background procces in case of ^-C
 
 # We start the transfer
-if ! valgrind --leak-check=full --log-file=${TEST_OUTPUT_FILES}/valgrind_${BSNM_PRE}_sender.log \
-    ./sender -f ${FILENAME} ::1 $port -s ${TEST_OUTPUT_FILES}/${BSNM_PRE}_sender_stats.csv 2> ${TEST_OUTPUT_FILES}/${BSNM_PRE}_sender.log ; then
+if ! valgrind --leak-check=full --log-file=${TEST_OUTPUT_FILES}/valgrind_${BSN_PRE}_sender.log \
+    ./sender -f ${FILENAME} ::1 $port -s ${TEST_OUTPUT_FILES}/${BSN_PRE}_sender_stats.csv 2> ${TEST_OUTPUT_FILES}/${BSN_PRE}_sender.log ; then
   echo "The sender crashed!"
-  cat ${TEST_OUTPUT_FILES}/${BSNM_PRE}_sender.log
+  cat ${TEST_OUTPUT_FILES}/${BSN_PRE}_sender.log
   err=1  # We record the error
 fi
 
@@ -60,16 +60,16 @@ if kill -0 $receiver_pid &> /dev/null ; then
 else  # We check the return value of the receiver
   if ! wait $receiver_pid ; then
     echo "The receiver crashed!"
-    cat ${TEST_OUTPUT_FILES}/${BSNM_PRE}_receiver.log
+    cat ${TEST_OUTPUT_FILES}/${BSN_PRE}_receiver.log
     err=1
   fi
 fi
 
 # We check that the transfer ran through properly
-if [[ "$(md5sum ${FILENAME} | awk '{print $1}')" != "$(md5sum ${TEST_OUTPUT_FILES}/${BSNM_PRE}_received_file.${BSNM_EXT} | awk '{print $1}')" ]]; then
+if [[ "$(md5sum ${FILENAME} | awk '{print $1}')" != "$(md5sum ${TEST_OUTPUT_FILES}/${BSN_PRE}_received_file.${BSN_EXT} | awk '{print $1}')" ]]; then
   echo "The transfer has corrupted the file!"
   echo "Binary difference between the 2 files: (expected vs actual)"
-  diff -C 9 <(od -Ax -t x1z ${FILENAME}) <(od -Ax -t x1z ${TEST_OUTPUT_FILES}/${BSNM_PRE}_received_file.${BSNM_EXT})
+  diff -C 9 <(od -Ax -t x1z ${FILENAME}) <(od -Ax -t x1z ${TEST_OUTPUT_FILES}/${BSN_PRE}_received_file.${BSN_EXT})
   exit 1
 else
   echo -e "${GREEN}The transfer has succeeded!${NC}"
diff --git a/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_link.log b/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_link.log
index 39a70e932e0e12d2937693418206eed2f86eda42..6de10f7863b2c60fd869af94db9705525012aa03 100644
--- a/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_link.log
+++ b/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_link.log
@@ -1,18 +1,23 @@
-@@ Using random seed: 1650895864
+@@ Using random seed: 1650916551
 @@ Using parameters:
-.. port: 65054
-.. forward_port: 65082
+.. port: 65023
+.. forward_port: 65011
 .. delay: 0
 .. jitter: 0
 .. err_rate: 20
 .. cut_rate: 30
 .. loss_rate: 25
-.. seed: 1650895864
+.. seed: 1650916551
 .. link_direction: Forward
-@@ Remote host is ::1 [57419]
+@@ Remote host is ::1 [35975]
+[SEQ   0] Dropping packet
+[SEQ   0] Dropping packet
+[SEQ   0] Dropping packet
+[SEQ   0] Dropping packet
+[SEQ   0] Corrupting packet: inverted byte #24
+[SEQ   0] Sent packet (Forward).
 [SEQ   0] Sent packet (Forward).
 [SEQ   1] Sent packet (Reverse).
-[SEQ   1] Dropping packet
-[FEC   0] Sent packet (Forward).
 [SEQ   1] Sent packet (Forward).
+[FEC   0] Sent packet (Forward).
 [SEQ   2] Sent packet (Reverse).
diff --git a/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_receiver.log b/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_receiver.log
index ef5f076a6c3180318873261091eefd534579c574..4327b6c98c18e7ec4247f18c0cdcb0a942b4c5ce 100644
--- a/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_receiver.log
+++ b/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_receiver.log
@@ -1,14 +1,17 @@
-[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv, listen_ip is ::1, listen_port is 65082
-[DEBUG] Successfully bound to IPv6 address : 0000:0000:0000:0000:0000:0000:0000:0001, port : 65082
-[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65054
+[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv, listen_ip is ::1, listen_port is 65011
+[DEBUG] Successfully bound to IPv6 address : 0000:0000:0000:0000:0000:0000:0000:0001, port : 65011
+[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65023
+[DEBUG] Received a damaged packet with 4 status. and seqnum as 0
 [DEBUG] Received data packet seqnum 0 with timestamp 984824098 | current_window_size : 31, current_window_start : 0
 [DEBUG] Sent ACK saying we are waiting for 1, timestamp 0
-[DEBUG] Received FEC with seqnum [0] but wasn't used
 [DEBUG] Received data packet seqnum 1 with timestamp 0 | current_window_size : 30, current_window_start : 0
 [DEBUG] Going to consume the next 2 packets.
 [DEBUG] Consuming packet : 0 | curr_recv_window = 29, recv_window_start = 0
 [DEBUG] Consuming packet : 1 | curr_recv_window = 30, recv_window_start = 1
 [DEBUG] Received the last packet
+[DEBUG] Received packet [0] Out of window with timestamp 0 | receive window start at : 2 (included) till 33 (excluded)
 [DEBUG] Sent ACK saying we are waiting for 2, timestamp 0
 [DEBUG] Done the transfer with done status being true
+[DEBUG] The difference between the two is 2.000000 seconds
+[DEBUG] The transfer took 2.000000 seconds | init : 1650916560.000000, last : 1650916562.000000 
 [DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv.
diff --git a/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_sender.log b/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_sender.log
index 4322e8005641533fe2921572061aed0c5c56db82..d06b2ab5c131942b61beac87564487d0c498c500 100644
--- a/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_sender.log
+++ b/tests_logs/advanced_tests/greeting/with_FEC/adv_greeting_sender.log
@@ -3,11 +3,21 @@
 		stats_filename is tests_logs/advanced_tests/greeting/with_FEC/greeting_sender_stats.csv,
 		fec_enabled is 1,
 		receiver_ip is ::1,
-		receiver_port is 65054
-[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65054
+		receiver_port is 65023
+[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65023
 [DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 1
 [DEBUG] The LAST PTYPE_DATA is being sent !
 [DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
 [DEBUG] The sender is reading from the socket.
 [DEBUG] The ACK with the seqnum: 1 has been received
 [DEBUG] The sender is cumulatively acknowledging [0 : 1[ (place in the buffer) | [0, 1[ (seqnum)
@@ -18,8 +28,6 @@
 [DEBUG] The sender will send a pkt on the socket, the current sender window size is: 30 | receiver window size: 29
 [DEBUG] Sending LAST FEC pkt with seqnum: 0
 [DEBUG] A timer of -> 30000ms <- has started after sending the last PTYPE_DATA pkt !
-[DEBUG] The pkt with seqnum: 1 has timeout
-[DEBUG] Sending the pkt with seqnum: 1
 [DEBUG] The sender is reading from the socket.
 [DEBUG] The ACK with the seqnum: 2 has been received
 [DEBUG] The sender is cumulatively acknowledging [1 : 2[ (place in the buffer) | [1, 2[ (seqnum)
diff --git a/tests_logs/advanced_tests/greeting/with_FEC/adv_valgrind_greeting_receiver.log b/tests_logs/advanced_tests/greeting/with_FEC/adv_valgrind_greeting_receiver.log
index fc57d2d2d82934cf17945b4a608a195c326a470b..4d970b1371163f657b42818d546f2690be9ce112 100644
--- a/tests_logs/advanced_tests/greeting/with_FEC/adv_valgrind_greeting_receiver.log
+++ b/tests_logs/advanced_tests/greeting/with_FEC/adv_valgrind_greeting_receiver.log
@@ -1,15 +1,15 @@
-==8932== Memcheck, a memory error detector
-==8932== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
-==8932== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
-==8932== Command: ./receiver ::1 65082 -s tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv
-==8932== Parent PID: 8897
-==8932== 
-==8932== 
-==8932== HEAP SUMMARY:
-==8932==     in use at exit: 0 bytes in 0 blocks
-==8932==   total heap usage: 14 allocs, 14 frees, 10,354 bytes allocated
-==8932== 
-==8932== All heap blocks were freed -- no leaks are possible
-==8932== 
-==8932== For lists of detected and suppressed errors, rerun with: -s
-==8932== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+==43794== Memcheck, a memory error detector
+==43794== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==43794== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
+==43794== Command: ./receiver ::1 65011 -s tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv
+==43794== Parent PID: 43762
+==43794== 
+==43794== 
+==43794== HEAP SUMMARY:
+==43794==     in use at exit: 0 bytes in 0 blocks
+==43794==   total heap usage: 15 allocs, 15 frees, 10,908 bytes allocated
+==43794== 
+==43794== All heap blocks were freed -- no leaks are possible
+==43794== 
+==43794== For lists of detected and suppressed errors, rerun with: -s
+==43794== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/tests_logs/advanced_tests/greeting/with_FEC/adv_valgrind_greeting_sender.log b/tests_logs/advanced_tests/greeting/with_FEC/adv_valgrind_greeting_sender.log
index 741018e860882d20b9fe5a288714cfe50809bbfe..2a7079de729d9e95c8db6eef21061a576669df7e 100644
--- a/tests_logs/advanced_tests/greeting/with_FEC/adv_valgrind_greeting_sender.log
+++ b/tests_logs/advanced_tests/greeting/with_FEC/adv_valgrind_greeting_sender.log
@@ -1,15 +1,15 @@
-==8933== Memcheck, a memory error detector
-==8933== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
-==8933== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
-==8933== Command: ./sender -f tests_files/greeting.txt ::1 65054 -c -s tests_logs/advanced_tests/greeting/with_FEC/greeting_sender_stats.csv
-==8933== Parent PID: 8897
-==8933== 
-==8933== 
-==8933== HEAP SUMMARY:
-==8933==     in use at exit: 0 bytes in 0 blocks
-==8933==   total heap usage: 10 allocs, 10 frees, 4,392 bytes allocated
-==8933== 
-==8933== All heap blocks were freed -- no leaks are possible
-==8933== 
-==8933== For lists of detected and suppressed errors, rerun with: -s
-==8933== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+==43795== Memcheck, a memory error detector
+==43795== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==43795== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
+==43795== Command: ./sender -f tests_files/greeting.txt ::1 65023 -c -s tests_logs/advanced_tests/greeting/with_FEC/greeting_sender_stats.csv
+==43795== Parent PID: 43762
+==43795== 
+==43795== 
+==43795== HEAP SUMMARY:
+==43795==     in use at exit: 0 bytes in 0 blocks
+==43795==   total heap usage: 10 allocs, 10 frees, 4,400 bytes allocated
+==43795== 
+==43795== All heap blocks were freed -- no leaks are possible
+==43795== 
+==43795== For lists of detected and suppressed errors, rerun with: -s
+==43795== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv b/tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv
index 41c1dd571c47ccfac64afa6aee76a616b1c1e591..1bb878cfeae32497478c7a4ff0aef2a61b45f604 100644
--- a/tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv
+++ b/tests_logs/advanced_tests/greeting/with_FEC/greeting_receiver_stats.csv
@@ -2,10 +2,11 @@ data_sent:0
 data_received:2
 data_truncated_received:0
 fec_sent:0
-fec_received:1
+fec_received:0
 ack_sent:2
 ack_received:0
 nack_received:0
-packet_ignored:0
+packet_ignored:1
+throughput:512
 packet_duplicated:0
 packet_recovered:0
diff --git a/tests_logs/advanced_tests/greeting/with_FEC/greeting_sender_stats.csv b/tests_logs/advanced_tests/greeting/with_FEC/greeting_sender_stats.csv
index db69d143a6093547c7094aba7445e28e990f8502..03f4e4a6061410d7cc1f71e250552665b7e71853 100644
--- a/tests_logs/advanced_tests/greeting/with_FEC/greeting_sender_stats.csv
+++ b/tests_logs/advanced_tests/greeting/with_FEC/greeting_sender_stats.csv
@@ -1,4 +1,4 @@
-data_sent:3
+data_sent:7
 data_received:0
 data_truncated_received:0
 fec_sent:1
@@ -7,6 +7,7 @@ ack_sent:0
 ack_received:2
 nack_received:0
 packet_ignored:0
-min_rtt:12
-max_rtt:2007
-packet_retransmitted:1
+throughput:0
+min_rtt:10
+max_rtt:10007
+packet_retransmitted:5
diff --git a/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_link.log b/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_link.log
index 9c501800165b44e3bb14b3ddd6a2a1ad5f5f210c..ccc48316dbace81e9d90bd6967754b39227127dd 100644
--- a/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_link.log
+++ b/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_link.log
@@ -1,16 +1,104 @@
-@@ Using random seed: 1650895872
+@@ Using random seed: 1650916567
 @@ Using parameters:
-.. port: 65162
-.. forward_port: 65020
+.. port: 65198
+.. forward_port: 65198
 .. delay: 0
 .. jitter: 0
 .. err_rate: 20
 .. cut_rate: 30
 .. loss_rate: 25
-.. seed: 1650895872
+.. seed: 1650916567
 .. link_direction: Forward
-@@ Remote host is ::1 [57103]
+@@ Remote host is ::1 [55048]
 [SEQ   0] Sent packet (Forward).
-[SEQ   1] Sent packet (Reverse).
-[SEQ   1] Sent packet (Forward).
-[SEQ   2] Sent packet (Reverse).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Corrupting packet: inverted byte #1
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Dropping packet
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Dropping packet
+[SEQ   0] Dropping packet
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Corrupting packet: inverted byte #1
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Corrupting packet: inverted byte #18
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Dropping packet
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Dropping packet
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Dropping packet
+[SEQ   0] Corrupting packet: inverted byte #7
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Corrupting packet: inverted byte #3
+[SEQ 255] Sent packet (Forward).
+[SEQ 255] Sent packet (Reverse).
+[SEQ   0] Corrupting packet: inverted byte #12
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Dropping packet
+[SEQ   0] Corrupting packet: inverted byte #23
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
+[SEQ   0] Sent packet (Forward).
+[SEQ   0] Sent packet (Reverse).
diff --git a/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_received_file.txt b/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_received_file.txt
index c57eff55ebc0c54973903af5f72bac72762cf4f4..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_received_file.txt
+++ b/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_received_file.txt
@@ -1 +0,0 @@
-Hello World!
\ No newline at end of file
diff --git a/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_receiver.log b/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_receiver.log
index 46061bde49ce286a1599e3b89e58bb9d17fc5b2d..83b98be64a3afd792d382e7699e96488fd6e2438 100644
--- a/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_receiver.log
+++ b/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_receiver.log
@@ -1,13 +1,3 @@
-[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv, listen_ip is ::1, listen_port is 65020
-[DEBUG] Successfully bound to IPv6 address : 0000:0000:0000:0000:0000:0000:0000:0001, port : 65020
-[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65162
-[DEBUG] Received data packet seqnum 0 with timestamp 984824098 | current_window_size : 31, current_window_start : 0
-[DEBUG] Sent ACK saying we are waiting for 1, timestamp 0
-[DEBUG] Received data packet seqnum 1 with timestamp 0 | current_window_size : 30, current_window_start : 0
-[DEBUG] Going to consume the next 2 packets.
-[DEBUG] Consuming packet : 0 | curr_recv_window = 29, recv_window_start = 0
-[DEBUG] Consuming packet : 1 | curr_recv_window = 30, recv_window_start = 1
-[DEBUG] Received the last packet
-[DEBUG] Sent ACK saying we are waiting for 2, timestamp 0
-[DEBUG] Done the transfer with done status being true
-[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv.
+[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv, listen_ip is ::1, listen_port is 65198
+[ERROR] An error occured when creating the socket
+
diff --git a/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_sender.log b/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_sender.log
index 8bb9e77f37fbd57c8e0613e842b08eeab605a3c5..3ccf916cee5c1a39b30efd1a936296eb138f5247 100644
--- a/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_sender.log
+++ b/tests_logs/advanced_tests/greeting/without_FEC/adv_greeting_sender.log
@@ -3,20 +3,176 @@
 		stats_filename is tests_logs/advanced_tests/greeting/without_FEC/greeting_sender_stats.csv,
 		fec_enabled is 0,
 		receiver_ip is ::1,
-		receiver_port is 65162
-[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65162
+		receiver_port is 65198
+[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65198
 [DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 1
 [DEBUG] The LAST PTYPE_DATA is being sent !
 [DEBUG] Sending the pkt with seqnum: 0
 [DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 1 has been received
-[DEBUG] The sender is cumulatively acknowledging [0 : 1[ (place in the buffer) | [0, 1[ (seqnum)
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 30
-[DEBUG] The CLOSING pkt is being sent !
-[DEBUG] Sending the pkt with seqnum: 1
-[DEBUG] A timer of -> 30000ms <- has started after sending the last PTYPE_DATA pkt !
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 3 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 3 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
+[DEBUG] The sender is reading from the socket.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
+[DEBUG] The pkt with seqnum: 0 has timeout
+[DEBUG] Sending the pkt with seqnum: 0
 [DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 2 has been received
-[DEBUG] The sender is cumulatively acknowledging [1 : 2[ (place in the buffer) | [1, 2[ (seqnum)
-[DEBUG] Sender disconnected
-[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/greeting/without_FEC/greeting_sender_stats.csv.
+[DEBUG] Decode function on a received pkt failed with status: 9 so we discard the pkt
diff --git a/tests_logs/advanced_tests/greeting/without_FEC/adv_valgrind_greeting_receiver.log b/tests_logs/advanced_tests/greeting/without_FEC/adv_valgrind_greeting_receiver.log
index f0d7fd8d6fe90d2bb89074382aef55c81598e02a..53ce037fa083f2d6f483bbf32ec67216015c7876 100644
--- a/tests_logs/advanced_tests/greeting/without_FEC/adv_valgrind_greeting_receiver.log
+++ b/tests_logs/advanced_tests/greeting/without_FEC/adv_valgrind_greeting_receiver.log
@@ -1,15 +1,25 @@
-==8980== Memcheck, a memory error detector
-==8980== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
-==8980== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
-==8980== Command: ./receiver ::1 65020 -s tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv
-==8980== Parent PID: 8897
-==8980== 
-==8980== 
-==8980== HEAP SUMMARY:
-==8980==     in use at exit: 0 bytes in 0 blocks
-==8980==   total heap usage: 13 allocs, 13 frees, 9,826 bytes allocated
-==8980== 
-==8980== All heap blocks were freed -- no leaks are possible
-==8980== 
-==8980== For lists of detected and suppressed errors, rerun with: -s
-==8980== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+==43855== Memcheck, a memory error detector
+==43855== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==43855== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
+==43855== Command: ./receiver ::1 65198 -s tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv
+==43855== Parent PID: 43762
+==43855== 
+==43855== Warning: invalid file descriptor -1 in syscall close()
+==43855== 
+==43855== HEAP SUMMARY:
+==43855==     in use at exit: 28 bytes in 1 blocks
+==43855==   total heap usage: 3 allocs, 2 frees, 108 bytes allocated
+==43855== 
+==43855== 28 bytes in 1 blocks are definitely lost in loss record 1 of 1
+==43855==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
+==43855==    by 0x10950E: main (in /home/vany/Desktop/school/networking/project_trtp/receiver)
+==43855== 
+==43855== LEAK SUMMARY:
+==43855==    definitely lost: 28 bytes in 1 blocks
+==43855==    indirectly lost: 0 bytes in 0 blocks
+==43855==      possibly lost: 0 bytes in 0 blocks
+==43855==    still reachable: 0 bytes in 0 blocks
+==43855==         suppressed: 0 bytes in 0 blocks
+==43855== 
+==43855== For lists of detected and suppressed errors, rerun with: -s
+==43855== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
diff --git a/tests_logs/advanced_tests/greeting/without_FEC/adv_valgrind_greeting_sender.log b/tests_logs/advanced_tests/greeting/without_FEC/adv_valgrind_greeting_sender.log
index a0e3f6b4078a3ef35c38c678099ec2e8b3f4cb59..9846780c2a6b4999760fef37bb8d409b01215765 100644
--- a/tests_logs/advanced_tests/greeting/without_FEC/adv_valgrind_greeting_sender.log
+++ b/tests_logs/advanced_tests/greeting/without_FEC/adv_valgrind_greeting_sender.log
@@ -1,15 +1,33 @@
-==8981== Memcheck, a memory error detector
-==8981== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
-==8981== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
-==8981== Command: ./sender -f tests_files/greeting.txt ::1 65162 -s tests_logs/advanced_tests/greeting/without_FEC/greeting_sender_stats.csv
-==8981== Parent PID: 8897
-==8981== 
-==8981== 
-==8981== HEAP SUMMARY:
-==8981==     in use at exit: 0 bytes in 0 blocks
-==8981==   total heap usage: 9 allocs, 9 frees, 3,864 bytes allocated
-==8981== 
-==8981== All heap blocks were freed -- no leaks are possible
-==8981== 
-==8981== For lists of detected and suppressed errors, rerun with: -s
-==8981== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+==43856== Memcheck, a memory error detector
+==43856== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==43856== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
+==43856== Command: ./sender -f tests_files/greeting.txt ::1 65198 -s tests_logs/advanced_tests/greeting/without_FEC/greeting_sender_stats.csv
+==43856== Parent PID: 43762
+==43856== 
+==43856== 
+==43856== Process terminating with default action of signal 2 (SIGINT)
+==43856==    at 0x498D995: poll (poll.c:29)
+==43856==    by 0x1095F0: main (in /home/vany/Desktop/school/networking/project_trtp/sender)
+==43856== 
+==43856== HEAP SUMMARY:
+==43856==     in use at exit: 2,208 bytes in 4 blocks
+==43856==   total heap usage: 45 allocs, 41 frees, 22,880 bytes allocated
+==43856== 
+==43856== 8 bytes in 1 blocks are definitely lost in loss record 1 of 4
+==43856==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
+==43856==    by 0x1095A4: main (in /home/vany/Desktop/school/networking/project_trtp/sender)
+==43856== 
+==43856== 2,200 (1,544 direct, 656 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4
+==43856==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
+==43856==    by 0x10AEEB: state_new (in /home/vany/Desktop/school/networking/project_trtp/sender)
+==43856==    by 0x1095C5: main (in /home/vany/Desktop/school/networking/project_trtp/sender)
+==43856== 
+==43856== LEAK SUMMARY:
+==43856==    definitely lost: 1,552 bytes in 2 blocks
+==43856==    indirectly lost: 656 bytes in 2 blocks
+==43856==      possibly lost: 0 bytes in 0 blocks
+==43856==    still reachable: 0 bytes in 0 blocks
+==43856==         suppressed: 0 bytes in 0 blocks
+==43856== 
+==43856== For lists of detected and suppressed errors, rerun with: -s
+==43856== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
diff --git a/tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv b/tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv
index 1f614a8947be1bc512438ddf2918bcb56ea856de..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv
+++ b/tests_logs/advanced_tests/greeting/without_FEC/greeting_receiver_stats.csv
@@ -1,11 +0,0 @@
-data_sent:0
-data_received:2
-data_truncated_received:0
-fec_sent:0
-fec_received:0
-ack_sent:2
-ack_received:0
-nack_received:0
-packet_ignored:0
-packet_duplicated:0
-packet_recovered:0
diff --git a/tests_logs/advanced_tests/greeting/without_FEC/greeting_sender_stats.csv b/tests_logs/advanced_tests/greeting/without_FEC/greeting_sender_stats.csv
index f530c3a4325beb8f1c6a7184c76ed7b3ffe597a7..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/tests_logs/advanced_tests/greeting/without_FEC/greeting_sender_stats.csv
+++ b/tests_logs/advanced_tests/greeting/without_FEC/greeting_sender_stats.csv
@@ -1,12 +0,0 @@
-data_sent:2
-data_received:0
-data_truncated_received:0
-fec_sent:0
-fec_received:0
-ack_sent:0
-ack_received:2
-nack_received:0
-packet_ignored:0
-min_rtt:6
-max_rtt:14
-packet_retransmitted:0
diff --git a/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_link.log b/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_link.log
index 0c5491d7574c9322487f38bb8eb5f79d0329fb7a..542704df9e922433b18670dd403733ea80f8f88d 100644
--- a/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_link.log
+++ b/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_link.log
@@ -1,25 +1,11 @@
-@@ Using random seed: 1650895878
+@@ Using random seed: 1650916659
 @@ Using parameters:
-.. port: 65105
-.. forward_port: 65092
+.. port: 65106
+.. forward_port: 65096
 .. delay: 0
 .. jitter: 0
 .. err_rate: 20
 .. cut_rate: 30
 .. loss_rate: 25
-.. seed: 1650895878
+.. seed: 1650916659
 .. link_direction: Forward
-@@ Remote host is ::1 [57054]
-[SEQ   0] Corrupting packet: inverted byte #271
-[SEQ   0] Sent packet (Forward).
-[SEQ   0] Sent packet (Forward).
-[SEQ   1] Sent packet (Reverse).
-[SEQ   1] Sent packet (Forward).
-[SEQ   2] Sent packet (Reverse).
-[SEQ   2] Dropping packet
-[SEQ   2] Dropping packet
-[SEQ   2] Sent packet (Forward).
-[SEQ   3] Sent packet (Reverse).
-[SEQ   3] Sent packet (Forward).
-[FEC   0] Dropping packet
-[SEQ   4] Sent packet (Reverse).
diff --git a/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_received_file.txt b/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_received_file.txt
index a18b03ec08fdc53c1f0a5e0fc9187b5a0f18568f..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_received_file.txt
+++ b/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_received_file.txt
@@ -1,29 +0,0 @@
-Hello I'm a good friend, I've seen that you are writing a protocol named TRTP. 
-How is it going ? Hard ? Good for you. See life is full of hard things just like your 
-network course. But when you manage to thrive throgh tough times then sweet things are 
-ahead. So good luck have a nice day of testing and remember : Tough Times Never Last.
-
-PS: Drink a beer when you pass the test. Share your knowledge to others, computer 
-science isn't a field for selfishness. If you want to switch to Law, Economy, some shit
-
-Hi Vany I'm pleased to read some news from you. As you know I work sometime a bit late in the night.
-In a few hour you'll show up in the famous "Salle Intel" to be really productive as you are.
-
-Best regards,
-
-Samuel
-
-Sorry to be lazy but I'll past down what is above :')
-
-Hello I'm a good friend, I've seen that you are writing a protocol named TRTP. 
-How is it going ? Hard ? Good for you. See life is full of hard things just like your 
-network course. But when you manage to thrive throgh tough times then sweet things are 
-ahead. So good luck have a nice day of testing and remember : Tough Times Never Last.
-
-PS: Drink a beer when you pass the test. Share your knowledge to others, computer 
-science isn't a field for selfishness. If you want to switch to Law, Economy, some shit
-
-Hi Vany I'm pleased to read some news from you. As you know I work sometime a bit late in the night.
-In a few hour you'll show up in the famous "Salle Intel" to be really productive as you are.
-
-Best regards,
diff --git a/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_receiver.log b/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_receiver.log
index 0b3a78504cca95d8d6305686f4d83fba825294c0..9ea6e2b531d7a912ed3ce0042a3cb894f0924d44 100644
--- a/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_receiver.log
+++ b/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_receiver.log
@@ -1,20 +1 @@
-[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv, listen_ip is ::1, listen_port is 65092
-[DEBUG] Successfully bound to IPv6 address : 0000:0000:0000:0000:0000:0000:0000:0001, port : 65092
-[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65105
-[DEBUG] Received a damaged packet with 4 status. and seqnum as 0
-[DEBUG] Received data packet seqnum 0 with timestamp 0 | current_window_size : 31, current_window_start : 0
-[DEBUG] Sent ACK saying we are waiting for 1, timestamp 0
-[DEBUG] Received data packet seqnum 1 with timestamp 0 | current_window_size : 30, current_window_start : 0
-[DEBUG] Sent ACK saying we are waiting for 2, timestamp 0
-[DEBUG] Received data packet seqnum 2 with timestamp 984824098 | current_window_size : 29, current_window_start : 0
-[DEBUG] Sent ACK saying we are waiting for 3, timestamp 0
-[DEBUG] Received data packet seqnum 3 with timestamp 0 | current_window_size : 28, current_window_start : 0
-[DEBUG] Going to consume the next 4 packets.
-[DEBUG] Consuming packet : 0 | curr_recv_window = 27, recv_window_start = 0
-[DEBUG] Consuming packet : 1 | curr_recv_window = 28, recv_window_start = 1
-[DEBUG] Consuming packet : 2 | curr_recv_window = 29, recv_window_start = 2
-[DEBUG] Consuming packet : 3 | curr_recv_window = 30, recv_window_start = 3
-[DEBUG] Received the last packet
-[DEBUG] Sent ACK saying we are waiting for 4, timestamp 0
-[DEBUG] Done the transfer with done status being true
-[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv.
+[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv, listen_ip is ::1, listen_port is 65096
diff --git a/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_sender.log b/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_sender.log
index 4719730cb1a60e7da2c500bf8195eb902523a996..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_sender.log
+++ b/tests_logs/advanced_tests/long_message/with_FEC/adv_long_message_sender.log
@@ -1,40 +0,0 @@
-[DEBUG] Sender has following arguments: 
-		filename is tests_files/long_message.txt,
-		stats_filename is tests_logs/advanced_tests/long_message/with_FEC/long_message_sender_stats.csv,
-		fec_enabled is 1,
-		receiver_ip is ::1,
-		receiver_port is 65105
-[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65105
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 1
-[DEBUG] Sending the pkt with seqnum: 0
-[DEBUG] The pkt with seqnum: 0 has timeout
-[DEBUG] Sending the pkt with seqnum: 0
-[DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 1 has been received
-[DEBUG] The sender is cumulatively acknowledging [0 : 1[ (place in the buffer) | [0, 1[ (seqnum)
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 30
-[DEBUG] Sending the pkt with seqnum: 1
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 30 | receiver window size: 29
-[DEBUG] The LAST PTYPE_DATA is being sent !
-[DEBUG] Sending the pkt with seqnum: 2
-[DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 2 has been received
-[DEBUG] The sender is cumulatively acknowledging [1 : 2[ (place in the buffer) | [1, 2[ (seqnum)
-[DEBUG] Sending the pkt with seqnum: 2
-[DEBUG] The pkt with seqnum: 2 has timeout
-[DEBUG] Sending the pkt with seqnum: 2
-[DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 3 has been received
-[DEBUG] The sender is cumulatively acknowledging [2 : 3[ (place in the buffer) | [2, 3[ (seqnum)
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 28
-[DEBUG] The CLOSING pkt is being sent !
-[DEBUG] Sending the pkt with seqnum: 3
-[DEBUG] A timer of -> 30000ms <- has started after sending the last PTYPE_DATA pkt !
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 30 | receiver window size: 27
-[DEBUG] Sending LAST FEC pkt with seqnum: 0
-[DEBUG] A timer of -> 30000ms <- has started after sending the last PTYPE_DATA pkt !
-[DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 4 has been received
-[DEBUG] The sender is cumulatively acknowledging [3 : 4[ (place in the buffer) | [3, 4[ (seqnum)
-[DEBUG] Sender disconnected
-[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/long_message/with_FEC/long_message_sender_stats.csv.
diff --git a/tests_logs/advanced_tests/long_message/with_FEC/adv_valgrind_long_message_receiver.log b/tests_logs/advanced_tests/long_message/with_FEC/adv_valgrind_long_message_receiver.log
index 890f2c57a583818b8d27647130bce6f9e9406f85..f250210a85580fa5bd04b4828788871b5dfbaf00 100644
--- a/tests_logs/advanced_tests/long_message/with_FEC/adv_valgrind_long_message_receiver.log
+++ b/tests_logs/advanced_tests/long_message/with_FEC/adv_valgrind_long_message_receiver.log
@@ -1,15 +1,6 @@
-==9075== Memcheck, a memory error detector
-==9075== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
-==9075== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
-==9075== Command: ./receiver ::1 65092 -s tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv
-==9075== Parent PID: 9045
-==9075== 
-==9075== 
-==9075== HEAP SUMMARY:
-==9075==     in use at exit: 0 bytes in 0 blocks
-==9075==   total heap usage: 20 allocs, 20 frees, 13,522 bytes allocated
-==9075== 
-==9075== All heap blocks were freed -- no leaks are possible
-==9075== 
-==9075== For lists of detected and suppressed errors, rerun with: -s
-==9075== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+==44034== Memcheck, a memory error detector
+==44034== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==44034== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
+==44034== Command: ./receiver ::1 65096 -s tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv
+==44034== Parent PID: 44004
+==44034== 
diff --git a/tests_logs/advanced_tests/long_message/with_FEC/adv_valgrind_long_message_sender.log b/tests_logs/advanced_tests/long_message/with_FEC/adv_valgrind_long_message_sender.log
index 84a636291f3b83a6e729fe851ed421838326a723..f43fa7246a5f65db3292ed97d8fd4296eb396fa3 100644
--- a/tests_logs/advanced_tests/long_message/with_FEC/adv_valgrind_long_message_sender.log
+++ b/tests_logs/advanced_tests/long_message/with_FEC/adv_valgrind_long_message_sender.log
@@ -1,15 +1,26 @@
-==9076== Memcheck, a memory error detector
-==9076== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
-==9076== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
-==9076== Command: ./sender -f tests_files/long_message.txt ::1 65105 -c -s tests_logs/advanced_tests/long_message/with_FEC/long_message_sender_stats.csv
-==9076== Parent PID: 9045
-==9076== 
-==9076== 
-==9076== HEAP SUMMARY:
-==9076==     in use at exit: 0 bytes in 0 blocks
-==9076==   total heap usage: 14 allocs, 14 frees, 6,504 bytes allocated
-==9076== 
-==9076== All heap blocks were freed -- no leaks are possible
-==9076== 
-==9076== For lists of detected and suppressed errors, rerun with: -s
-==9076== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+==44035== Memcheck, a memory error detector
+==44035== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==44035== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
+==44035== Command: ./sender -f tests_files/long_message.txt ::1 65106 -c -s tests_logs/advanced_tests/long_message/with_FEC/long_message_sender_stats.csv
+==44035== Parent PID: 44004
+==44035== 
+==44035== 
+==44035== Process terminating with default action of signal 2 (SIGINT)
+==44035==    at 0x49890A5: write (write.c:26)
+==44035==    by 0x4909EBC: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1181)
+==44035==    by 0x490A7D7: new_do_write (fileops.c:449)
+==44035==    by 0x490A7D7: _IO_new_file_xsputn (fileops.c:1255)
+==44035==    by 0x490A7D7: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1197)
+==44035==    by 0x48F4F82: buffered_vfprintf (vfprintf-internal.c:2395)
+==44035==    by 0x48F1D53: __vfprintf_internal (vfprintf-internal.c:1346)
+==44035==    by 0x49A9152: __fprintf_chk (fprintf_chk.c:33)
+==44035==    by 0x1094DF: main (in /home/vany/Desktop/school/networking/project_trtp/sender)
+==44035== 
+==44035== HEAP SUMMARY:
+==44035==     in use at exit: 0 bytes in 0 blocks
+==44035==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
+==44035== 
+==44035== All heap blocks were freed -- no leaks are possible
+==44035== 
+==44035== For lists of detected and suppressed errors, rerun with: -s
+==44035== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv b/tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv
index dbddf04ab2188a15cc6501720aad536510cf78c2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv
+++ b/tests_logs/advanced_tests/long_message/with_FEC/long_message_receiver_stats.csv
@@ -1,11 +0,0 @@
-data_sent:0
-data_received:4
-data_truncated_received:0
-fec_sent:0
-fec_received:0
-ack_sent:4
-ack_received:0
-nack_received:0
-packet_ignored:1
-packet_duplicated:0
-packet_recovered:0
diff --git a/tests_logs/advanced_tests/long_message/with_FEC/long_message_sender_stats.csv b/tests_logs/advanced_tests/long_message/with_FEC/long_message_sender_stats.csv
index eb232ba599a839c4b8861aef965a2ce62b14bee1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/tests_logs/advanced_tests/long_message/with_FEC/long_message_sender_stats.csv
+++ b/tests_logs/advanced_tests/long_message/with_FEC/long_message_sender_stats.csv
@@ -1,12 +0,0 @@
-data_sent:7
-data_received:0
-data_truncated_received:0
-fec_sent:1
-fec_received:0
-ack_sent:0
-ack_received:4
-nack_received:0
-packet_ignored:0
-min_rtt:1
-max_rtt:2016
-packet_retransmitted:3
diff --git a/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_link.log b/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_link.log
deleted file mode 100644
index 3eaf6a5c7ad9603b562655baca00394f6f7af3c5..0000000000000000000000000000000000000000
--- a/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_link.log
+++ /dev/null
@@ -1,21 +0,0 @@
-@@ Using random seed: 1650895887
-@@ Using parameters:
-.. port: 65169
-.. forward_port: 65108
-.. delay: 0
-.. jitter: 0
-.. err_rate: 20
-.. cut_rate: 30
-.. loss_rate: 25
-.. seed: 1650895887
-.. link_direction: Forward
-@@ Remote host is ::1 [45124]
-[SEQ   0] Sent packet (Forward).
-[SEQ   1] Sent packet (Reverse).
-[SEQ   1] Sent packet (Forward).
-[SEQ   2] Sent packet (Reverse).
-[SEQ   2] Sent packet (Forward).
-[SEQ   2] Dropping packet
-[SEQ   3] Sent packet (Reverse).
-[SEQ   3] Sent packet (Forward).
-[SEQ   4] Sent packet (Reverse).
diff --git a/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_received_file.txt b/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_received_file.txt
deleted file mode 100644
index a18b03ec08fdc53c1f0a5e0fc9187b5a0f18568f..0000000000000000000000000000000000000000
--- a/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_received_file.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Hello I'm a good friend, I've seen that you are writing a protocol named TRTP. 
-How is it going ? Hard ? Good for you. See life is full of hard things just like your 
-network course. But when you manage to thrive throgh tough times then sweet things are 
-ahead. So good luck have a nice day of testing and remember : Tough Times Never Last.
-
-PS: Drink a beer when you pass the test. Share your knowledge to others, computer 
-science isn't a field for selfishness. If you want to switch to Law, Economy, some shit
-
-Hi Vany I'm pleased to read some news from you. As you know I work sometime a bit late in the night.
-In a few hour you'll show up in the famous "Salle Intel" to be really productive as you are.
-
-Best regards,
-
-Samuel
-
-Sorry to be lazy but I'll past down what is above :')
-
-Hello I'm a good friend, I've seen that you are writing a protocol named TRTP. 
-How is it going ? Hard ? Good for you. See life is full of hard things just like your 
-network course. But when you manage to thrive throgh tough times then sweet things are 
-ahead. So good luck have a nice day of testing and remember : Tough Times Never Last.
-
-PS: Drink a beer when you pass the test. Share your knowledge to others, computer 
-science isn't a field for selfishness. If you want to switch to Law, Economy, some shit
-
-Hi Vany I'm pleased to read some news from you. As you know I work sometime a bit late in the night.
-In a few hour you'll show up in the famous "Salle Intel" to be really productive as you are.
-
-Best regards,
diff --git a/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_receiver.log b/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_receiver.log
deleted file mode 100644
index ccd57d1ffb6f5ed2378fa1ee6008da4a6dab83cb..0000000000000000000000000000000000000000
--- a/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_receiver.log
+++ /dev/null
@@ -1,19 +0,0 @@
-[DEBUG] Receiver has following arguments: stats_filename is tests_logs/advanced_tests/long_message/without_FEC/long_message_receiver_stats.csv, listen_ip is ::1, listen_port is 65108
-[DEBUG] Successfully bound to IPv6 address : 0000:0000:0000:0000:0000:0000:0000:0001, port : 65108
-[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65169
-[DEBUG] Received data packet seqnum 0 with timestamp 0 | current_window_size : 31, current_window_start : 0
-[DEBUG] Sent ACK saying we are waiting for 1, timestamp 0
-[DEBUG] Received data packet seqnum 1 with timestamp 0 | current_window_size : 30, current_window_start : 0
-[DEBUG] Sent ACK saying we are waiting for 2, timestamp 0
-[DEBUG] Received data packet seqnum 2 with timestamp 984824098 | current_window_size : 29, current_window_start : 0
-[DEBUG] Sent ACK saying we are waiting for 3, timestamp 0
-[DEBUG] Received data packet seqnum 3 with timestamp 0 | current_window_size : 28, current_window_start : 0
-[DEBUG] Going to consume the next 4 packets.
-[DEBUG] Consuming packet : 0 | curr_recv_window = 27, recv_window_start = 0
-[DEBUG] Consuming packet : 1 | curr_recv_window = 28, recv_window_start = 1
-[DEBUG] Consuming packet : 2 | curr_recv_window = 29, recv_window_start = 2
-[DEBUG] Consuming packet : 3 | curr_recv_window = 30, recv_window_start = 3
-[DEBUG] Received the last packet
-[DEBUG] Sent ACK saying we are waiting for 4, timestamp 0
-[DEBUG] Done the transfer with done status being true
-[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/long_message/without_FEC/long_message_receiver_stats.csv.
diff --git a/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_sender.log b/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_sender.log
deleted file mode 100644
index 667a8669e13a249e674cd7869f9e20d0f33da192..0000000000000000000000000000000000000000
--- a/tests_logs/advanced_tests/long_message/without_FEC/adv_long_message_sender.log
+++ /dev/null
@@ -1,33 +0,0 @@
-[DEBUG] Sender has following arguments: 
-		filename is tests_files/long_message.txt,
-		stats_filename is tests_logs/advanced_tests/long_message/without_FEC/long_message_sender_stats.csv,
-		fec_enabled is 0,
-		receiver_ip is ::1,
-		receiver_port is 65169
-[DEBUG] Successfully connected to IPv6 addresss: 0000:0000:0000:0000:0000:0000:0000:0001, port : 65169
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 1
-[DEBUG] Sending the pkt with seqnum: 0
-[DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 1 has been received
-[DEBUG] The sender is cumulatively acknowledging [0 : 1[ (place in the buffer) | [0, 1[ (seqnum)
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 30
-[DEBUG] Sending the pkt with seqnum: 1
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 30 | receiver window size: 29
-[DEBUG] The LAST PTYPE_DATA is being sent !
-[DEBUG] Sending the pkt with seqnum: 2
-[DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 2 has been received
-[DEBUG] The sender is cumulatively acknowledging [1 : 2[ (place in the buffer) | [1, 2[ (seqnum)
-[DEBUG] Sending the pkt with seqnum: 2
-[DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 3 has been received
-[DEBUG] The sender is cumulatively acknowledging [2 : 3[ (place in the buffer) | [2, 3[ (seqnum)
-[DEBUG] The sender will send a pkt on the socket, the current sender window size is: 31 | receiver window size: 28
-[DEBUG] The CLOSING pkt is being sent !
-[DEBUG] Sending the pkt with seqnum: 3
-[DEBUG] A timer of -> 30000ms <- has started after sending the last PTYPE_DATA pkt !
-[DEBUG] The sender is reading from the socket.
-[DEBUG] The ACK with the seqnum: 4 has been received
-[DEBUG] The sender is cumulatively acknowledging [3 : 4[ (place in the buffer) | [3, 4[ (seqnum)
-[DEBUG] Sender disconnected
-[DEBUG] Wrote the transfer statistics to tests_logs/advanced_tests/long_message/without_FEC/long_message_sender_stats.csv.
diff --git a/tests_logs/advanced_tests/long_message/without_FEC/adv_valgrind_long_message_receiver.log b/tests_logs/advanced_tests/long_message/without_FEC/adv_valgrind_long_message_receiver.log
deleted file mode 100644
index 20de5860d3726da986c12b30008e3a0ebe57d448..0000000000000000000000000000000000000000
--- a/tests_logs/advanced_tests/long_message/without_FEC/adv_valgrind_long_message_receiver.log
+++ /dev/null
@@ -1,15 +0,0 @@
-==9127== Memcheck, a memory error detector
-==9127== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
-==9127== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
-==9127== Command: ./receiver ::1 65108 -s tests_logs/advanced_tests/long_message/without_FEC/long_message_receiver_stats.csv
-==9127== Parent PID: 9045
-==9127== 
-==9127== 
-==9127== HEAP SUMMARY:
-==9127==     in use at exit: 0 bytes in 0 blocks
-==9127==   total heap usage: 19 allocs, 19 frees, 12,994 bytes allocated
-==9127== 
-==9127== All heap blocks were freed -- no leaks are possible
-==9127== 
-==9127== For lists of detected and suppressed errors, rerun with: -s
-==9127== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/tests_logs/advanced_tests/long_message/without_FEC/adv_valgrind_long_message_sender.log b/tests_logs/advanced_tests/long_message/without_FEC/adv_valgrind_long_message_sender.log
deleted file mode 100644
index 239acc3537019dc2146510de20b4e03144857e13..0000000000000000000000000000000000000000
--- a/tests_logs/advanced_tests/long_message/without_FEC/adv_valgrind_long_message_sender.log
+++ /dev/null
@@ -1,15 +0,0 @@
-==9128== Memcheck, a memory error detector
-==9128== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
-==9128== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
-==9128== Command: ./sender -f tests_files/long_message.txt ::1 65169 -s tests_logs/advanced_tests/long_message/without_FEC/long_message_sender_stats.csv
-==9128== Parent PID: 9045
-==9128== 
-==9128== 
-==9128== HEAP SUMMARY:
-==9128==     in use at exit: 0 bytes in 0 blocks
-==9128==   total heap usage: 13 allocs, 13 frees, 5,976 bytes allocated
-==9128== 
-==9128== All heap blocks were freed -- no leaks are possible
-==9128== 
-==9128== For lists of detected and suppressed errors, rerun with: -s
-==9128== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
diff --git a/tests_logs/advanced_tests/long_message/without_FEC/long_message_receiver_stats.csv b/tests_logs/advanced_tests/long_message/without_FEC/long_message_receiver_stats.csv
deleted file mode 100644
index 224485b9268d1426e6ef7f2e5f1c6d4bec8787bf..0000000000000000000000000000000000000000
--- a/tests_logs/advanced_tests/long_message/without_FEC/long_message_receiver_stats.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-data_sent:0
-data_received:4
-data_truncated_received:0
-fec_sent:0
-fec_received:0
-ack_sent:4
-ack_received:0
-nack_received:0
-packet_ignored:0
-packet_duplicated:0
-packet_recovered:0
diff --git a/tests_logs/advanced_tests/long_message/without_FEC/long_message_sender_stats.csv b/tests_logs/advanced_tests/long_message/without_FEC/long_message_sender_stats.csv
deleted file mode 100644
index 7996ec102a0bfd6e9c48eae07bdcb8bf2893bf76..0000000000000000000000000000000000000000
--- a/tests_logs/advanced_tests/long_message/without_FEC/long_message_sender_stats.csv
+++ /dev/null
@@ -1,12 +0,0 @@
-data_sent:5
-data_received:0
-data_truncated_received:0
-fec_sent:0
-fec_received:0
-ack_sent:0
-ack_received:4
-nack_received:0
-packet_ignored:0
-min_rtt:1
-max_rtt:16
-packet_retransmitted:1