tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

DHCP client with minimal functionality and size



Hi List

Whilst perusing the NetBSD site, I came across a SoC project about
writing a minimal DHCP userland client.

Well, I have written such a client - dhcpcd [1].
It's more DHCP feature rich out of the box than dhclient and has full
support for NetBSD, FreeBSD, Darwin and Linux. It also supports non MMU
devices (ie, no fork) so is suitable for embedded devices. Infact, it is
used by at least two embedded device makers I know of.

As of version 3.1.8 it became 2-clause BSD licensed, and 3.1.9 finally
supporting NetBSD fully so it can be imported into the base system.

That's the sell, but it also doesn't match all the SoC requirements.
1) It does not interact with the kernel DHCP part in any way.
2) It does not interact with WLAN keys in any way or form (and shouldn't
either imo)
3) It's marginally bigger than 10k on i386.

When compiled with all the feaures in, with -O2 on FreeBSD/i386 it
weighs in at 57k. With all the features compiled out and using -Os it
comes in at 36k. It can go even smaller, but then you start to lose some
DHCP functionality. I can't give you sizes for NetBSD as my machine is
amd64 and the disk died this morning :/ But I assume sizes will be
similar.

Anyway, that's it. If someone wants to take this futher feel free. I'm
not sure if my subscription to this list worked, so if anyone wants to
get back it maybe a good idea to at least CC me directly.

Thanks

Roy

[1] http://roy.marples.name/dhcpcd




Home | Main Index | Thread Index | Old Index