Getting and parsing a HTTPS record
Daniel Stenberg
daniel at haxx.se
Thu Jan 16 09:05:55 CET 2025
Hi,
I want is to create a request for a HTTPS record and get the answer or an
error. I struggle to understand how to do this. The ares_dns_record_create is
hard to follow and understand what sequence to use and how to glue everything
together.
I think the docs would benefit from being split up to document one function
per man page as God intended. With examples showing how they can be used.
This is my initial attempt to send off the HTTPS RR request:
ares_dns_record_create(&dnsrec, 0 /* id */, 0, /* flags */
ARES_OPCODE_QUERY, ARES_RCODE_NOERROR);
ares_dns_record_query_add(dnsrec, hostname,
ARES_REC_TYPE_HTTPS, ARES_CLASS_IN);
ares_send_dnsrec((ares_channel)resolver_hgandle,
dnsrec, dnsrec_done_cb, data, NULL);
But I simply cannot figure out how the dnsrec_done_cb callback should be
written to parse the incoming reply?
What helpers should I use?
--
/ daniel.haxx.se
More information about the c-ares
mailing list