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.

DOH: retrieving an RRset from a child node

From: Niall O'Reilly via curl-library <>
Date: Mon, 18 Nov 2019 19:49:03 +0000


Some data is published in the DNS at a child node of the node
which corresponds to the hostname, as documented in

In particular, current (experimental) ESNI deployment uses
TXT records and child-prefix "_esni".

I've been thinking about how to extend dohprobe() to query for
an RRset containing such data, which action may be useful for
other use cases involving existing TXT, SRV, TLSA, and URI
RR types, as well as future RRtypes, such as SVCB.

Here's what I'm minded to do.

- Introduce new functions dohprobepfx() and doh_encodepfx(),
  corresponding to dohprobe() and doh_encode respectively,
  each with an additional `const char *prefix` parameter.

- Retain dohprobe() and doh_encode(), but as trivial
  wrappers around the "pfx" functions, each passing NULL
  as the argument to the corresponding "pfx" function, so
  that existing invoking code need not be modified, and
  duplication of code can be avoided.

If this doesn't seem too daft, I'll work up a PR.

I expect to deal with reception of the TXT response in a
separate PR, so as to keep changes small and modular.


Received on 2019-11-18