fix ping loss, add ttl from ip header compile .h file to detect changes

This commit is contained in:
2025-05-22 15:30:34 +02:00
parent b96652f9a4
commit 94085f5bb2
6 changed files with 44 additions and 31 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/01 17:38:58 by tomoron #+# #+# */
/* Updated: 2025/05/02 01:06:21 by tomoron ### ########.fr */
/* Updated: 2025/05/22 15:25:38 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -38,7 +38,7 @@ void waitlist_free(t_waitlist *lst)
}
}
void waitlist_remove(t_waitlist **lst, uint16_t seq, t_settings *set, t_stats *stats)
void waitlist_remove(t_waitlist **lst, uint16_t seq, t_settings *set, t_stats *stats, uint8_t ttl)
{
t_waitlist *prev;
t_waitlist *cur;
@ -57,7 +57,7 @@ void waitlist_remove(t_waitlist **lst, uint16_t seq, t_settings *set, t_stats *s
*lst = cur->next;
else
prev->next = cur->next;
show_ping_res_line(cur, set, seq, stats);
show_ping_res_line(cur, set, seq, stats, ttl);
free(cur);
}