[Development] QTBUG-10481: Adding support for DNS SRV lookups

Peter Hartmann peter.hartmann at nokia.com
Tue Nov 1 11:27:50 CET 2011


Hello,

On 10/26/2011 03:15 PM, ext Jeremy Lainé wrote:
> Some time ago a bug [1] was filed against Qt pointing out the fact there that Qt4 has no API for doing DNS SRV lookups. Such lookups are important for implementing both XMPP and SIP applications, and as such I wrote an implementation for the QXmpp [2] project which has been in use for over a year. I got some initial feedback from Qt developers both on the merge request on gitorious [3] and on IRC, and I adjusted the code accordingly.
>
> I would like to get some further feedback on the API / implementation in order to hopefully get the code merged into Qt, and have submitted it to gerrit for review [4]. Comments are welcome!

While I like the API and the naming proposed by Shane, I wonder if we 
need some more general API for doing other DNS lookups, like e.g. TXT 
records or the new record types needed for DNSSEC?
Could we maybe have an overload for QHostInfo::lookupHost() instead of a 
new class, or would that be to generic when it comes to parsing the 
response?


Regarding Olivier's comment: I'd rather prefer the low-level API. I 
understand the point of convenience when having that logic in a 
connect() call, however I am not convinced it covers all the use cases:

* Maybe at some point you might want to parse DNS responses "by hand" 
(e.g. for DNSSEC?)
* Some anti-virus software apparently stores versioning information 
directly in DNS responses so the client does not need to contact the 
server all the time
* another (admittedly creative) example of using DNS TXT records is the 
Google certificate checker at ->
http://googleonlinesecurity.blogspot.com/2011/04/improving-ssl-certificate-security.html


Peter


>
> Jeremy
>
> [1] https://bugreports.qt.nokia.com/browse/QTBUG-10481
> [2] http://code.google.com/p/qxmpp/
> [3] http://qt.gitorious.org/qt/qt/merge_requests/887
> [4] http://codereview.qt-project.org/7475
>
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development


-- 
Qt Developer Days 2011 – REGISTER NOW!
October 24 – 26, Munich
November 29 – December 1, San Francisco
Learn more and Register at http://qt.nokia.com/qtdevdays2011



More information about the Development mailing list