curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Retrieve all addresses mapped to specific host, not just one IP

From: myLC--- via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 14 Aug 2018 11:23:47 +0200

On Mon, 13 Aug 2018, Richard Gray wrote:

> I'm confused about what it is you are trying to do with
> the list of addresses?
...

If you have a list of IPs/hostnames, this is necessary to
identify duplicate entries (public VPNs or proxies, for
instance).

> It's not clear to me why you are trying to get libcurl to
> return that address list.
...
> If you are on a modern system, you already have a way to
> do this: getaddrinfo() or equivalent.

That would imply doing it twice – libcurl would do it once
and then you'd do the same afterwards.

> I guess I'm wondering if it makes more sense for your
> application to get the list of addresses itself and then
> tell libcurl what to do with them.

Yes, but libcurl already does the same. Of course, you can
do it yourself and hand the list of IPs to libcurl.
Prioritization (which IPs libcurl should favor) might become
an issue then. This way, you'd end up having to mimic just
about everything libcurl normally does. Furthermore, you'd
have to devise a way to hand over that information in a
proper form. This would be essentially the same in reverse.
It would result in having the same code twice in your
(static) binaries, though.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-08-14