Warning, /games/ksirk/ksirk/iris/src/jdns/README is written in an unsupported language. File is not indexed.

0001 JDNS
0002 ----
0003 Date: October 1st, 2005
0004 Author: Justin Karneges <justin@affinix.com>
0005 
0006 JDNS is a simple DNS implementation that can perform normal DNS queries
0007 of any record type (notably SRV), as well as Multicast DNS queries and
0008 advertising.  Multicast support is based on Jeremie Miller's "mdnsd"
0009 implementation.
0010 
0011 For maximum flexibility, JDNS is written in C with no direct dependencies,
0012 and is licensed under the MIT license.  Your application must supply
0013 functionality to JDNS, such as UDP sending/receiving, via callbacks.
0014 
0015 For Qt users there is a wrapper available called QJDns.  jdns.pri can
0016 be used to include everything into a qmake project.  jdns.pro will build
0017 the sample Qt-based commandline tool 'jdns'.
0018 
0019 Features:
0020   - DNS client "stub" resolver
0021   - Can fetch any record type, but provides handy decoding for many
0022     known types: A, AAAA, SRV, MX, TXT, etc.
0023   - Performs retries, caching/expiration, and CNAME following
0024   - Algorithm logic adapted from Q3Dns
0025   - Multicast queries
0026   - Multicast advertising
0027 
0028 Why?
0029   - Trolltech is phasing out the Qt DNS implementation, which in Qt 4 has
0030     been relegated to the Qt3Support module.  A replacement was desired.
0031 
0032   - While there are many DNS libraries available, at the time of this
0033     writing it was (and still may be) hard to find one that satisfies
0034     three essential conditions: cross-platform friendliness (and this
0035     includes Windows 9x!), the ability to integrate into existing
0036     eventloops, sensible licensing (ie, not GPL).
0037 
0038 How to use:
0039   - Prepare callbacks and call jdns_session_new()
0040   - Call jdns_init_unicast() or jdns_init_multicast(), depending on
0041     if you want regular or multicast DNS.  If you want both kinds, you
0042     can always make two sessions.
0043   - Make queries and have fun
0044   - Call jdns_step() at the right times to advance JDNS processing
0045 
0046 What is left to you:
0047   - The callback functions, obviously.
0048   - Querying for several "qualified" names.  Here is what Q3Dns does:
0049       Query for name as provided
0050       Query for name + '.domain' (for every domain the computer is in)
0051   - Detecting for '.local' in a name to be queried, and using that
0052     to decide whether to query via Multicast or normal DNS.
0053   - Recognition of IP addresses.  If you want an IP address to resolve
0054     to itself, then do that yourself.  Passing an IP address as a DNS
0055     name to JDNS won't work (especially since it wouldn't make any
0056     sense in some contexts, like SRV).
0057   - Recognition of known hosts.  If you want this, compare inputs against
0058     jdns_system_dnsparams().
0059   - For zeroconf/Bonjour, keep in mind that JDNS only provides Multicast
0060     DNS capability.  DNS-SD and any higher layers would be your job.
0061 
0062 Using a custom DNS implementation has the drawback that it is difficult
0063 to take advantage of platform-specific features (for example, an OS-wide
0064 DNS cache or LDAP integration).
0065 
0066 An application strategy for normal DNS should probably be:
0067   - If an A or AAAA record is desired, use a native lookup.
0068   - Else, if the platform has advanced DNS features already (ie,
0069     res_query), use those.
0070   - Else, use JDNS.
0071 
0072 However, it may not be a bad idea at first to use JDNS for all occasions,
0073 so that it can be debugged.
0074 
0075 For Multicast DNS, awareness of the platform is doubly important.  There
0076 should only be one Multicast DNS "Responder" per computer, and using JDNS
0077 at the same time could result in a conflict.
0078 
0079 An application strategy for Multicast DNS should be:
0080   - If the platform has a Multicast DNS daemon installed already, use
0081     it somehow.
0082   - Else, use JDNS.
0083 
0084 Have fun!
0085