Dillo v3.1.1-98-g318d1f14
|
#include <netinet/in.h>
Go to the source code of this file.
Classes | |
struct | DilloHost |
Macros | |
#define | DILLO_ADDR_MAX sizeof(struct in_addr) |
Typedefs | |
typedef void(* | DnsCallback_t) (int status, Dlist *addr_list, void *data) |
Functions | |
void | a_Dns_init (void) |
Initializer function. | |
void | a_Dns_freeall (void) |
Dns memory-deallocation. | |
void | a_Dns_resolve (const char *hostname, DnsCallback_t cb_func, void *cb_data) |
Return the IP for the given hostname using a callback. | |
void | a_Dns_dillohost_to_string (DilloHost *host, char *dst, size_t size) |
Writes a string representation of the given DilloHost into dst. | |
typedef void(* DnsCallback_t) (int status, Dlist *addr_list, void *data) |
void a_Dns_dillohost_to_string | ( | DilloHost * | host, |
char * | dst, | ||
size_t | size | ||
) |
Writes a string representation of the given DilloHost into dst.
dst will be \0 terminated. Please note that dst must be at least 40 bytes long for IPv6 addresses.
Definition at line 502 of file dns.c.
References DilloHost::af, and DilloHost::data.
Referenced by Dns_server().
void a_Dns_freeall | ( | void | ) |
Dns memory-deallocation.
(Call this one at exit time) The Dns_queue is deallocated at execution time (no need to do that here) 'dns_cache' is the only one that grows dynamically
Definition at line 480 of file dns.c.
References a_IOwatch_remove_fd(), dClose(), dFree(), DIO_READ, dList_free(), dList_length(), dList_nth_data(), dns_cache, dns_cache_size, and dns_notify_pipe.
Referenced by main().
void a_Dns_init | ( | void | ) |
Initializer function.
Definition at line 177 of file dns.c.
References a_IOwatch_add_fd(), D_DNS_MAX_SERVERS, DIO_READ, dNew, dns_cache, dns_cache_size, dns_cache_size_max, dns_notify_pipe, dns_queue, dns_queue_size, dns_queue_size_max, dns_server, DNS_SERVER_IDLE, Dns_timeout_client(), MSG, and num_servers.
Referenced by main().
void a_Dns_resolve | ( | const char * | hostname, |
DnsCallback_t | cb_func, | ||
void * | cb_data | ||
) |
Return the IP for the given hostname using a callback.
Side effect: a thread is spawned when hostname is not cached.
Definition at line 361 of file dns.c.
References dns_cache, dns_cache_size, dns_queue, Dns_queue_add(), Dns_queue_find(), dns_server, DNS_SERVER_IDLE, Dns_server_req(), dStrAsciiCasecmp(), and num_servers.
Referenced by Http_get().