Roy Marples
7fa019426f
Kernel will send the 2nd annoucemnent when we add the address.
2008-05-30 10:27:15 +00:00
Roy Marples
855c5820e7
Parse the ARP packet better.
2008-05-30 09:52:09 +00:00
Roy Marples
3c02568a28
Make the timings more random by using the full range of poll timeout.
2008-05-29 19:26:16 +00:00
Roy Marples
0dc15f70d5
Check size of arp reply vs what we need. Also, no need to copy out the hardware addresses.
2008-05-29 13:21:58 +00:00
Roy Marples
3cf0d215a5
Respect RFC 3927 more, regarding times and conflicts.
2008-05-29 11:58:25 +00:00
Roy Marples
1fd83d79e8
We should inspect our signal fd before processing ARP replies.
2008-05-28 12:02:04 +00:00
Roy Marples
acf37f8de9
Use the write length.
2008-05-27 09:14:33 +00:00
Roy Marples
fa52b46047
Fix pointer.
2008-05-26 20:43:34 +00:00
Roy Marples
f2d3069dec
Pull ARP replies correctly.
2008-05-26 09:58:36 +00:00
Roy Marples
a265106090
Try a new checksum routine.
2008-05-15 20:58:31 +00:00
Roy Marples
fba865f71d
Fix checksum on Sparc64.
2008-05-15 20:45:45 +00:00
Roy Marples
57220ee062
get_packet 0 means no more buffer, so loops don't need to know the bpf/socket buffering.
2008-05-15 13:34:31 +00:00
Roy Marples
9c308ff18f
Move signal.{c,h} to signals.{c.h} so we can work better in the NetBSD source tree.
2008-05-15 12:48:01 +00:00
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