[Psi-devel] IPv6 Support in Psi
Justin Karneges
justin-psi2 at affinix.com
Thu Apr 12 16:08:42 PDT 2007
On Thursday 12 April 2007 2:38 pm, Loren M. Lang wrote:
> Justin Karneges wrote:
> > On Thursday 12 April 2007 11:02 am, Loren M. Lang wrote:
> >> Does that define I uncommented simply switch between QDns and NDns? And,
> >> if so, are there any known limitations between the code paths,
> >> currently?
> >
> > NO_NDNS enables QDns (Q3Dns) for A/AAAA lookups. QDns is unmaintained,
> > and has a history of being buggy, and so we try to minimize its usage.
> > This is why the default behavior is to use QDns just for SRV (because we
> > had no other option) and NDns for A records. For AAAA records, we made a
> > special option (NO_NDNS) to enable usage of QDns in that case, since NDns
> > cannot do AAAA.
>
> NDns is just using gethostbyname() correct? I believe the correct fix
> is to modify it to use getaddrinfo() instead. getaddrinfo() appears to
> be able to resolve SRV records in addition to AAAA records. I can start
> work on a patch to use getaddrinfo instead of gethostbyname()/QDns.
Qt 4 has a "native" DNS wrapper called QHostInfo, which supports A/AAAA and
multiple return values (on paper anyway, I've never used it myself).
Underneath, I'm pretty sure it is just getaddrinfo() or whatever is portable.
You might consider using this class rather than system calls.
That said, the ultimate plan for Iris DNS is to hide all DNS activity behind
the Iris XMPP::NameResolver abstraction. This is mostly complete, and the
only problem left is the NDns usage in connector.cpp. I posted patches to
the mailing list yesterday to fix this.
-Justin
More information about the psi-devel
mailing list