mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
4e6dd9c576
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>
21 lines
397 B
C
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 */
|