ArvernOS
Loading...
Searching...
No Matches
dns.h File Reference
#include <net/net.h>
#include <net/udp.h>
#include <sys/types.h>
Include dependency graph for dns.h:

Data Structures

struct  dns_header_t
 
struct  dns_answer_header_t
 

Functions

int dns_lookup (net_interface_t *interface, const char *domain, uint8_t ip[4])
 

Detailed Description

Function Documentation

◆ dns_lookup()

int dns_lookup ( net_interface_t * interface,
const char * domain,
uint8_t ip[4] )

Performs a DNS lookup.

Parameters
interfacethe interface that should be used to send the DNS packet
domainthe domain name that is to be looked up
ipthe receiving array for the IPv4 address
Returns
0 on success, something else on error