Classes | |
| struct | dns_hdr |
| struct | dns_answer |
| struct | namemap |
Files | |
| file | resolv.c |
| file | resolv.h |
Defines | |
| #define | NULL (void *)0 |
| #define | MAX_RETRIES 8 |
| #define | RESOLV_ENTRIES 4 |
| #define | UIP_UDP_APPCALL resolv_appcall |
Typedefs | |
| typedef int | uip_udp_appstate_t |
Functions | |
| void | resolv_appcall (void) |
| void | resolv_query (char *name) |
| u16_t * | resolv_lookup (char *name) |
| u16_t * | resolv_getserver (void) |
| void | resolv_conf (u16_t *dnsserver) |
| void | resolv_init (void) |
| void | resolv_found (char *name, u16_t *ipaddr) |
When a hostname has been resolved (or found to be non-existant), the resolver code calls a callback function called resolv_found() that must be implemented by the module that uses the resolver.
| void resolv_conf | ( | u16_t * | dnsserver | ) |
Configure which DNS server to use for queries.
| dnsserver | A pointer to a 4-byte representation of the IP address of the DNS server to be configured. |
| void resolv_found | ( | char * | name, | |
| u16_t * | ipaddr | |||
| ) |
Callback function which is called when a hostname is found.
This function must be implemented by the module that uses the DNS resolver. It is called when a hostname is found, or when a hostname was not found.
| name | A pointer to the name that was looked up. | |
| ipaddr | A pointer to a 4-byte array containing the IP address of the hostname, or NULL if the hostname could not be found. |
| u16_t * resolv_getserver | ( | void | ) |
Obtain the currently configured DNS server.
| void resolv_init | ( | void | ) |
Initalize the resolver.
| u16_t * resolv_lookup | ( | char * | name | ) |
Look up a hostname in the array of known hostnames.
| void resolv_query | ( | char * | name | ) |
Queues a name so that a question for the name will be sent out.
| name | The hostname that is to be queried. |
1.5.8