add icmp_echo packet preparation

This commit is contained in:
2025-04-24 22:45:48 +02:00
parent c508059e5f
commit 01df0d6cb0
3 changed files with 108 additions and 4 deletions

View File

@ -2,5 +2,29 @@
# define FT_PING_H
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <sys/time.h>
#define PACKET_DATA_LENGTH 40
typedef struct s_settings
{
char *host;
int count;
int ttl;
} t_settings;
typedef struct s_icmp_echo
{
uint8_t type;
uint8_t code;
uint16_t checksum;
uint16_t identifier;
uint16_t sequence;
struct timeval time;
uint8_t data[40];
} t_icmp_echo;
#endif