On Mon, Nov 22, 2021 at 1:33 PM Marcel via curl-library
<[email protected]> wrote:
>
> Hey everyone,
>
> I'm in need of a callback, that let me resolve a domain to an IP address.

[...]

> how to intercept the c-ares query, e.g. by using a callback in that library 
> which then will resolve a name to a IP address.

You can always override function calls by re-routing them into your
own dynamic library before passing it on to the original - at least on
Linux and similar systems.

You can skip the LD_PRELOAD if you're linking your own program.  The
examples below should be sufficient to get you started with this:

https://www.linuxjournal.com/article/7795

https://hackerboss.com/overriding-system-functions-for-fun-and-profit/

rainer
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to