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 /configure.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 'configure.h')
| -rw-r--r-- | configure.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.h b/configure.h index dc282a88..ec563107 100644 --- a/configure.h +++ b/configure.h @@ -29,10 +29,13 @@ #define DHCPCONFIG_H #include "dhcpcd.h" -#include "if.h" #include "dhcp.h" +#include "net.h" -int configure(const struct options *, struct interface *, - const struct dhcp *, bool up); +int exec_cmd(const char *, const char *, ...); +int write_info(const struct interface *, const struct dhcp_message *, + const struct dhcp_lease *, const struct options *, int); +int configure(struct interface *, const struct dhcp_message *, + const struct dhcp_lease *, const struct options *, int); #endif |
