On 2013-07-18 15:14 , Daniel Stenberg wrote:
On Thu, 18 Jul 2013, Daniel Stenberg wrote:
* b9f0e44 curl: Add support for various DNS binding options.
[...]
It does a nasty include of "../lib/inet_pton.h" which is incorrect in
several ways. curl cannot include libcurl internal headers with a direct
path like that and it shouldn't include libcurl private headers at all
(if it isn't a curlx* function). I see this code uses Curl_inet_pton()
which is an internal libcurl function that shouldn't be used like this
from curl even though I see you've added the source file to the curl
build. It should be made into a curlx_ version if that should remain so.
Thanks for the explanation. If the change below if made, I think this
use of inet_pton in the curl tool may no longer be necessary.
I do however think that you should make CURLOPT_DNS_LOCAL_IP* accept a
string of the IP address and do the conversion to binary within libcurl
and not in the application. Seems more in line with similar other
libcurl options too.
I actually agree with this, and mentioned already that I wasn't fully
comfortable with the current interface. Once again, the reason is that
it is a thin layer over the existing c-ares interface.
I will change it as you suggest.
-kv
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html