delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Subject: | RE: Asynchronous DNS - gethostbyname_r |
Date: | Wed, 1 Nov 2000 13:04:42 +1100 |
Message-ID: | <188CAABFF1C6AD4D946FF2170CD8B7AA7FB4@itdomain002.itdomain.net.au> |
MIME-Version: | 1.0 |
Thread-Topic: | Asynchronous DNS - gethostbyname_r |
X-MimeOLE: | Produced By Microsoft Exchange V6.0.4368.4 |
content-class: | urn:content-classes:message |
Thread-Index: | AcBDopt51n2DJeY8QHukeprwmiz4fwAA9R0w |
From: | "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au> |
To: | "Dustin Lang" <dustinl AT interchange DOT ubc DOT ca> |
Cc: | <cygwin AT sources DOT redhat DOT com> |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id VAA20844 |
Ok, so I'm slightly off-topic... > -----Original Message----- > From: Dustin Lang [mailto:dustinl AT interchange DOT ubc DOT ca] > Sent: Wednesday, 1 November 2000 11:04 AM > To: Robert Collins > Subject: Re: Asynchronous DNS - gethostbyname_r > > > > Hi, > > Isn't the net great - I ask a question about cygwin and > mention squid, and > within a couple of hours I get a response from someone who's done work > with cygwin and squid! Truely :] > > > I'm not sure if this answers your question: > > If you download the CVS head branch of squid 2.4 it has > asynchronous calls > > for cygwin already patched in the source. It also uses > internal dns servers > > so you don't get a dozen external process's. > > Just glancing briefly over the dns_internal.c code, I note > that it reads > /etc/resolv.conf to find out the IP addresses of the nameservers to > use. I don't want my program to require any special network > setup by the > user - "IP numbers are scary! Can't I just enter my DNS server's > hostname?" - so I would ideally like to use the "native" > lookup calls like > gethostbyname(). However, it looks as though I may have to > be flexible to > solve this problem in a nice way :) I wonder if the > currently-valid DNS > server addresses are kept in the windows registry in a useful > place (and > in a useful form)? If so, it should be possible to poke > around in the > registry on startup to find out which DNS servers to use and > pass these on > to the dns_internal code. It would also be necessary to deal > with local > lookups in the "hosts" file, though this wouldn't be very > difficult to do. You need to do whatever ipconfig and winipcfg do. Also note that you have different resolvers for different interfaces. One of the reasons I ported squid was to have a local proxy on my windows machine ... Have you considered enhancing squid rather than "re-inventing the wheel?" (Not that I object to having a variety of tools around). I am suggesting that because squid has things like ICP, multicasting and cache digests that would be very useful if you are looking at running a distributed caching system within a LAN-like environment. All you'd need to do is add startup code to "autoconfigure" your environment.. And Squid (after a slow period of development) is now getting lots of work done on it. For example - rfc 2616 transfer encoding & NTLM authentication. > I suppose it might not be _too_ hard to use WSAAsyncGetHostByName; I'd > have to create an invisible window to receive the callback > messages, but > it otherwise does what I want. A word of warning: be careful mixing your cygwin and native windows sockets calls. Search the cygwin and cygwin apps mailing lists for more information :-]. > > Thanks for the pointers! > dstn. > > > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |