isdom/dnsjava
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
dnsjava http://www.xbill.org/dnsjava Author: Brian Wellington (bwelling@xbill.org) Overview: dnsjava is an implementation of DNS in Java. It supports all of the common record types and the DNSSEC types. It can be used for queries, zone transfers, and dynamic updates. It includes a cache which can be used by clients, and a (far from complete) implementation of a server. It supports TSIG authenticated messages (if you don't know, don't worry about it). dnsjava was started as an excuse to learn Java. It was useful for testing new features in BIND without rewriting the C resolver. It was then cleaned up and extended in order to be used as a testing framework for the DNS interoperability testing at the 44th IETF. The high level API was added to make it useful to a wider audience. dnsjava is far from complete. It should support the rest of the record types, even though most are deprecated and/or rarely used. It should handle exceptions in more places, and probably define exceptions of its own. Limitations: There's no way to determine what the local nameserver is at runtime from within the JVM. First, the property 'dns.resolver' is checked. This can either be an IP address or a hostname (which is resolved using Java's built in DNS support). If the underlying OS is unix-based, the dnsjava package can parse /etc/resolv.conf and determine the nameserver. If the property is not defined and the OS is not unix-based, the default nameserver is "localhost". This is very bad. Unfortuantely, I have no idea how to determine the nameserver under Windows, MacOS, etc. Contributions of code are welcome (see DNS/FindResolver.java for the basic structure). One some machines, InetAddress.getLocalHost() returns 127.0.0.1. This is usually caused by a bug in the JVM, and often happens when the machine has a dynamic address and its hostname is not in DNS. If the @me@ variable is present in the textual form of an A record and InetAddress.getLocalHost() doesn't work, dnsjava will print an error and die. I'm investigating ways to improve this behavior without using JNI. Future: - A GUI for the dynamic update program would be nice - javadoc documentation License: dnsjava is placed under the GNU General Public License (GPL). However, usage under additional licenses may be granted by the author.