13#ifndef ZEPHYR_INCLUDE_NET_SNTP_H_
14#define ZEPHYR_INCLUDE_NET_SNTP_H_
35#if defined(CONFIG_SNTP_UNCERTAINTY)
size_t socklen_t
Length of a socket address.
Definition net_ip.h:171
void sntp_close(struct sntp_ctx *ctx)
Release SNTP context.
int sntp_simple(const char *server, uint32_t timeout, struct sntp_time *ts)
Convenience function to query SNTP in one-shot fashion.
int sntp_query(struct sntp_ctx *ctx, uint32_t timeout, struct sntp_time *ts)
Perform SNTP query.
int sntp_simple_addr(struct sockaddr *addr, socklen_t addr_len, uint32_t timeout, struct sntp_time *ts)
Convenience function to query SNTP in one-shot fashion using a pre-initialized address struct.
int sntp_recv_response(struct sntp_ctx *ctx, uint32_t timeout, struct sntp_time *ts)
Attempt to receive an SNTP response after issuing a query.
int sntp_init(struct sntp_ctx *ctx, struct sockaddr *addr, socklen_t addr_len)
Initialize SNTP context.
BSD Sockets compatible API definitions.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
SNTP context.
Definition sntp.h:42
struct sntp_time expected_orig_ts
Timestamp when the request was sent from client to server.
Definition sntp.h:56
Time as returned by SNTP API, fractional seconds since 1 Jan 1970.
Definition sntp.h:32
uint64_t seconds
Second value.
Definition sntp.h:33
uint32_t fraction
Fractional seconds value.
Definition sntp.h:34
Generic sockaddr struct.
Definition net_ip.h:388
Definition of the monitored socket/file descriptor.
Definition socket_poll.h:31