/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_ping.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: tomoron +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/24 00:03:56 by tomoron #+# #+# */ /* Updated: 2025/04/24 22:50:08 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ #include "includes/ft_ping.h" int main(int argc, char **argv) { (void)argc; (void)argv; t_icmp_echo packet; int fd; packet = prepare_icmp_echo(0, 1); fd = open("test", O_WRONLY | O_CREAT, 0700); write(fd, &packet, sizeof(t_icmp_echo)); printf("checksum : %x\n", packet.checksum); return(0); }