Contiki-NG
|
Functions | |
static void | newdata (void) |
void | resolv_query (const char *name) |
Queues a name so that a question for the name will be sent out. | |
resolv_status_t | resolv_lookup (const char *name, uip_ipaddr_t **ipaddr) |
Look up a hostname in the array of known hostnames. | |
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.
|
static |
QUESTION HANDLING SECTION
ANSWER HANDLING SECTION
Definition at line 719 of file resolv.c.
References CLOCK_SECOND, clock_seconds(), process_post(), uip_appdata, uip_datalen, UIP_HTONS, uip_htons(), UIP_IP_BUF, and uip_ipaddr_copy.
resolv_status_t resolv_lookup | ( | const char * | name, |
uip_ipaddr_t ** | ipaddr ) |
Look up a hostname in the array of known hostnames.
Definition at line 1263 of file resolv.c.
References addr, clock_seconds(), ipaddr, RESOLV_STATUS_CACHED, RESOLV_STATUS_EXPIRED, RESOLV_STATUS_NOT_FOUND, RESOLV_STATUS_RESOLVING, and RESOLV_STATUS_UNCACHED.
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 1189 of file resolv.c.
References clock_seconds(), and process_post().