36 lines
545 B
C
36 lines
545 B
C
#ifndef PING_H
|
|
#define PING_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <netinet/in.h>
|
|
|
|
struct ping_config
|
|
{
|
|
/* Targets */
|
|
struct destinations {
|
|
const char *dom;
|
|
struct in_addr ip;
|
|
} *destinations;
|
|
size_t nb_destinations;
|
|
|
|
/* Options */
|
|
uint64_t count;
|
|
uint64_t preload;
|
|
double interval;
|
|
uint8_t ttl;
|
|
size_t packet_size;
|
|
double timeout;
|
|
double deadline;
|
|
|
|
/* Pattern (-p) */
|
|
uint8_t pattern[16];
|
|
uint8_t pattern_len;
|
|
|
|
/* Flags */
|
|
uint8_t flags;
|
|
};
|
|
|
|
int ping_run(const struct ping_config *config);
|
|
|
|
#endif
|