D:/opendownloadmanager/ODM-1.x/InetFile/cURL_lib/hostip.h File Reference

#include "setup.h"
#include "hash.h"

Go to the source code of this file.

Classes

struct  Curl_addrinfo
struct  Curl_dns_entry

Defines

#define CURLRES_IPV4
#define CURLRES_ADDRINFO_COPY
#define CURLRES_SYNCH
#define CURLRES_IDN
#define CURL_HOSTENT_SIZE   9000
#define CURL_TIMEOUT_RESOLVE   300
#define CURL_ASYNC_SUCCESS   CURLE_OK
#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 CURLRESOLV_ERROR   -1
#define CURLRESOLV_RESOLVED   0
#define CURLRESOLV_PENDING   1
#define CURL_INADDR_NONE   (in_addr_t) ~0

Typedefs

typedef struct Curl_addrinfo Curl_addrinfo

Functions

void Curl_global_host_cache_init (void)
void Curl_global_host_cache_dtor (void)
struct curl_hashCurl_global_host_cache_get (void)
int Curl_resolv (struct connectdata *conn, const char *hostname, int port, struct Curl_dns_entry **dnsentry)
bool Curl_ipvalid (struct SessionHandle *data)
Curl_addrinfoCurl_getaddrinfo (struct connectdata *conn, const char *hostname, int port, int *waitp)
CURLcode Curl_is_resolved (struct connectdata *conn, struct Curl_dns_entry **dns)
CURLcode Curl_wait_for_resolv (struct connectdata *conn, struct Curl_dns_entry **dnsentry)
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)
void Curl_scan_cache_used (void *user, void *ptr)
void Curl_freeaddrinfo (Curl_addrinfo *freeaddr)
struct curl_hashCurl_mk_dnscache (void)
void Curl_hostcache_prune (struct SessionHandle *data)
int Curl_num_addresses (const Curl_addrinfo *addr)
CURLcode Curl_addrinfo4_callback (void *arg, int status, struct hostent *hostent)
CURLcode Curl_addrinfo6_callback (void *arg, int status, struct addrinfo *ai)
Curl_addrinfoCurl_ip2addr (in_addr_t num, const char *hostname, int port)
Curl_addrinfoCurl_he2ai (const struct hostent *, int port)
Curl_addrinfoCurl_addrinfo_copy (const void *orig, int port)
const char * Curl_printable_address (const Curl_addrinfo *ip, char *buf, size_t bufsize)
struct Curl_dns_entryCurl_cache_addr (struct SessionHandle *data, Curl_addrinfo *addr, const char *hostname, int port)
void Curl_destroy_thread_data (struct Curl_async *async)


Define Documentation

#define ares_cancel (  )     do {} while(0)

Definition at line 60 of file hostip.h.

Referenced by Curl_done().

#define ares_destroy (  )     do {} while(0)

Definition at line 61 of file hostip.h.

Referenced by Curl_close(), and Curl_open().

#define CURL_ASYNC_SUCCESS   CURLE_OK

Definition at line 59 of file hostip.h.

#define Curl_global_host_cache_use ( __p   )     ((__p)->set.global_dns_cache)

Definition at line 90 of file hostip.h.

Referenced by Curl_close(), and curl_easy_perform().

#define CURL_HOSTENT_SIZE   9000

Definition at line 52 of file hostip.h.

Referenced by Curl_getaddrinfo().

#define CURL_INADDR_NONE   (in_addr_t) ~0

Definition at line 174 of file hostip.h.

Referenced by bindlocal(), and ftp_state_use_port().

#define CURL_TIMEOUT_RESOLVE   300

Definition at line 54 of file hostip.h.

#define CURLRES_ADDRINFO_COPY

Definition at line 40 of file hostip.h.

#define CURLRES_IDN

Definition at line 49 of file hostip.h.

#define CURLRES_IPV4

Definition at line 34 of file hostip.h.

#define CURLRES_SYNCH

Definition at line 45 of file hostip.h.

#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

#define CURLRESOLV_RESOLVED   0

Definition at line 99 of file hostip.h.

Referenced by Curl_resolv().


Typedef Documentation

typedef struct Curl_addrinfo Curl_addrinfo

Definition at line 78 of file hostip.h.


Function Documentation

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 
)

Definition at line 554 of file hostip.c.

References Curl_he2ai().

struct Curl_dns_entry* Curl_cache_addr ( struct SessionHandle data,
Curl_addrinfo addr,
const char *  hostname,
int  port 
) [read]

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 
)

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   ) 

Curl_addrinfo* Curl_he2ai ( const struct hostent *  ,
int  port 
)

void Curl_hostcache_prune ( struct SessionHandle data  ) 

Curl_addrinfo* Curl_ip2addr ( in_addr_t  num,
const char *  hostname,
int  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]

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 
)

int Curl_resolv ( struct connectdata conn,
const char *  hostname,
int  port,
struct Curl_dns_entry **  dnsentry 
)

int Curl_resolv_getsock ( struct connectdata conn,
curl_socket_t sock,
int  numsocks 
)

Definition at line 124 of file hostsyn.c.

Referenced by multi_getsock().

void Curl_resolv_unlock ( struct SessionHandle data,
struct Curl_dns_entry dns 
)

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 
)


Generated on Sun May 25 00:20:06 2008 by  doxygen 1.5.6