Add "server reachability" register to SNTP

Guarded with SNTP_MONITOR_SERVER_REACHABILITY (sntp_opts.h).
See patch 9581

Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
Tom Ferrin
2018-03-07 23:35:22 +01:00
committed by goldsimon
parent e46b9ad4ac
commit 82d8f08451
3 changed files with 46 additions and 0 deletions

View File

@@ -58,6 +58,10 @@ u8_t sntp_enabled(void);
void sntp_setserver(u8_t idx, const ip_addr_t *addr);
const ip_addr_t* sntp_getserver(u8_t idx);
#if SNTP_MONITOR_SERVER_REACHABILITY
u8_t sntp_getreachability(u8_t idx);
#endif /* SNTP_MONITOR_SERVER_REACHABILITY */
#if SNTP_SERVER_DNS
void sntp_setservername(u8_t idx, const char *server);
const char *sntp_getservername(u8_t idx);

View File

@@ -195,6 +195,13 @@
#define SNTP_RETRY_TIMEOUT_EXP 1
#endif
/** Keep a reachability shift register per server
* Default is on to conform to RFC.
*/
#if !defined SNTP_MONITOR_SERVER_REACHABILITY || defined __DOXYGEN__
#define SNTP_MONITOR_SERVER_REACHABILITY 1
#endif
/**
* @}
*/