Commit Graph

22 Commits

Author SHA1 Message Date
Roy Marples
56e106a774 Fix DUID support.
In the case where we cannot write a DUID file, then create a LL ID
instead of a LLT ID.
2012-10-09 13:14:56 +00:00
Roy Marples
5fff28a154 Replace the mk stubs with a autotools like configure script.
Split compat libc functions out into subdir.
2009-07-14 13:59:30 +00:00
Roy Marples
601fb3d500 Add (c) to Copyright 2009-05-01 13:57:45 +00:00
Roy Marples
e1caa8dbad get_line now uses a single buffer, strips leading space and skips comments. This reduces malloc usage slightly and gives a cleaner API at the expense of a slight bss increase. 2008-11-05 13:57:54 +00:00
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
453072ef8f Rework our error handling code a little to save ~5k on x86_64 2008-03-29 08:40:55 +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
2136d44495 Rename getline to get_line so we don't conflict with crappy GNU headers that wrongly expose getline when _GNU_SOURCE isn't set. Bug #17. 2008-02-06 10:18:03 +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
6d0509623a Store and validate the duid using our generic hwaddr_ calls 2008-01-25 10:18:13 +00:00
Roy Marples
dc9be8a47f Quiet some lint warnings. 2008-01-21 21:19:53 +00:00
Roy Marples
2f736fb7ce Re format for standard tabs. 2008-01-16 16:38:47 +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
d9448b4224 Don't malloc pointer size when we mean data size 2007-10-11 20:30:24 +00:00
Roy Marples
3e120d46a8 Many thanks to Michael Durrant for testing the below changes.
Compile and work on OSX/Darwin.
If we have no fork then we re-exec ourselves with --daemonised.
Improved the build system so we automatically detect if we need
librt or libresolv and if fork() works or not.
Move back to using librt for clock_gettime on Linux systems.
2007-09-04 12:48:40 +00:00
Roy Marples
68590c550d Remove getifaddrs code and instead just use ioctls. 2007-07-25 21:01:10 +00:00
Roy Marples
ff962a3c31 Allow -I to have an optional argument, when missing don't use DUID's 2007-05-11 10:51:32 +00:00
Roy Marples
c3d07f4c70 Add support for RFC 4361 2007-05-10 16:08:49 +00:00