dhcpcd-discuss

Re: DHCP client test suite

Roy Marples

Mon Feb 09 19:16:05 2009

On Mon, 2009-02-09 at 16:10 +0100, Erik Ekman wrote:
> I am wondering if you have some kind of software for testing the DHCP
> client.

I have parpd which is a Proxy ARP daemon which I use to test the IPv4LL
functionality of dhcpcd. Apple has a bonjour conformance test suite (OSX
only) that's readily available for testing this as well.

Aside from that, it's just eyeballing the results.

>  I am working on a minimal DHCP client implementation for a
> project, and have some compatibility problems. Right now I am focusing
> on improving handling of different timeouts, but it would be nice to
> have a more comprehensive test suite.

I fought with various timeouts and a state loop, which are the heart of
dhcpcd-3 and dhcpcd-4. For dhcpcd-5 we ditched that and went with an
event loop, based on watching fd's and timeouts. This makes it a lot
easier to manage and a lot more accurate and is kinda needed when
dealing with >1 interface.

http://roy.marples.name/projects/dhcpcd/browser/trunk/eloop.c

One thing to note is that you should always use a MONOTONIC clock so
that lease times are accurate even if system time changes drastically.

Thanks

Roy

Attachment: signature.asc
Description: This is a digitally signed message part


References:
DHCP client test suiteErik Ekman
Archive administrator: postmaster@marples.name