Commit Graph

12 Commits

Author SHA1 Message Date
Roy Marples
fe965fea17 Fix bpf for the correct position on new buffers. 2008-05-15 12:32:27 +00:00
Roy Marples
2eebbca565 Loop correctly for more packets. 2008-05-15 12:15:49 +00:00
Roy Marples
3581b92aa4 Fix some valgrind errors, and work on Linux again. 2008-05-15 11:12:44 +00:00
Roy Marples
b1009e62b2 Improve get_packet API and memcpy to structure instead of using union pointers. 2008-05-15 10:10:39 +00:00
Roy Marples
f409012f02 Repair whitespace damage. 2008-04-26 07:39:23 +00:00
Roy Marples
35ff0dbb35 We should send packets to a specific IP over the udp socket so we don't broadcast on layer 2 and unicast on layer 3, #64. 2008-04-20 19:02:19 +00:00
Roy Marples
cbfa778bd6 Specify char 2008-04-17 10:08:48 +00:00
Roy Marples
f2cfcde87e Our ctype calls should always use unsigned. 2008-04-17 09:57:19 +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
207e004634 Move MTU configuration to dhcpcd.sh. However, if the MTU is too small for dhcpcd, dhcpcd will increase it to the minimum. 2008-04-14 13:47:20 +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