| 
    Zephyr Project API
    3.3.0
    
   A Scalable Open Source RTOS 
   | 
 
Simple Network Time Protocol API. More...
Data Structures | |
| struct | sntp_ctx | 
| struct | sntp_time | 
Functions | |
| int | sntp_init (struct sntp_ctx *ctx, struct sockaddr *addr, socklen_t addr_len) | 
| Initialize SNTP context.  More... | |
| int | sntp_query (struct sntp_ctx *ctx, uint32_t timeout, struct sntp_time *time) | 
| Perform SNTP query.  More... | |
| void | sntp_close (struct sntp_ctx *ctx) | 
| Release SNTP context.  More... | |
| int | sntp_simple (const char *server, uint32_t timeout, struct sntp_time *time) | 
| Convenience function to query SNTP in one-shot fashion.  More... | |
Simple Network Time Protocol API.
| void sntp_close | ( | struct sntp_ctx * | ctx | ) | 
#include <include/zephyr/net/sntp.h>
Initialize SNTP context.
| ctx | Address of sntp context. | 
| addr | IP address of NTP/SNTP server. | 
| addr_len | IP address length of NTP/SNTP server. | 
#include <include/zephyr/net/sntp.h>
Perform SNTP query.
| ctx | Address of sntp context. | 
| timeout | Timeout of waiting for sntp response (in milliseconds). | 
| time | Timestamp including integer and fractional seconds since 1 Jan 1970 (output). | 
#include <include/zephyr/net/sntp.h>
Convenience function to query SNTP in one-shot fashion.
Convenience wrapper which calls getaddrinfo(), sntp_init(), sntp_query(), and sntp_close().
| server | Address of server in format addr[:port] | 
| timeout | Query timeout | 
| time | Timestamp including integer and fractional seconds since 1 Jan 1970 (output). |