Simple Network Time Protocol Library¶
Overview¶
The SNTP library implements IETF RFC4330 (Simple Network Time Protocol v4).
SNTP provides a way to synchronize clocks in computer networks.
API Reference¶
-
group
sntp
Simple Network Time Protocol API.
Functions
-
int
sntp_init
(struct sntp_ctx *ctx, struct sockaddr *addr, socklen_t addr_len)¶ Initialize SNTP context.
- Return
- 0 if ok, <0 if error.
- Parameters
ctx
: Address of sntp context.addr
: IP address of NTP/SNTP server.addr_len
: IP address length of NTP/SNTP server.
-
struct
sntp_ctx
¶ - #include <sntp.h>
SNTP context
-
int