aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.h
AgeCommit message (Collapse)Author
2011-12-31CURLOPT_RESOLVE: avoid adding already present host namesDaniel Stenberg
The load host names to DNS cache function was moved to hostip.c and it now makes sure to not add host names that already are present in the cache. It would previously lead to memory leaks when for example using the --resolve and multiple URLs on the command line.
2011-12-23resolve: don't leak pre-populated dns entriesDaniel Stenberg
CURLOPT_RESOLVE populates the DNS cache with entries that are marked as eternally in use. Those entries need to be taken care of when the cache is killed off. Bug: http://curl.haxx.se/bug/view.cgi?id=3463121 Reported by: "tw84452852"
2011-11-17CURLOPT_DNS_SERVERS: set name servers if possibleJason Glasgow
2011-04-25Fixed compilation when the synchronous resolver is usedDan Fandrich
2011-04-25async resolvers: further cleanupsDaniel Stenberg
asyn-ares.c and asyn-thread.c are two separate backends that implement the same (internal) async resolver API for libcurl to use. Backend is specified at build time. The internal resolver API is defined in asyn.h for asynch resolvers.
2011-04-25asynch resolvers: cleanupDaniel Stenberg
Fixed indents, coding conventions and white space edits. Modified the c-ares completion callback function to again NOT read the conn data when the ares handle is being taken down as then it may have been freed already.
2011-04-25asynch resolvers: unifiedVsevolod Novikov
Introducing an internal API for handling of different async resolver backends.
2011-04-21Fix a couple of spelling errors in lib/Fabian Keil
Found with codespell.
2011-03-23ipv6: only probe onceDaniel Stenberg
Move ipv6-functional-probe into a single function that is used from all places that need to know. Make the probe function store the result in a static variable so that subsequent invokes just returns the previous result and won't have to probe again.
2010-12-27c-ares: fix cancelled resolvesDaniel Stenberg
When built IPv6-enabled, we could do Curl_done() with one of the two resolves having returned already, so when ares_cancel() is called the resolve callback ends up doing funny things (sometimes resulting in a segfault) since it would try to actually store the previous resolve even though we're shutting down the resolve. This bug was introduced in commit 8ab137b2bc9630ce so it hasn't been included in any public release. Bug: http://curl.haxx.se/bug/view.cgi?id=3145445 Reported by: Pedro Larroy
2010-11-11ip_version: moved to connection structDaniel Stenberg
The IP version choice was previously only in the UserDefined struct within the SessionHandle, but since we sometimes alter that option during a request we need to have it on a per-connection basis. I also moved more "init conn" code into the allocate_conn() function which is designed for that purpose more or less.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-01-25Constantine Sapuntzakis threaded resolver enhancementsYang Tse
2010-01-22Definitions of resolver specialty compile-time defines CURLRES_* movedYang Tse
from hostip.h to setup.h in order to allow proper inclusion in any file. This represents no functional change at all in which resolver is used, everything still works as usual, internally and externally there is no difference in behavior.
2010-01-22Constantine Sapuntzakis refactoring of async callbacks, allowingYang Tse
removal of Curl_addrinfo_copy(), Curl_addrinfo6_callback(), and Curl_addrinfo4_callback()
2009-11-11- Constantine Sapuntzakis posted bug #2891595Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2891595) which identified how an entry in the DNS cache would linger too long if the request that added it was in use that long. He also provided the patch that now makes libcurl capable of still doing a request while the DNS hash entry may get timed out.
2008-11-06Merged existing IPv4 and IPv6 Curl_ip2addr functions into a single oneYang Tse
which now also takes a protocol address family argument.
2008-10-30Move curl_dofreeaddrinfo() and curl_dofreeaddrinfo()Yang Tse
implementation from lib/hostip6.c to lib/curl_addrinfo.c and prototypes from lib/hostip.h to lib/curl_addrinfo.h
2008-10-30Use our Curl_addrinfo definition even when an addrinfo struct is available.Yang Tse
Use a wrapper function to call system's getaddrinfo().
2008-10-02take 2 at fixing compiler warning: argument might be clobbered by `longjmp' ↵Yang Tse
or `vfork'
2008-10-02fix compiler warning: `variable' might be clobbered by `longjmp' or `vfork'Yang Tse
2008-09-29Moved all signal-based name resolution timeout handling into a single newDan Fandrich
Curl_resolv_timeout function to reduce coupling.
2008-09-18fix compiler warning: external declaration in primary source fileYang Tse
2008-07-09- Andreas Schuldei improved Phil Blundell's patch for IPv6 using c-ares, and IDaniel Stenberg
edited it slightly. Now you should be able to use IPv6 addresses fine even with libcurl built to use c-ares.
2008-01-15Woops, partly revert my previous commit and do it slightly differently instead.Daniel Stenberg
The signalling of that a global DNS cache is wanted is done by setting the option but the setting of the internal variable that it is in use must not be done until it finally actually gets used! NOTE and WARNING: I noticed that you can't actually switch off the global dns cache with CURLOPT_DNS_USE_GLOBAL_CACHE but you couldn't do that previously either and the option is very clearly and loudly documented as DO NOTE USE so I won't bother to fix this bug now.
2008-01-15I made the torture test on test 530 go through. This was actually due toDaniel Stenberg
silly code left from when we switched to let the multi handle "hold" the dns cache when using the multi interface... Of course this only triggered when a certain function call returned error at the correct moment.
2007-09-28Adapted the c-ares code to the API change c-ares 1.5.0 brings in theDaniel Stenberg
notifier callback(s).
2007-06-30minor patches to enable building for NetWare CLIB.Gunter Knauf
sent by Dmitry Mityugov.
2006-09-08Compilation fixYang Tse
2006-09-07Major overhaul introducing http pipelining support and shared connectionDaniel Stenberg
cache within the multi handle.
2006-08-08moved ugly NetWare hack to hostip.h so that hostip.c uses it too.Gunter Knauf
2006-07-24Ares needs CURLRES_ADDRINFO_COPY. Curl_hostent_relocate() is gone.Gisle Vanem
2006-07-21Constify arguments to Curl_he2ai() and Curl_addrinfo_copy().Gisle Vanem
2006-07-21Constify 'hostname' and 'service' to various resolver functions.Gisle Vanem
2006-07-14Change the ai_addrlen type of struct addrinfo from size_t to socklen_t, per ↵Yang Tse
RFC 3493.
2006-07-04Test HAVE_GETNAMEINFO definition before using GETNAMEINFO_XXX definitions.Yang Tse
2006-07-03Fix compiler warning.Yang Tse
2006-04-11added docs and removed protoDaniel Stenberg
2006-04-10First curl_multi_socket() commit. Should primarily be considered as an internalDaniel Stenberg
code rearrange to fit the future better.
2006-02-23Lots of work and analysis by "xbx___" in bug #1431750Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1431750) helped me identify and fix two different but related bugs: 1) Removing an easy handle from a multi handle before the transfer is done could leave a connection in the connection cache for that handle that is in a state that isn't suitable for re-use. A subsequent re-use could then read from a NULL pointer and segfault. 2) When an easy handle was removed from the multi handle, there could be an outstanding c-ares DNS name resolve request. When the response arrived, it caused havoc since the connection struct it "belonged" to could've been freed already. Now Curl_done() is called when an easy handle is removed from a multi handle pre-maturely (that is, before the transfer was complteted). Curl_done() also makes sure to cancel all (if any) outstanding c-ares requests.
2005-12-11Undo last changesYang Tse
2005-12-11Fix compiler warning and compatibility issue with the type of the parameter ↵Yang Tse
used in getnameinfo() to receive the length of the sockaddr struct.
2005-04-04kill warningsDaniel Stenberg
2005-04-04hostthre.c: destroy_thread_data() made public. CalledGisle Vanem
from url.c: Curl_disconnect().
2005-02-09FTP code turned into state machine. Not completely yet, but a good start.Daniel Stenberg
The tag 'before_ftp_statemachine' was set just before this commit in case of future need.
2005-02-08Curl_addrinfo?_callback() and addrinfo_callback() now returnsGisle Vanem
CURLE_OK or CURLE_OUT_OF_MEMORY. Add typecast in hostares.c.
2005-01-25Use plain structs and not typedef'ed ones in the hash and linked-list code.Daniel Stenberg
2004-06-24Gisle cleaned up remaining host resolve re-org issuesDaniel Stenberg
2004-06-24made the Curl_he2ai() take the port number as an int intead, to avoid lotsDaniel Stenberg
of typecasts all over
2004-06-24Source cleanups. The major one being that we now _always_ use a Curl_addrinfoDaniel Stenberg
linked list for name resolved data, even on hosts/systems with only IPv4 stacks as this simplifies a lot of code.