#include "setup.h"#include "hash.h"Go to the source code of this file.
| #define ares_cancel | ( | x | ) | do {} while(0) |
| #define ares_destroy | ( | x | ) | do {} while(0) |
| #define Curl_global_host_cache_use | ( | __p | ) | ((__p)->set.global_dns_cache) |
| #define CURL_HOSTENT_SIZE 9000 |
| #define CURL_INADDR_NONE (in_addr_t) ~0 |
| #define CURLRESOLV_ERROR -1 |
Definition at line 98 of file hostip.h.
Referenced by Curl_resolv(), Curl_SOCKS4(), and Curl_SOCKS5().
| #define CURLRESOLV_PENDING 1 |
Definition at line 100 of file hostip.h.
Referenced by bindlocal(), CreateConnection(), Curl_resolv(), Curl_SOCKS4(), Curl_SOCKS5(), ftp_state_pasv_resp(), and ftp_state_use_port().
| #define CURLRESOLV_RESOLVED 0 |
| typedef struct Curl_addrinfo Curl_addrinfo |
| CURLcode Curl_addrinfo4_callback | ( | void * | arg, | |
| int | status, | |||
| struct hostent * | hostent | |||
| ) |
| CURLcode Curl_addrinfo6_callback | ( | void * | arg, | |
| int | status, | |||
| struct addrinfo * | ai | |||
| ) |
| Curl_addrinfo* Curl_addrinfo_copy | ( | const void * | orig, | |
| int | port | |||
| ) |
| struct Curl_dns_entry* Curl_cache_addr | ( | struct SessionHandle * | data, | |
| Curl_addrinfo * | addr, | |||
| const char * | hostname, | |||
| int | port | |||
| ) | [read] |
Definition at line 325 of file hostip.c.
References Curl_dns_entry::addr, calloc, create_hostcache_id(), Curl_hash_add(), SessionHandle::dns, free, Names::hostcache, Curl_dns_entry::inuse, NULL, and Curl_dns_entry::timestamp.
Referenced by Curl_resolv().
| void Curl_destroy_thread_data | ( | struct Curl_async * | async | ) |
Referenced by conn_free().
| void Curl_freeaddrinfo | ( | Curl_addrinfo * | freeaddr | ) |
Definition at line 571 of file hostip.c.
References Curl_addrinfo::ai_canonname, Curl_addrinfo::ai_next, and free.
Referenced by Curl_resolv(), freednsentry(), and ftp_state_use_port().
| Curl_addrinfo* Curl_getaddrinfo | ( | struct connectdata * | conn, | |
| const char * | hostname, | |||
| int | port, | |||
| int * | waitp | |||
| ) |
Definition at line 119 of file hostip4.c.
References calloc, Curl_he2ai(), CURL_HOSTENT_SIZE, Curl_inet_pton(), Curl_ip2addr(), connectdata::data, free, simple_client::h, in_addr_t, infof, NULL, and SOCKERRNO.
Referenced by Curl_resolv().
| void Curl_global_host_cache_dtor | ( | void | ) |
Definition at line 151 of file hostip.c.
References Curl_hash_clean(), host_cache_initialized, and hostname_cache.
Referenced by curl_global_cleanup().
| struct curl_hash* Curl_global_host_cache_get | ( | void | ) | [read] |
Definition at line 143 of file hostip.c.
References hostname_cache.
Referenced by curl_easy_perform().
| void Curl_global_host_cache_init | ( | void | ) |
Definition at line 131 of file hostip.c.
References Curl_hash_init(), Curl_hash_str(), Curl_str_key_compare(), freednsentry(), host_cache_initialized, and hostname_cache.
Referenced by Curl_setopt().
| Curl_addrinfo* Curl_he2ai | ( | const struct hostent * | , | |
| int | port | |||
| ) |
Definition at line 344 of file hostip4.c.
References Curl_addrinfo::ai_addr, Curl_addrinfo::ai_addrlen, Curl_addrinfo::ai_canonname, Curl_addrinfo::ai_family, Curl_addrinfo::ai_next, Curl_addrinfo::ai_socktype, calloc, NULL, and strdup.
Referenced by Curl_addrinfo_copy(), Curl_getaddrinfo(), and Curl_ip2addr().
| void Curl_hostcache_prune | ( | struct SessionHandle * | data | ) |
Definition at line 251 of file hostip.c.
References CURL_LOCK_ACCESS_SINGLE, CURL_LOCK_DATA_DNS, Curl_share_lock(), Curl_share_unlock(), SessionHandle::dns, UserDefined::dns_cache_timeout, Names::hostcache, hostcache_prune(), hostcache_prune_data::now, SessionHandle::set, and SessionHandle::share.
Referenced by Curl_disconnect().
| Curl_addrinfo* Curl_ip2addr | ( | in_addr_t | num, | |
| const char * | hostname, | |||
| int | port | |||
| ) |
Definition at line 601 of file hostip.c.
References namebuf::addrentry, Curl_he2ai(), simple_client::h, namebuf::h_addr_list, namebuf::h_name, namebuf::hostentry, and NULL.
Referenced by Curl_getaddrinfo(), and ftp_state_use_port().
| bool Curl_ipvalid | ( | struct SessionHandle * | data | ) |
Definition at line 92 of file hostip4.c.
References CURL_IPRESOLVE_V6, FALSE, UserDefined::ip_version, SessionHandle::set, and TRUE.
Referenced by Curl_resolv().
| CURLcode Curl_is_resolved | ( | struct connectdata * | conn, | |
| struct Curl_dns_entry ** | dns | |||
| ) |
Definition at line 110 of file hostsyn.c.
References CURLE_COULDNT_RESOLVE_HOST, and NULL.
Referenced by Curl_resolv(), and multi_runsingle().
| struct curl_hash* Curl_mk_dnscache | ( | void | ) | [read] |
Definition at line 539 of file hostip.c.
References Curl_hash_alloc(), Curl_hash_str(), Curl_str_key_compare(), and freednsentry().
Referenced by curl_easy_perform(), curl_multi_init(), and curl_share_setopt().
| int Curl_num_addresses | ( | const Curl_addrinfo * | addr | ) |
Definition at line 162 of file hostip.c.
References Curl_addrinfo::ai_next.
Referenced by Curl_connecthost().
| const char* Curl_printable_address | ( | const Curl_addrinfo * | ip, | |
| char * | buf, | |||
| size_t | bufsize | |||
| ) |
Definition at line 177 of file hostip.c.
References Curl_addrinfo::ai_addr, Curl_addrinfo::ai_family, Curl_inet_ntop(), and NULL.
Referenced by Curl_SOCKS4(), Curl_SOCKS5(), Curl_store_ip_addr(), ftp_pasv_verbose(), ftp_state_use_port(), and singleipconnect().
| int Curl_resolv | ( | struct connectdata * | conn, | |
| const char * | hostname, | |||
| int | port, | |||
| struct Curl_dns_entry ** | dnsentry | |||
| ) |
Definition at line 393 of file hostip.c.
References create_hostcache_id(), Curl_cache_addr(), Curl_freeaddrinfo(), Curl_getaddrinfo(), Curl_hash_pick(), Curl_ipvalid(), Curl_is_resolved(), CURL_LOCK_ACCESS_SINGLE, CURL_LOCK_DATA_DNS, Curl_share_lock(), Curl_share_unlock(), CURLRESOLV_ERROR, CURLRESOLV_PENDING, CURLRESOLV_RESOLVED, connectdata::data, SessionHandle::dns, failf, free, Names::hostcache, Curl_dns_entry::inuse, UserDefined::no_signal, NULL, remove_entry_if_stale(), SessionHandle::set, and SessionHandle::share.
Referenced by bindlocal(), CreateConnection(), Curl_SOCKS4(), Curl_SOCKS5(), ftp_state_pasv_resp(), and ftp_state_use_port().
| int Curl_resolv_getsock | ( | struct connectdata * | conn, | |
| curl_socket_t * | sock, | |||
| int | numsocks | |||
| ) |
| void Curl_resolv_unlock | ( | struct SessionHandle * | data, | |
| struct Curl_dns_entry * | dns | |||
| ) |
Definition at line 511 of file hostip.c.
References CURL_LOCK_ACCESS_SINGLE, CURL_LOCK_DATA_DNS, Curl_share_lock(), Curl_share_unlock(), DEBUGASSERT, Curl_dns_entry::inuse, and SessionHandle::share.
Referenced by bindlocal(), Curl_done(), Curl_SOCKS4(), Curl_SOCKS5(), ftp_state_pasv_resp(), and ftp_state_use_port().
| void Curl_scan_cache_used | ( | void * | user, | |
| void * | ptr | |||
| ) |
Referenced by Curl_disconnect().
| CURLcode Curl_wait_for_resolv | ( | struct connectdata * | conn, | |
| struct Curl_dns_entry ** | dnsentry | |||
| ) |
Definition at line 95 of file hostsyn.c.
References CURLE_COULDNT_RESOLVE_HOST, and NULL.
Referenced by bindlocal(), Curl_connect_host(), Curl_do(), Curl_SOCKS4(), Curl_SOCKS5(), ftp_state_pasv_resp(), and ftp_state_use_port().
1.5.6