dns.h File Reference

DNS sock definitions. More...

Detailed Description

DNS sock definitions.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file dns.h.

#include <errno.h>
#include <stdint.h>
#include <unistd.h>
#include "net/sock/udp.h"
+ Include dependency graph for dns.h:

Go to the source code of this file.

Data Structures

struct  sock_dns_hdr_t
 DNS internal structure. More...
 

Functions

int sock_dns_query (const char *domain_name, void *addr_out, int family)
 Get IP address for DNS name. More...
 

Variables

sock_udp_ep_t sock_dns_server
 global DNS server endpoint
 

DNS defines

#define DNS_TYPE_A   (1)
 
#define DNS_TYPE_AAAA   (28)
 
#define DNS_CLASS_IN   (1)
 
#define SOCK_DNS_PORT   (53)
 
#define SOCK_DNS_RETRIES   (2)
 
#define SOCK_DNS_BUF_LEN   (128) /* we're in embedded context. */
 
#define SOCK_DNS_MAX_NAME_LEN   (SOCK_DNS_BUF_LEN - sizeof(sock_dns_hdr_t) - 4)