On Mon, Nov 22, 2021 at 9:34 AM 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. > > I have a modem module which communicates via AT commands with my embedded > linux device. > The only thing currently not working is resolving DNS names. > > There is a way of defining DNS names beforehand (using CURLOPT_RESOLVE), but > I don't see a way of using it for dynamic queries, e.g. during or before a > connect.
Don't. use any tiny DNS forwarder.. and make it listen in localhost.popular on the embedded world is dnsmasq.. if you are not short on flash or memory use unbound. You'll probably be able to make curl do what you want but all of the other system components will *not* follow, from the C library to whatever other component. > > There is the CURLOPT_RESOLVER_START_FUNCTION callback, but I'm not sure (due > to lack of examples and good documentation) on how to intercept the c-ares > resolver and provide a DNS name on the fly. > > So my two questions are: > Is there a callback, e.g. CURLOPT_RESOLVE_NAME that will be called with a dns > name and a IP version and expects the correct IP version > > or > > 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. > > Regards, > Marcel > -- > Unsubscribe: https://lists.haxx.se/listinfo/curl-library > Etiquette: https://curl.haxx.se/mail/etiquette.html -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
