Code Confidencebuild

Chapter 65. The SNTP Client

Table of Contents
Starting the SNTP client
What it does
Configuring the unicast list of NTP servers
Warning: timestamp wrap around
The SNTP test program

Starting the SNTP client

The sntp client is implemented as a thread which listens for NTP broadcasts and IPv6 multicasts, and optionally sends SNTP unicast requests to specific NTP servers. This thread may be automatically started by the system if it receives a list of (S)NTP servers from the DHCP server and unicast mode is enabled. Otherwise it must be started by the user application. The header file cyg/sntp/sntp.h declares the function to be called. The thread is then started by calling the function:

void cyg_sntp_start(void);

It is safe to call this function multiple times. Once started, the thread will run forever.