Contiki 2.6
|
The uIP DNS resolver functions are used to lookup a hostname and map it to a numerical IP address. More...
Files | |
file | resolv.c |
DNS host name to IP address resolver. | |
Functions | |
void | resolv_query (const char *name) |
Queues a name so that a question for the name will be sent out. | |
uip_ipaddr_t * | resolv_lookup (const char *name) |
Look up a hostname in the array of known hostnames. | |
uip_ipaddr_t * | resolv_getserver (void) |
Obtain the currently configured DNS server. | |
void | resolv_conf (const uip_ipaddr_t *dnsserver) |
Configure a DNS server. | |
Variables | |
process_event_t | resolv_event_found |
Event that is broadcasted when a DNS name has been resolved. |
The uIP DNS resolver functions are used to lookup a hostname and map it to a numerical IP address.
It maintains a list of resolved hostnames that can be queried with the resolv_lookup() function. New hostnames can be resolved using the resolv_query() function.
The event resolv_event_found is posted when a hostname has been resolved. It is up to the receiving process to determine if the correct hostname has been found by calling the resolv_lookup() function with the hostname.
void resolv_conf | ( | const uip_ipaddr_t * | dnsserver | ) |
Configure a DNS server.
dnsserver | A pointer to a 4-byte representation of the IP address of the DNS server to be configured. |
Definition at line 509 of file resolv.c.
References process_post(), and uip_ipaddr_copy.
Referenced by main().
uip_ipaddr_t* resolv_getserver | ( | void | ) |
Obtain the currently configured DNS server.
Definition at line 493 of file resolv.c.
References NULL, and uip_udp_conn::ripaddr.
uip_ipaddr_t* resolv_lookup | ( | const char * | name | ) |
Look up a hostname in the array of known hostnames.
Definition at line 467 of file resolv.c.
References NULL.
void resolv_query | ( | const char * | name | ) |
Queues a name so that a question for the name will be sent out.
name | The hostname that is to be queried. |
Definition at line 418 of file resolv.c.
References NULL, and tcpip_poll_udp().