Compute loss for each path

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2019-10-05 09:46:14 +00:00
parent 4d14689ff1
commit 00f18733d8
2 changed files with 4 additions and 0 deletions

3
mud.c
View File

@@ -1246,6 +1246,9 @@ mud_update_window(struct mud *mud, struct mud_path *path,
uint64_t send_dt, uint64_t send_bytes,
uint64_t recv_dt, uint64_t recv_bytes)
{
if (send_bytes && send_bytes >= recv_bytes)
path->loss = (send_bytes - recv_bytes) * 100 / send_bytes;
// TODO
}