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

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to