Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sntp.h File Reference

Go to the source code of this file.

Data Structures

struct  sntp_ctx
 SNTP context. More...
 
struct  sntp_time
 Time as returned by SNTP API, fractional seconds since 1 Jan 1970. More...
 

Functions

int sntp_init (struct sntp_ctx *ctx, struct sockaddr *addr, socklen_t addr_len)
 Initialize SNTP context.
 
int sntp_query (struct sntp_ctx *ctx, uint32_t timeout, struct sntp_time *time)
 Perform SNTP query.
 
void sntp_close (struct sntp_ctx *ctx)
 Release SNTP context.
 
int sntp_simple (const char *server, uint32_t timeout, struct sntp_time *time)
 Convenience function to query SNTP in one-shot fashion.