33#ifndef NET_DNS_CACHE_H
34#define NET_DNS_CACHE_H
47#ifndef CONFIG_DNS_CACHE_SIZE
48#define CONFIG_DNS_CACHE_SIZE 4
54#ifndef CONFIG_DNS_CACHE_A
55#define CONFIG_DNS_CACHE_A IS_USED(MODULE_IPV4)
61#ifndef CONFIG_DNS_CACHE_AAAA
62#define CONFIG_DNS_CACHE_AAAA IS_USED(MODULE_IPV6)
65#if IS_USED(MODULE_DNS_CACHE) || DOXYGEN
86void dns_cache_add(
const char *domain_name,
const void *addr,
int addr_len, uint32_t ttl);
88static inline int dns_cache_query(
const char *domain_name,
void *addr_out,
int family)
96static inline void dns_cache_add(
const char *domain_name,
const void *addr,
97 int addr_len, uint32_t ttl)
int dns_cache_query(const char *domain_name, void *addr_out, int family)
Get IP address for a DNS name from the DNS cache.
void dns_cache_add(const char *domain_name, const void *addr, int addr_len, uint32_t ttl)
Add an IP address for a DNS name to the DNS cache.
Common macros and compiler attributes/pragmas configuration.