[EXTERNAL] Re: Win 11 Cygwin dns-utils "dig" and "host": Option -6 causes command to timeout

Lavrentiev, Anton (NIH/NLM/NCBI) [C] lavr@ncbi.nlm.nih.gov
Thu Feb 15 20:00:07 GMT 2024


Correction:

> (That would be "options osquery".)

Sorry, I have forgotten a few pieces since last time I worked with that code.

So in the absence of "/etc/resolv.conf", Cygwin uses OS (Windows DNS Query) API.

If /etc/resolv.conf is present, then "options osquery" tells Cygwin to use
the Windows DNS API (and conversely, if that option is not there, Cygwin
resolver sends and processes DNS queries on its own).

The code can be looked at here:

https://www.cygwin.com/cgit/newlib-cygwin/tree/winsup/cygwin/libc/minires.c

In particular, you can use the following options to debug what Cygwin is doing in the resolver:

options debug          # Cygwin own resolver

or

options debug osquery  # Cygwin piggy-backs on Windows

And that's how it is done:
https://www.cygwin.com/cgit/newlib-cygwin/tree/winsup/cygwin/libc/minires-os-if.c

HTH,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


More information about the Cygwin mailing list