lwIP  2.1.0
Lightweight IP stack

Modules

 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_tsntp_getserver (u8_t idx)
 

Detailed Description

This is simple "SNTP" client for the lwIP raw API. It is a minimal implementation of SNTPv4 as specified in RFC 4330.

For a list of some public NTP servers, see this link: http://support.ntp.org/bin/view/Servers/NTPPoolServers

Function Documentation

◆ sntp_enabled()

u8_t sntp_enabled ( void  )

Get enabled state.

◆ sntp_getoperatingmode()

u8_t sntp_getoperatingmode ( void  )

Gets the operating mode.

◆ sntp_getreachability()

u8_t sntp_getreachability ( u8_t  idx)

Gets the server reachability shift register as described in RFC 5905.

Parameters
idxthe index of the NTP server

◆ sntp_getserver()

const ip_addr_t* sntp_getserver ( u8_t  idx)

Obtain one of the currently configured by IP address (or DHCP) NTP servers

Parameters
idxthe index of the NTP server
Returns
IP address of the indexed NTP server or "ip_addr_any" if the NTP server has not been configured by address (or at all).

◆ sntp_init()

void sntp_init ( void  )

Initialize this module. Send out request instantly or after SNTP_STARTUP_DELAY(_FUNC).

◆ sntp_setoperatingmode()

void sntp_setoperatingmode ( u8_t  operating_mode)

Sets the operating mode.

Parameters
operating_modeone of the available operating modes

◆ sntp_setserver()

void sntp_setserver ( u8_t  idx,
const ip_addr_t server 
)

Initialize one of the NTP servers by IP address

Parameters
idxthe index of the NTP server to set must be < SNTP_MAX_SERVERS
serverIP address of the NTP server to set

◆ sntp_stop()

void sntp_stop ( void  )

Stop this module.