curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Custom resolve of Address

From: Marcel Hellwig via curl-library <>
Date: Mon, 22 Nov 2021 22:06:16 +0100

On 22.11.21 21:33, Timothe Litt via curl-library wrote:
> Why not just put the entries you need into hosts.txt ( Actually
> /etc/hosts or \Windows\System32\drivers\etc\hosts, or equivalent)?
Because I don't know the host names beforehand.

> Even embedded OSs support this, and the convention is to look there
> before consulting DNS.  This happens behind the system calls that do
> name resolution, so it's transparent to cURL - and anything else.  For
> GNU systems, this is in glibc (and see /etc/nsswitch.conf for
> resolution order).  Let the OS do its job, don't re-invent the wheel.
> This supports all the use cases for all applications.
> Building something custom into cURL only gets you cURL - and when you
> want to do something else (notify someone via mail, or SMS,  or ...)
> you're back to either doing it via cURL, or trying to force your own
> name resolution into the next application.
I only want curl. Maybe I wasn't clear enough.
The device has *no* internet access at all. The only way to connect to
the internet is through this application. Linux doesn't own or handle
the device.

- Marcel
Received on 2021-11-22