move icmp packet prepartion to file icmp.c

This commit is contained in:
2025-04-24 22:54:03 +02:00
parent 01df0d6cb0
commit e622d9d175
4 changed files with 79 additions and 61 deletions

View File

@ -5,9 +5,15 @@
#include <stdint.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <byteswap.h>
#include <fcntl.h>
#define PACKET_DATA_LENGTH 40
typedef struct s_settings
{
char *host;
@ -27,4 +33,6 @@ typedef struct s_icmp_echo
uint8_t data[40];
} t_icmp_echo;
t_icmp_echo prepare_icmp_echo(uint16_t sequence, uint16_t identifier);
#endif