12#ifndef ZEPHYR_INCLUDE_NET_CONN_MGR_MONITOR_H_
13#define ZEPHYR_INCLUDE_NET_CONN_MGR_MONITOR_H_
42#define CONN_MGR_READY_IPV4 BIT(0)
44#define CONN_MGR_READY_IPV6 BIT(1)
46#define CONN_MGR_READY_IP_ANY BIT(2)
54#define CONN_MGR_READY_DNS BIT(3)
57#if defined(CONFIG_NET_CONNECTION_MANAGER) || defined(__DOXYGEN__)
209#define conn_mgr_mon_resend_status(...)
210#define conn_mgr_ignore_iface(...)
211#define conn_mgr_watch_iface(...)
212#define conn_mgr_ignore_l2(...)
213#define conn_mgr_watch_l2(...)
234 if (last_seen == NULL) {
239 if (*last_seen == 0U) {
#define CONN_MGR_READY_IPV6
An iface is ready with IPv6, see NET_EVENT_L4_IPV6_CONNECTED.
Definition conn_mgr_monitor.h:44
#define CONN_MGR_READY_DNS
A unicast DNS server is configured for a ready IP family, or name resolution is offloaded,...
Definition conn_mgr_monitor.h:54
uint32_t conn_mgr_get_readiness(void)
Get the current readiness flags.
int conn_mgr_wait_ready(uint32_t mask, uint32_t *last_seen, k_timeout_t timeout)
Wait until it is time to try to connect.
void conn_mgr_ignore_l2(const struct net_l2 *l2)
Mark an L2 to be ignored by conn_mgr.
#define CONN_MGR_READY_IP_ANY
CONN_MGR_READY_IPV4 or CONN_MGR_READY_IPV6 is set.
Definition conn_mgr_monitor.h:46
void conn_mgr_ignore_iface(struct net_if *iface)
Mark an iface to be ignored by conn_mgr.
bool conn_mgr_dns_is_ready(void)
Check whether name resolution is currently available.
void conn_mgr_watch_iface(struct net_if *iface)
Watch (stop ignoring) an iface.
void conn_mgr_mon_resend_status(void)
Resend L4 connectivity and DNS readiness events depending on current status.
void conn_mgr_watch_l2(const struct net_l2 *l2)
Watch (stop ignoring) an L2.
bool conn_mgr_is_iface_ignored(struct net_if *iface)
Check whether the provided iface is currently ignored.
#define CONN_MGR_READY_IPV4
An iface is ready with IPv4, see NET_EVENT_L4_IPV4_CONNECTED.
Definition conn_mgr_monitor.h:42
net_sa_family_t conn_mgr_get_ready_addr_family(void)
Get the address family to use in getaddrinfo() hints.
#define NET_AF_UNSPEC
Unspecified address family.
Definition net_ip.h:54
unsigned short int net_sa_family_t
Socket address family type.
Definition net_ip.h:169
#define EINVAL
Invalid argument.
Definition errno.h:61
static ALWAYS_INLINE int32_t k_sleep(k_timeout_t timeout)
Put the current thread to sleep.
Definition sleep.h:204
IPv6 and IPv4 definitions.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Kernel timeout type.
Definition clock.h:65
Network Interface structure.
Definition net_if.h:875
Network L2 structure.
Definition net_l2.h:58