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.
- 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
- 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 ‘jdns’ module of the Psi Git. See jdns.h for the C API, qjdns.h for a simple Qt wrapper, and qjdnsshared.h for a very high-level wrapper. QJDnsShared is documented (under its original name, JDnsShared).
Last updated May 10th, 2015.