README.html
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>libasyncns 0.8</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body>

libasyncns 0.8

Copyright 2005-2009 Lennart Poettering <mznflapaf (at) 0pointer (dot) de>

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

News

Thu 15 Oct 2009:

Version 0.8 released; changes include: various smaller fixes.

Tue 28 Oct 2008:

Version 0.7 released; changes include: rework thread shutdown logic.

Fri 24 Oct 2008:

Version 0.6 released; changes include: save and restore <tt>h_errno</tt> in addition to <tt>errno</tt>; drop usage of pthread's cancelling since it is problematic on some platforms.

Sun 17 Aug 2008:

Version 0.5 released; changes include: fix getaddrinfo() serialization.

Sun 27 Jul 2008:

Version 0.4 released; changes include: rework error handling logic, add <tt>asyncns_freeanswer()</tt>, a lot of fixes

Wed 23 May 2007:

Version 0.3 released; changes include: build fixes: properly detect <tt>res_query()</tt> on Linux/AMD64, support older autoconf versions

Fri 16 Feb 2007:

Version 0.2 released; changes include: <tt>res_query()</tt> support; minor bug fixes; doc updates

Sat 8 Jan 2005:

Version 0.1 released

Overview

<tt>libasyncns</tt> is a C library for Linux/Unix for executing name service queries asynchronously. It is an asynchronous wrapper around <tt>getaddrinfo(3)</tt>, <tt>getnameinfo(3)</tt>, <tt>res_query(3)</tt> and <tt>res_search(3)</tt> from <tt>libc</tt> and <tt>libresolv</tt>.

In contrast to GNU's asynchronous name resolving API <tt>getaddrinfo_a()</tt>, <tt>libasyncns</tt> does not make use of UNIX signals for reporting completion of name queries. Instead, the API exports a standard UNIX file descriptor which may be integerated cleanly into custom main loops.

In contrast to asynchronous DNS resolving libraries like <tt>libdenise</tt>, <tt>skadns</tt>, <tt>adns</tt>, <tt>libasyncns</tt> is just an asynchronous wrapper around the libc's synchronous <tt>getaddrinfo()</tt> API, which has the advantage of allowing name resolution using techniques like Multicast DNS, LDAP or NIS using standard <tt>libc</tt> NSS (Name Service Switch) modules. <tt>libasyncns</tt> is compatible with IPv6 if the underlying <tt>libc</tt> is.

<tt>libasyncns</tt> is very tiny, consisting of just one header and one source file. It has no dependencies besides <tt>libc</tt>.

By default <tt>libasyncns</tt> spawns a number of worker threads (LWPs) to process name queries. Alternatively or when POSIX Threads are not supported, <tt>libasyncns</tt> can <tt>fork()</tt> off worker processes instead.

Current Status

Version 0.8 is quite stable and feature complete.

Damien Thébault has written a Python module libasyncns-python that wraps the libasyncns C API.

Documentation

You may browse the Doxygen generated programing documentation the API. (Run <tt>make doxygen</tt> to generate this documentation from the source tree)

Requirements

Currently, <tt>libasyncns</tt> is tested on Linux and Solaris (<tt>sparc-sun-solaris2.8</tt>) only.

<tt>libasyncns</tt> was developed and tested on Debian GNU/Linux "testing" from January 2005, it should work on most other Linux distributions (and maybe Unix versions) since it uses GNU autoconf and GNU libtool for source code configuration and shared library management.

<tt>libasyncns</tt> has no dependencies besides a <tt>libc</tt> that supports <tt>getaddrinfo()</tt> and <tt>res_query()</tt>.

Installation

As this package is made with the GNU autotools you should run <tt>./configure</tt> inside the distribution directory for configuring the source tree. After that you should run <tt>make</tt> for compilation and <tt>make install</tt> (as root) for installation of <tt>libasyncns</tt>.

Acknowledgements

Sjoerd Simons for the <tt>res_query()</tt> support.

Download

The newest release is always available from http://0pointer.de/lennart/projects/libasyncns/

The current release is 0.8

Get <tt>libasyncns</tt>'s development sources from the GIT repository (gitweb):

git clone git://git.0pointer.de/libasyncns

You may find an up to date Debian package of <tt>libasyncns</tt> on the Debian package repository.

If you want to be notified whenever I release a new version of this software use the subscription feature of Freshmeat.


<address class="grey">Lennart Poettering <mznflapaf (at) 0pointer (dot) de>, October 2009</address> </body> </html>