39#ifdef MODULE_AUTO_INIT_SOCK_DNS
43#ifndef CONFIG_AUTO_INIT_SOCK_DNS_IP_VERSION
45 #if defined(SOCK_HAS_IPV6)
46 #define CONFIG_AUTO_INIT_SOCK_DNS_IP_VERSION 6
47 #elif defined(SOCK_HAS_IPV4)
48 #define CONFIG_AUTO_INIT_SOCK_DNS_IP_VERSION 4
50 #error "Neither IPv4 nor IPv6 included in build"
57#ifndef CONFIG_AUTO_INIT_SOCK_DNS_SERVER_ADDR
59 #if CONFIG_AUTO_INIT_SOCK_DNS_IP_VERSION == 6
60 #define CONFIG_AUTO_INIT_SOCK_DNS_SERVER_ADDR "2001:4860:4860::8888"
61 #elif CONFIG_AUTO_INIT_SOCK_DNS_IP_VERSION == 4
62 #define CONFIG_AUTO_INIT_SOCK_DNS_SERVER_ADDR "8.8.8.8"
69#ifndef CONFIG_AUTO_INIT_SOCK_DNS_SERVER_PORT
70#define CONFIG_AUTO_INIT_SOCK_DNS_SERVER_PORT SOCK_DNS_PORT
78#define SOCK_DNS_PORT (53)
79#define SOCK_DNS_RETRIES (2)
81#define SOCK_DNS_MAX_NAME_LEN (CONFIG_DNS_MSG_LEN - sizeof(dns_hdr_t) - 4)
int sock_dns_query(const char *domain_name, void *addr_out, int family)
Get IP address for DNS name.
sock_udp_ep_t sock_dns_server
global DNS server endpoint
Common IP-based transport layer end point.
Definitions for parsing and composition of DNS messages.