fix ping loss, add ttl from ip header compile .h file to detect changes
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/01 17:41:42 by tomoron #+# #+# */
|
||||
/* Updated: 2025/05/02 23:53:28 by tomoron ### ########.fr */
|
||||
/* Updated: 2025/05/22 15:28:03 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -28,12 +28,12 @@ void update_stats(t_stats *stats, double time)
|
||||
stats->prev = time;
|
||||
}
|
||||
|
||||
void show_ping_res_line(t_waitlist *cur, t_settings *set, uint16_t seq, t_stats *stats)
|
||||
void show_ping_res_line(t_waitlist *cur, t_settings *set, uint16_t seq, t_stats *stats, uint8_t ttl)
|
||||
{
|
||||
double diff;
|
||||
|
||||
diff = timediff(&cur->time) * 1000;
|
||||
update_stats(stats, diff);
|
||||
printf("%d bytes from %s: icmp_seq=%d ttl=??? time=%.3f ms\n", 64, set->current_ip, seq, diff);
|
||||
printf("%d bytes from %s: icmp_seq=%d ttl=%u time=%.3f ms\n", 64, set->current_ip, seq, ttl, diff);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user