28 lines
610 B
C
28 lines
610 B
C
#ifndef PING_STATE_H
|
|
#define PING_STATE_H
|
|
|
|
#include <netinet/in.h>
|
|
#include <stdint.h>
|
|
#include <signal.h>
|
|
#include <time.h>
|
|
#include "icmp.h"
|
|
#include "ft_ping.h"
|
|
#include "internal/ping/stats.h"
|
|
#include "internal/ping/tracker.h"
|
|
|
|
typedef struct s_ping_state {
|
|
icmp_handle_t *handle;
|
|
const t_ping_config *config;
|
|
struct in_addr dest;
|
|
struct timespec start_time;
|
|
struct timespec linger_start;
|
|
uint16_t id;
|
|
uint16_t seq;
|
|
t_ping_tracker *tracker;
|
|
t_ping_stats *stats;
|
|
volatile sig_atomic_t send_flag;
|
|
volatile sig_atomic_t stop_flag;
|
|
size_t nb_errors;
|
|
} t_ping_state;
|
|
|
|
#endif
|