icmp echo can be sent and reply is sent but not yet handled

This commit is contained in:
2025-04-30 01:57:42 +02:00
parent 48c1eef0a3
commit 0021a51f61
5 changed files with 185 additions and 32 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/24 22:49:22 by tomoron #+# #+# */
/* Updated: 2025/04/25 19:14:34 by tomoron ### ########.fr */
/* Updated: 2025/04/29 19:09:11 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
#include "includes/ft_ping.h"
@ -43,7 +43,7 @@ static uint16_t calc_checksum(void *ptr, size_t len)
res = (res & 0xFFFF) + (res >> 16);
}
return(htons(~res));
return(~res);
}
t_icmp_echo prepare_icmp_echo(uint16_t sequence, uint16_t identifier)