• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/curl-7.23.1/lib/

Lines Matching defs:dns

260   if((data->set.dns_cache_timeout == -1) || !data->dns.hostcache)
271 hostcache_prune(data->dns.hostcache,
283 remove_entry_if_stale(struct SessionHandle *data, struct Curl_dns_entry *dns)
287 if(!dns || (data->set.dns_cache_timeout == -1) || !data->dns.hostcache)
295 if(!hostcache_timestamp_remove(&user,dns) )
298 Curl_hash_clean_with_criterium(data->dns.hostcache,
318 * address, we call this function to store the information in the dns
331 struct Curl_dns_entry *dns;
342 dns = calloc(1, sizeof(struct Curl_dns_entry));
343 if(!dns) {
348 dns->inuse = 0; /* init to not used */
349 dns->addr = addr; /* this is the address(es) */
350 time(&dns->timestamp);
351 if(dns->timestamp == 0)
352 dns->timestamp = 1; /* zero indicates that entry isn't in hash table */
355 dns2 = Curl_hash_add(data->dns.hostcache, entry_id, entry_len+1,
356 (void *)dns);
358 free(dns);
363 dns = dns2;
364 dns->inuse++; /* mark entry as in-use */
369 return dns;
399 struct Curl_dns_entry *dns = NULL;
418 /* See if its already in our dns cache */
419 dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1);
425 if(remove_entry_if_stale(data, dns))
426 dns = NULL; /* the memory deallocation is being handled by the hash */
428 if(dns) {
429 dns->inuse++; /* we use it! */
436 if(!dns) {
463 result = Curl_resolver_is_resolved(conn, &dns);
466 if(dns)
477 dns = Curl_cache_addr(data, addr, hostname, port);
482 if(!dns)
490 *entry = dns;
682 void Curl_resolv_unlock(struct SessionHandle *data, struct Curl_dns_entry *dns)
684 DEBUGASSERT(dns && (dns->inuse>0));
689 dns->inuse--;
692 if(dns->inuse == 0 && dns->timestamp == 0) {
693 Curl_freeaddrinfo(dns->addr);
694 free(dns);
702 * File-internal: free a cache dns entry.