|
lwIP 2.2.1
Lightweight IP stack
|
Topics | |
| Options | |
Functions | |
| void | sntp_init (void) |
| void | sntp_stop (void) |
| u8_t | sntp_enabled (void) |
| void | sntp_setoperatingmode (u8_t operating_mode) |
| u8_t | sntp_getoperatingmode (void) |
| u8_t | sntp_getreachability (u8_t idx) |
| void | sntp_setserver (u8_t idx, const ip_addr_t *server) |
| const ip_addr_t * | sntp_getserver (u8_t idx) |
| u8_t | sntp_getkodreceived (u8_t idx) |
This is simple "SNTP" client for the lwIP raw API. It is a minimal implementation of SNTPv4 as specified in RFC 4330.
You need to increase MEMP_NUM_SYS_TIMEOUT by one if you use SNTP!
For a list of some public NTP servers, see this link: http://support.ntp.org/bin/view/Servers/NTPPoolServers
| u8_t sntp_enabled | ( | void | ) |
Get enabled state.
| u8_t sntp_getkodreceived | ( | u8_t | idx | ) |
Check if a Kiss-of-Death has been received from this server (only valid for SNTP_MAX_SERVERS > 1).
| idx | the index of the NTP server |
| u8_t sntp_getoperatingmode | ( | void | ) |
Gets the operating mode.
| u8_t sntp_getreachability | ( | u8_t | idx | ) |
Gets the server reachability shift register as described in RFC 5905.
| idx | the index of the NTP server |
| const ip_addr_t * sntp_getserver | ( | u8_t | idx | ) |
Obtain one of the currently configured by IP address (or DHCP) NTP servers
| idx | the index of the NTP server |
Initialize this module. Send out request instantly or after SNTP_STARTUP_DELAY(_FUNC).
| void sntp_setoperatingmode | ( | u8_t | operating_mode | ) |
Sets the operating mode.
| operating_mode | one of the available operating modes |
Initialize one of the NTP servers by IP address
| idx | the index of the NTP server to set must be < SNTP_MAX_SERVERS |
| server | IP address of the NTP server to set |