ADHCP is an implementation of the DHCP protocol in Ada. Currently the project provides client and relay services for DHCPv4.

The ADHCP DHCPv4 client (adhcp_client) is D-Bus aware and can be used on most modern Linux distributions as replacement for other clients such as ISC’s dhclient or busybox’s udhcpc.

The client uses Anet for networking, Alog as logging framework and communicates with NetworkManager using D_Bus/Ada.

Licence

Copyright (C) 2011, 2012 secunet Security Networks AG
Copyright (C) 2011, 2012 Reto Buerki <reet@codelabs.ch>
Copyright (C) 2011, 2012 Adrian-Ken Rueegsegger <ken@codelabs.ch>

Free use of this software is granted under the terms of the GNU General Public
License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

Download

Release version

The current release version of ADHCP is available at http://www.codelabs.ch/download/.

Verify a Release

To verify the integrity and authenticity of the distribution tarball, import the key http://www.codelabs.ch/keys/0xBB793815pub.asc and type the following command:

$ gpg --verify adhcp-{version}.tar.bz2.sig

The key fingerprint of the public key (0xBB793815) is:

Key fingerprint = A2FB FF56 83FB 67D8 017B  C50C F8C5 F8B5 BB79 3815

Development version

The current development version of ADHCP is available through its git repository:

$ git clone http://git.codelabs.ch/git/adhcp.git

A browsable version of the repository is also available here: http://git.codelabs.ch/?p=adhcp.git

Build

To compile ADHCP on your system, you need to have the following software installed:

If you want to run the unit tests before installation of ADHCP (which is recommended) you furthermore need to have the following installed:

Testing

Before you install ADHCP services on your system, you might want to test if everything works as expected. ADHCP contains a unit test suite which can be run by entering the following command:

$ make tests

All tests should be marked with PASS behind the test name.

Installation

To install ADHCP on your system, type the following:

$ make DESTDIR=/ install

If DESTDIR is not specified, /usr/local is used.

Using adhcp_client on a Linux Desktop

This section describes the steps needed to use adhcp_client as DHCPv4 client on a Linux Desktop with NetworkManager. Since NetworkManager does not (yet) support ADHCP directly, an additional symlink and the adhcp_client_wrapper binary are needed.

The following procedure has been tested on Debian squeeze and testing:

# cd /sbin
# dpkg-divert --add --rename --divert /sbin/dhclient.real /sbin/dhclient
# ln -s /usr/local/sbin/adhcp_client_wrapper dhclient

If you choose another installation DESTDIR which is not in PATH add the following symlinks in /sbin:

# ln -s $DESTDIR/sbin/adhcp_client adhcp_client
# ln -s $DESTDIR/sbin/adhcp_notify adhcp_notify

Then re-activate a NetworkManager connection which uses DHCP. If it does not work check syslog for error messages.

RFC conformity

The ADHCP implementation is designed to be simple and supports only essential features while still conforming to the related DHCP RFCs. The RFC compliance of ADHCP is documented here.

Manual Pages

For more information about a specific ADHCP service or binary consult the manual pages: