tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: DHCP client with minimal functionality and size
On Wed, Jan 16, 2008 at 10:27:39AM +0000, Roy Marples wrote:
> 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.
It sounds like Roy's client is perfectly fine for most uses, and we
should import it. Even if some users must use ifwatchd+dhcpcd to get
the full complement of features that they desire, on i386 that's
~57k (dhcpcd) + ~10k (ifwatchd) = ~67k total
Compare with ~308k for dhclient alone.
Compatibility with dhclient-script would be nice.
Roy, I have a few questions.
1) Have you tested running more than one dhcpcd on the same system,
each instance on a different interface?
2) Does the IPV4LL support do "claim & defend" per the RFC, or does it
rely on the kernel to do the defense? Does it DTRT if IPV4LL numbers
collide?
3) Are you eligible for Summer of Code? NetBSD still needs a compact
DHCP server. If you are eligible, that would be a great GSoC project
for you to propose.
Dave
--
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933 ext 24
Home |
Main Index |
Thread Index |
Old Index