[Development] Implementing of a DNS feature under Windows [QTBUG-30166]

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Sat Sep 28 11:12:39 CEST 2013


On Fri, Sep 27, 2013 at 9:19 PM, Jan Kundrát <jkt at flaska.net> wrote:

> On Thursday, 26 September 2013 10:33:49 CEST, Mandeep Sandhu wrote:
> > . I'll be using the PIP4_ARRAY struct for specifying the nameserver
>
> How would you handle a situation where the user provides an IPv6 address of
> a nameserver?
>

Good Question.

We're currently using the win API "DnsQuery_W()" function for executing the
dns request synchronously. However, it _seems_, that this API will only
accepts a PIP4_ARRAY struct. Actually, the argument which accepts DNS
server list is sort of undocumented, at least in MSDN, though MS itself
shows an example where this arg is being used to pass a DNS server ip addr
list (see: http://support.microsoft.com/kb/831226).

So the other option I see is to use another DNS API - DnsQueryEx (
http://msdn.microsoft.com/en-us/library/windows/desktop/hh447188(v=vs.85).aspx).
This is the async version, though it can be used synchronously as well.
This API has provision for accepting a IPv6 address.

I was unsure about replacing the existing API, and hence mentioned this, as
a comment, in the case where a user passes an IPv6 nameserver address. I
was hoping to get some suggestion in the review! :)

Should we change the API in this ticket or open a new one for it?

-mandeep


>
> Cheers,
> Jan
>
> --
> Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130928/70fac3d8/attachment.html>


More information about the Development mailing list