KExtendedSocket async lookup
bastian at kde.org
Thu Aug 1 20:55:25 BST 2002
On Thursday 01 August 2002 11:57 am, Thiago Macieira wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Waldo Bastian wrote:
> >Hi Thiago,
> >After looking into the KExtendedSocket code I noticed that async lookups
> > use the QDns class. Doesn't this imply that the lookup results for sync
> > and asynced mode operation can vary wildly since QDns does not take into
> > account /etc/hosts among others?
> That could be a problem, yes. But I could find no other way of doing an
> asynchronous lookup without using the undocumented, GNU-specific
> getaddrinfo_a() function.
> I had planned on writing a resolver library that would do all that and also
> implement SVR-based lookups, but I simply can't find the time.
> Do you have any other suggestions?
Using getaddrinfo_a where available might be a solution if we can get some
guarantee that it will not disappear in the next version of glibc.
> >Related to this differences, netsupp.cpp has a test for the availability
> > of IPv6 but the async lookup code does not seem to check that and do a
> > IPv6 lookup in all cases.
> Hmm... true. It would be then useful to make the same tests and decide
> whether to do an IPv6 lookup or not.
> >As of last year there were still a lot of nameservers out there that don't
> >properly handle IPv6 lookups (bbc.co.uk the most well known) so not being
> >able to disable IPv6 lookups is a problem. (See e.g. BR30078)
> The thing is, either we do it right or we work around those buggy servers.
> The idea behind getaddrinfo() is that we don't have to know what kind of
> addresses we're looking for. So, it will do IPv4, IPv6 and Unix lookups as
> of now and, maybe in the future, some new things. That we accomplish by
> using AF_UNSPEC lookups.
Oh, maybe I misunderstood then... is the sync code _always_ doing IPv6 lookups
even if we don't have working IPv6 support?
That would explain why disabling IPv6 kernel support didn't help for
bastian at kde.org | SuSE Labs KDE Developer | bastian at suse.com
More information about the kde-core-devel