diff options
| author | Roy Marples <roy@marples.name> | 2008-04-11 16:14:55 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-04-11 16:14:55 +0000 |
| commit | 1a60d14fa2f91876b9ec14d6e6c88d97dacf6c4c (patch) | |
| tree | 9e992f64d969ddef2e7d3836afa0d4065f69706a /config.h | |
| parent | 211da073490c5decd1deb46034385437a54ca977 (diff) | |
| download | dhcpcd-1a60d14fa2f91876b9ec14d6e6c88d97dacf6c4c.tar.xz | |
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.
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -35,8 +35,6 @@ #define ENABLE_NTP #define ENABLE_NIS #define ENABLE_INFO -/* Define this to enable some compatability with 1.x and 2.x info files */ -/* #define ENABLE_INFO_COMPAT */ /* IPV4LL, aka ZeroConf, aka APIPA, aka RFC 3927. * Needs ARP. */ @@ -51,9 +49,7 @@ /* resolvconf is framework for multiple interfaces to manage resolv.conf */ #define ENABLE_RESOLVCONF -/* Some systems do not have a working fork. - * The Makefile will attempt to work it out, but if it fails to feel free to - * define it here. */ +/* Some systems do not have a working fork. */ /* #define THERE_IS_NO_FORK */ /* Packname name and pathname definitions. */ @@ -79,6 +75,7 @@ #ifndef INFODIR # define INFODIR "/var/db" #endif +#define LEASEFILE INFODIR "/" PACKAGE "-%s.lease" #define INFOFILE INFODIR "/" PACKAGE "-%s.info" #define DUIDFILE INFODIR "/" PACKAGE ".duid" |
