ditched libc icmphdr for a struct in ft_ping

This commit is contained in:
2024-09-14 03:08:40 +02:00
parent 71be209ee6
commit 995a4acdf7
2 changed files with 40 additions and 24 deletions

View File

@@ -15,6 +15,15 @@
#include <arpa/inet.h>
#include <netdb.h>
struct icmp_header
{
uint8_t type;
uint8_t code;
uint16_t checksum;
uint16_t id;
uint16_t seq;
};
struct t_socket
{
struct sockaddr_in dst, src;