44#define MMPING_DEFAULT_PING_INTERVAL_MS (1000)
46#define MMPING_DEFAULT_PING_COUNT (0)
48#define MMPING_DEFAULT_DATA_SIZE (56)
50#define MMPING_MIN_DATA_SIZE (8)
52#define MMPING_MAX_DATA_SIZE (1500)
54#define MMPING_MAX_COUNT (0xffff)
56#define MMPING_MAX_RETRIES (2)
58#define MMPING_INITIAL_RETRY_INTERVAL_MS (1000)
61#define MMPING_IPADDR_MAXLEN (48)
64#define MMPING_ICMP_ECHO_HDR_LEN (8)
95#define MMPING_ARGS_DEFAULT \
97 { 0 }, { 0 }, MMPING_DEFAULT_PING_INTERVAL_MS, \
98 MMPING_DEFAULT_PING_COUNT, MMPING_DEFAULT_DATA_SIZE, \
void mmping_stop(void)
Stop any running ping request.
#define MMPING_IPADDR_MAXLEN
Maximum length of an IP address string including null-terminator.
uint16_t mmping_start(const struct mmping_args *args)
Initialize ping parameters and start ping.
void mmping_stats(struct mmping_stats *stats)
Get Ping Statistics.
Ping request arguments data structure.
uint32_t ping_size
Specifies the data packet size in bytes excluding 8 bytes ICMP header.
char ping_src[MMPING_IPADDR_MAXLEN]
String representation of the local IP address.
char ping_target[MMPING_IPADDR_MAXLEN]
String representation of the IP address of the ping target.
uint32_t ping_interval_ms
The time interval between ping requests (in milliseconds)
uint32_t ping_count
This specifies the number of ping requests to send before terminating the session.
Data structure to store ping results.
uint32_t ping_avg_time_ms
The average latency in ms between request sent and response received.
bool ping_is_running
Stores the ping running status.
uint32_t ping_min_time_ms
The minimum latency in ms between request sent and response received.
uint32_t ping_max_time_ms
The maximum latency in ms between request sent and response received.
char ping_receiver[MMPING_IPADDR_MAXLEN]
String representation of the IP address of the ping receiver.
uint32_t ping_recv_count
The number of ping responses received.
uint32_t ping_total_count
Total number of requests sent.