Go to file
Glen Wiley ac0b808671 tweaking u_char checks 2014-06-02 10:50:52 -04:00
doc Fix building docs for blddir != srcdir 2014-05-21 16:21:45 +02:00
getdns.pmdoc fixed install prefix problems for osx 2014-04-02 09:19:56 -04:00
m4 This commit adds the configure script to the repo. 2013-12-03 16:29:44 +01:00
project-doc updated notes 2014-05-23 17:12:52 -04:00
spec [API 0.5] Print result with example-reverse 2014-02-24 15:17:40 +01:00
src tweaking u_char checks 2014-06-02 10:50:52 -04:00
.gitignore Update gitignore 2014-03-07 10:47:59 -05:00
.indent.pro Ran indent with the indent.pro committed 2013-11-05 15:03:44 -05:00
.travis.yml Update travis to run make uninstall as well 2014-03-06 16:10:19 -05:00
AUTHORS fixed license and copyright notices 2014-02-20 09:12:19 -05:00
COPYING another file required by automake. using a symlink to LICENSE 2013-08-08 17:39:45 -08:00
ChangeLog Merge branch 'master' into v0.1.2 2014-05-26 15:58:40 +02:00
CodingStyle added extension validation to the primary entry point to catch bogus 2013-11-04 18:37:54 -05:00
INSTALL Added getdns-specific options 2014-05-10 20:27:35 -07:00
LICENSE Fill in <organization> place holder. 2014-02-25 14:23:19 +01:00
Makefile.in Symfiles are part of the distribution 2014-05-26 15:29:06 +02:00
NEWS separated libunbound test in configure.ac to give better diag msg 2013-11-03 16:40:24 -05:00
README automake version dep noted 2013-08-30 14:19:03 -04:00
README.md minor tweaks to address old versions of libtool 2014-05-23 12:15:53 -04:00
aclocal.m4 minor tweaks to address old versions of libtool 2014-05-23 12:15:53 -04:00
config.guess This commit adds the configure script to the repo. 2013-12-03 16:29:44 +01:00
config.sub This commit adds the configure script to the repo. 2013-12-03 16:29:44 +01:00
configure tweaking u_char checks 2014-06-02 10:50:52 -04:00
configure.ac tweaking u_char checks 2014-06-02 10:50:52 -04:00
install-sh Converted makefile generation to automake 2013-08-08 17:21:05 -08:00
ltmain.sh This commit adds the configure script to the repo. 2013-12-03 16:29:44 +01:00
missing necessary for automake/autoconf 2013-08-08 17:31:42 -08:00
ranlib minor tweaks to address old versions of libtool 2014-05-23 12:15:53 -04:00

README.md

getdns API

getdns is a modern asynchronous DNS API intended to make all types of DNS information easily available as described by Paul Hoffman. This implementation is licensed under the New BSD License (BSD-new).

The getdns-api mailing list is a good place to engage in discussions regarding the design of the API.

If you are just getting started with the library take a look at the section below that describes building and handling external dependencies for the library. Once it is built you should take a look at src/examples to see how the library is used.

This file captures the goals and direction of the project and the current state of the implementation.

The goals of this implementation of the getdns API are:

  • Provide an open source implementation, in C, of the formally described getdns API by Paul Hoffman at http://www.vpnc.org/getdns-api/
  • Initial support for FreeBSD, OSX, Linux (CentOS/RHEL, Ubuntu) via functional "configure" script
  • Initial support to include the Android platform
  • Include examples and tests as part of the build
  • Document code using doxygen
  • Leverage github as much as possible for project coordination
  • Coding style/standards follow the BSD coding style ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/share/misc/style

Non-goals (things we will not be doing at least initially) include:

  • implementation of the traditional DNS related routines (gethostbyname, etc.)

Language Bindings

In parallel, the team is actively developing bindings for various languages. For more information, visit the wiki.

Motivation for providing the API

The developers are of the opinion that DNSSEC offers a unique global infrastructure for establishing and enhancing cryptographic trust relations. With the development of this API we intend to offer application developers a modern and flexible way that enables end-to-end trust in the DNS architecture and will inspire application developers towards innovative security solutions in their applications.

Releases

Release numbering follows the Semantic Versioning approach. The code is currently under active development.

The following requirements were met as conditions for the present release:

  • code compiles cleanly on at least the primary target platforms: OSX, RHEL/CentOS Linux, FreeBSD
  • examples must compile and run clean
  • clearly document supported/unsupported elements of the API

Tickets/Bug Reports

Tickets and bug reports should be reported via the GitHub issues list.

Additionally, we have a mailing list at users@getdns.net.

Building/External Dependencies

External dependencies are linked outside the getdns API build tree (we rely on configure to find them). We would like to keep the dependency tree short.

You have to install the library and also the library-devel (or -dev) for your package management system to install the compile time files. If you checked out our git; the configure script is built with autoreconf --install.

Extensions / Event loop dependencies

The implementation works with a variety of event loops, each built as a separate shared library. See the wiki for more details.

  • libevent. Note: the examples require this and should work with either libevent 1.x or 2.x. 2.x is preferred.
  • libuv
  • libev

##Regression Tests

A suite of regression tests are included with the library, if you make changes or just want to sanity check things on your system take a look at src/test. You will need to install libcheck. Check is also available from many of the package repositories for the more popular operating systems.

DNSSEC

For the library to be DNSSEC capable, it needs to know the root trust anchor. The library will try to load the root trust anchor from /etc/unbound/getdns-root.key by default. This file is expected to have one or more DS or DNSKEY resource records in presentation (i.e. zone file) format. Note that this is different than the format of BIND.keys.

The best way to setup or update the root trust anchor is by using unbound-anchor. To setup the library with the root trust anchor at the default location, execute the following steps as root:

# mkdir -p /etc/unbound
# unbound-anchor -a /etc/unbound/getdns-root.key

#Unsupported Features

The following API calls are documented in getDNS but not supported by the implementation at this time:

  • Support for OPT Records in getdns_general and variants via the extensions parameter.
  • EDNS options
    • getdns_context_set_edns_do_bit
    • getdns_context_set_edns_version
    • getdns_context_set_edns_extended_rcode
  • GETDNS_CONTEXT_TCP_ONLY_KEEP_CONNECTIONS_OPEN with getdns_context_set_dns_transport
  • DNS Search suffixes / local file support
    • getdns_context_set_append_name
    • getdns_context_set_suffix
  • Setting root servers via getdns_context_set_dns_root_servers
  • getdns_context_set_dnssec_trust_anchors
  • Detecting changes to resolv.conf and hosts
  • MDNS and NetBIOS namespaces (only DNS and LOCALFILES are supported)

Some platform specific features are not implemented in the first public release of getdns, however they are on the radar. These include:

  • Respecting settings in /etc/nsswitch.conf (linux and some other OSes), for the first release we simply check local files (/etc/hosts) before checking the DNS.
  • Search suffixes specified in /etc/resolv.conf

#Known Issues

There are a few known issues which we have summarized below - the most recent and helpful list is being maintained in the git issues list in the repository.

  • (#113) Changing the resolution type between stub and recursive after a query has been issued with a context will not work - the previous resolution type will continue to be used. If you want to change the resolution type you will need to create a new context and set the resolution type for that context.

  • older versions of libtool and ranlib may have problems with the way we leverage features specific to exported sybols. If you see messages during linking it may be due to an older version of libtool in your PATH. This can be fixed by updating your libtool or adding the getdns build directory to the beginning of your path so that our libtool/ranlib are picked up.

#Supported Platforms

The primary platforms targeted are Linux and FreeBSD, other platform are supported as we get time. The names listed here are intended to help ensure that we catch platform specific breakage, not to limit the work that folks are doing.

  • Debian 7.0, 7.3
  • FreeBSD 8.4, 9.2, 10.0
  • RHEL/CentOS 6.4, 6.5
  • OSX 10.8, 10.9
  • Ubuntu 12.04, 13.10

For most platforms where we have provided a binary distribution as a compressed tar you can simply untar the file and run "make install". Bear in mind that any dependencies will need to be resolved before you can get the library to do it's work.

In some cases we have provided binaries that use the native packaging for the platform, where possible dependencies are identified using the method specific to the platform.

We intend to add MS-Windows, Android and other platforms to the releases as we have time to port it.

##Platform Specific Build Reports

Build Status

###FreeBSD

If you're using FreeBSD, you may install getdns via the ports tree by running: cd /usr/ports/dns/getdns && make install clean

If you are using FreeBSD 10 getdns can be intalled via 'pkg install getdns'.

###CentOS/RHEL 6.5

We rely on the most excellent package manager fpm to build the linux packages which means that the packaging platform requires ruby 2.1.0. There are other ways to build the packages, this is simplythe one we chose to use.

# cat /etc/redhat-release
CentOS release 6.5 (Final)
# uname -a
Linux host-10-1-1-6 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
# cd getdns-0.1.0
# ./configure --prefix=/home/deploy/build
# make; make install
# cd /home/deploy/build
# mv lib lib64
# . /usr/local/rvm/config/alias
# fpm -x "*.la" -a native -s dir -t rpm -n getdns -v 0.1.0 -d "unbound" -d "ldns" -d "libevent" -d "libidn" --prefix /usr --vendor "Verisign Inc., NLnet Labs" --license "BSD New" --url "http://www.getdnsapi.net" --description "Modern asynchronous API to the DNS" .

###OSX

# sw_vers
ProductName:	Mac OS X
ProductVersion:	10.8.5
BuildVersion:	12F45

Built using PackageMaker, libevent2.

# ./configure --with-libevent --prefix=$HOME/getdnsosx/export
# make
# make install

edit/fix hardcoded paths in lib/*.la to reference /usr/local

update getdns.pmdoc to match release info

build package using PackageMaker

create dmg

Homebrew

If you're using Homebrew, you may run brew install getdns. By default, this will only build the core library without any 3rd party event loop support.

To install the event loop integration libraries that enable support for libevent, libuv, and libev, run: brew install getdns --with-libevent --with-libuv --with-libev. All switches are optional.

Note that in order to compile the examples, the --with-libevent switch is required.

Contributors

  • Craig Despeaux, Verisign, Inc.
  • Neel Goyal, Verisign, Inc.
  • Olaf Kolkman, NLnet Labs
  • Allison Mankin, Verisign, Inc. - Verisign Labs.
  • Melinda Shore, No Mountain Software LLC
  • Willem Toorop, NLnet Labs
  • Wouter Wijngaards, NLnet Labs
  • Glen Wiley, Verisign, Inc.

Acknowledgements

The development team explicitly acknowledges Paul Hoffman for his initiative and efforts to develop a consensus based DNS API. We would like to thank the participants of the mailing list for their contributions.