Commit Graph

11 Commits

Author SHA1 Message Date
Roy Marples
fd05b7dcfc Add an event loop.
Split client.c into smaller files and functions and
recode around the event loop.
Add multiple interface support using the new event loop.
Document changes and outstanding bugs.
2008-09-02 13:28:11 +00:00
Roy Marples
1a60d14fa2 Normally I hate massive code drops, but heh.
The code has been drastically re-arranged.
Instead of populating a custom structure while parsing dhcp messages, we now pluck what we need right out of the message itself. We have custom functions and a lookup table to make this really easy.
This makes us more like dhclient and udhcpc, and will enable us to easily add (and remove!) more dhcp options without having to actually change the code (much).
We now store the real dhcp message we got in /var/db/dhcpcd-$iface.lease, the mtime of the file being used as when we got the lease. This file is read in when re-using an old lease instead of parsing the .info file.
The benefit of all of this means that we're actually ~15k smaller when compiled with the same features.
This has been tested for quite some time, and I'm pretty sure most bugs with the 3.2 branch have been fixed whilst making this. Right now, we are 99% command line compatible with the 3.2 branch.
2008-04-11 16:14:55 +00:00
Roy Marples
a9819bfb1f Split interface and socket out into OS bpf, if-bsd and if-linux. 2008-03-24 01:29:33 +00:00
Roy Marples
8d21242476 Change code style to match the BSDs in the hope the might adpot it instead of dhclient. 2008-03-20 16:47:51 +00:00
Roy Marples
61a22947ab Move clientid generation to client.c and put it on the interface object inplace of duid. Always save the ClientID as a hex string. This reduces our binary size. 2008-01-31 11:19:17 +00:00
Roy Marples
782830eb5d Belatedly into 2008 :) 2008-01-08 09:51:23 +00:00
Roy Marples
b6057d10d2 Re-license as 2-clause BSD as I've re-written everything from the old dhcpcd-2 code base now. 2007-11-15 11:35:53 +00:00
Roy Marples
1f8f3dbdc1 Reword the headers to just say we use the GPLv2. 2007-11-07 16:26:41 +00:00
Roy Marples
cfe160119d Update my e-mail address as I have retired from Gentoo. 2007-11-06 15:03:38 +00:00
Roy Marples
68590c550d Remove getifaddrs code and instead just use ioctls. 2007-07-25 21:01:10 +00:00
Roy Marples
c3d07f4c70 Add support for RFC 4361 2007-05-10 16:08:49 +00:00