lwip/contrib/apps/ping/ping.h
Maxim Uvarov 4e6dd9c576 ping: add stop function
ping in raw mode does some set up and sets timeout, but clean
up procedure is missing. That is needed for case if PING_RESULT() macro
is used for application exit.

Also implement stop functionality when using sockets.
Running ping is stopped when calling ping_init() again.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2023-09-27 20:56:46 +02:00

21 lines
397 B
C

#ifndef LWIP_PING_H
#define LWIP_PING_H
#include "lwip/ip_addr.h"
/**
* PING_USE_SOCKETS: Set to 1 to use sockets, otherwise the raw api is used
*/
#ifndef PING_USE_SOCKETS
#define PING_USE_SOCKETS LWIP_SOCKET
#endif
void ping_init(const ip_addr_t* ping_addr);
void ping_stop(void);
#if !PING_USE_SOCKETS
void ping_send_now(void);
#endif /* !PING_USE_SOCKETS */
#endif /* LWIP_PING_H */