delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/20/04:00:35

X-Spam-Check-By: sourceware.org
Date: Mon, 20 Feb 2006 10:00:15 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: resolv.conf equivalent on Cygwin
Message-ID: <20060220090015.GC28275@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <8389af8b0602182023i1638061fgc0babe26d0544b0f AT mail DOT gmail DOT com>
Mime-Version: 1.0
In-Reply-To: <8389af8b0602182023i1638061fgc0babe26d0544b0f@mail.gmail.com>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Feb 19 13:23, Hiroki Sakagami wrote:
> Hi,
> 
> I am trying to port a program with an asynchronous DNS resolver to
> Cygwin.  Because it can't use gethostbyname() family functions, it

Why?  Lynx, for instance, uses gethostbyname and kin for asynchronous
operation, too.  It just starts an extra thread to run them.

> needs to read /etc/resolv.conf file.  However, Windows seems to have
> the names of DNS servers in the registry key
> "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" or
> something.  Is there any Cygwin standard way to query DNS server
> names?
> 
> I already wrote the code which use RegOpenKeyEx() and other functions.
>  But if there is another appropriate way I'd like to use it.

In Cygwin you have the minires resolver lib, which allows you to call
the resolver functions as if on a POSIX system.  As for the gethostbyname
function, you can create asynchronous requests by calling the functions
in a thread.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019