JDNS
What is it?
JDNS is a simple DNS implementation that can perform normal DNS queries of any record type (notably SRV), as well as Multicast DNS queries and advertising. Multicast support is based on Jeremie Miller’s “mdnsd” implementation.
For maximum flexibility, JDNS is written in C with no direct dependencies, and is licensed under the MIT license. Your application must supply functionality to JDNS, such as UDP sending/receiving, via callbacks.
There are wrappers available for Qt users, and there is a Qt-based command-line tool called ‘jdns’ that can be used to test functionality.
Features
- DNS client “stub” resolver
- Can fetch any record type, but provides handy decoding for many known types: A, AAAA, SRV, MX, TXT, etc.
- Performs retries, caching/expiration, and CNAME following
- Algorithm logic adapted from Q3Dns
- Multicast queries
- Multicast advertising
Why?
- Trolltech is phasing out the Qt DNS implementation, which in Qt 4 has been relegated to the Qt3Support module. A replacement was desired.
- While there are many DNS libraries available, at the time of this writing it was (and still may be) hard to find one that satisfies three essential conditions: cross-platform friendliness (and this includes Windows 9x!), the ability to integrate into existing eventloops, sensible licensing (ie, not GPL).
What do I need to be able to use it?
As mentioned, JDNS has no dependencies, although it does leave you with some responsibilities. You must provide your own UDP support (via the callbacks), and you probably want to integrate JDNS into your application’s existing event system. The Qt wrappers depend on Qt, of course.
What is the development plan?
JDNS is considered complete.
Where can I get it?
The latest source can be found in the ‘iris/irisnet/jdns’ module of the Psi CVS. The code can also be browsed on the web. See jdns.h for the C API, and qjdns.h for a simple Qt wrapper.
There is also a very high-level wrapper called JDnsShared, that is part of the IrisNet base system but can be used stand-alone. It can be found in the ‘iris/irisnet’ module. JDnsShared is also documented.
Last updated March 18th, 2007.


