Roy Marples
1cc00d8a7c
Allow IPv4LL address range to be configured by DHCP.
...
We now check the message for a DHCP cookie instead of the address
assigned to test for local link.
2010-02-17 22:23:17 +00:00
Roy Marples
e90c590913
Only warn about CSR when binding.
2009-12-23 07:18:22 +00:00
Roy Marples
ae92a9b5bb
Don't always request classless_static_routes, instead add it to dhcpcd.conf
...
as a default option. Add a debug message when adding classless_static_routes.
This is because some DHCP servers have this option badly setup and it could
not be otherwise disabled.
2009-10-17 15:31:39 +00:00
Roy Marples
4389097b21
Add -fno-common to debugging CFLAGS.
...
Declare udp_dhcp_len as extern.
Include common.h in dhcp.h to get _packed definition.
Thanks to David Wu for pointing this out.
2009-09-24 21:29:18 +00:00
Roy Marples
9578248878
Change get_option_addr to accept struct in_addr * instead of uint32_t *
...
to fix an alignment issue on SGI MIPS.
2009-07-08 17:01:38 +00:00
Roy Marples
601fb3d500
Add (c) to Copyright
2009-05-01 13:57:45 +00:00
Roy Marples
4a4bcf7cf5
Improve PTP INFORM support some more.
2009-03-23 22:02:37 +00:00
Roy Marples
263e8fdd42
Move dhcpf.h into dhcp.h were it belongs
2009-03-19 22:45:57 +00:00
Roy Marples
40dbcc8785
More style updates.
2009-02-12 01:09:37 +00:00
Roy Marples
9c30ffcfd6
Re work the route management so we deal with a changed route table in a renewal/rebind correctly.
2008-12-16 13:28:42 +00:00
Roy Marples
991e950618
Adjust lengths to fit MTU.
2008-11-19 14:53:56 +00:00
Roy Marples
99d755f98f
Pack the dhcp structure.
2008-09-05 11:54:44 +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
cc45fbd76e
The require directive now requires that the required options are present in each DHCP message. A few variables and functions have also been renamed to make this part more readable.
2008-08-18 12:43:05 +00:00
Roy Marples
7b1ae6d97b
classid -> vendorclassid to match the RFC description.
2008-08-13 21:29:30 +00:00
Roy Marples
8724d5a72d
leased from should be time_t. Also, add boundtime for the last commit to work.
2008-08-12 16:52:56 +00:00
Roy Marples
37e7de1899
DHCP_option -> DHO_option.
2008-08-08 17:55:48 +00:00
Roy Marples
e59e7d4251
Fix enum name
2008-08-06 17:31:04 +00:00
Roy Marples
757520c586
Add support for vendor encapsulated options. Also, MINIAL define now disables all configurable options.
2008-06-30 16:02:56 +00:00
Roy Marples
fa1d328922
Add 05-mtu hook so we respect the desired MTU on networks.
2008-06-13 09:55:18 +00:00
Roy Marples
fb5f6b9e5b
Remove pointless header.
2008-05-29 15:08:39 +00:00
Roy Marples
1a659b5c51
Don't prefix functions with _
2008-05-20 12:47:16 +00:00
Roy Marples
35ba5bc0c4
When we explictly don't want an option, don't put it in the env.
2008-05-15 08:48:17 +00:00
Roy Marples
2151620deb
We should make our own env instead of using setenv/unsetenv so we work better with vfork systems.
2008-05-13 11:21:19 +00:00
Roy Marples
c605c8f0ea
Fix rfc3397 and rfc3442 decoding for dhcpcd.sh.
2008-04-19 11:00:54 +00:00
Roy Marples
ba9dfb7aae
dhcpcd can now read a basic config file! Add a default dhcpcd.conf and matching man page. Add dhcpcd.sh man page. dhcpcd can now report variables it can send to dhcpcd.sh as well.
2008-04-18 23:12:44 +00:00
Roy Marples
dcab79de5e
Remove the .info file and now set environment vars in the same vein as dhclient. This allows similar scripts to be used.
2008-04-16 09:51:20 +00:00
Roy Marples
46bd6451b0
Replace the clean_metas functions with a write_string function. The main difference is that we escape non ascii or printable chars and avoid mallocing.
2008-04-14 15:08:46 +00:00
Roy Marples
754a344c75
Add loads more DHCP options from RFC2132 to the info file, also closes #53 .
2008-04-14 10:02:44 +00:00
Roy Marples
a840945c73
Add more dhcp types, #53
2008-04-14 06:57:18 +00:00
Roy Marples
be100443a3
Add -o opt1,opt2 and -O to disable requesting optional options. Rejig our defaults around this.
2008-04-14 03:45:54 +00:00
Roy Marples
5a98646f72
Move configuration file setup to dhcpcd.sh so that it's possible for the user to change more easily. We now have enter/exit hooks similar to dhclient to make things even easier for the user. At this time, we are still 100% commandline compatible. However, we have lost the feature to lookup hostnames.
2008-04-12 23:00:23 +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
c39cf2100b
Add alternative building method to save around 500 bytes.
2008-03-24 20:09:30 +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
7fc53ef794
Use tailq from queue.h instead of rolling our down linked lists.
2008-02-20 17:04:56 +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
dc9be8a47f
Quiet some lint warnings.
2008-01-21 21:19:53 +00:00
Roy Marples
8dffa4bc13
We should use ssize_t here.
2008-01-21 15:12:31 +00:00
Roy Marples
4a0a186b5e
More formatting fixes.
2008-01-16 17:34:36 +00:00
Roy Marples
398ac8be8a
uptime should return time_t
2008-01-16 13:16:11 +00:00
Roy Marples
0642e6be9e
Add -S to optionally request a Microsoft CSR. -SS only request a Microsoft CSR and not a normal.
2008-01-15 14:34:28 +00:00
Roy Marples
3cea28afc8
Default all int entries in the dhcp header to unsigned.
2008-01-09 10:12:59 +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
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
fc3617fbf1
Support RFC 3361 SIP Servers.
2007-07-18 14:22:02 +00:00