summaryrefslogtreecommitdiffstats
path: root/net.h
Commit message (Collapse)AuthorAge
* Add (c) to CopyrightRoy Marples2009-05-01
|
* discover_interfaces now uses getifaddrs instead of OS specific implementation.Roy Marples2009-04-17
| | | | | | | do_interface then becomes do_address and also uses getifaddrs. Binary size is a little smaller, code size is now a lot smaller.
* We can now detected primary addresses added or changed in BSD.Roy Marples2009-03-19
| | | | | | | | As such, we can wait for a 3RDPARTY to configure the interface, such as PPP. We can then take the destination addess and automatically give it a default route or any other DHCP option such as DNS servers. This addresses #159.
* We shouldn't need to flush arp entires ourself on BSD platforms.Roy Marples2009-03-11
|
* We need to blacklist IP addresses at the packet levelRoy Marples2009-03-10
| | | | so we can ignore NAKs from rogue servers who don't supply a ServerID, or supply a fake one.
* Validate UDP better by ensuring data len is not bigger than our structRoy Marples2009-02-28
| | | | | | and that the claimed length by the header is not greater than our length. Thanks to Michael Olney.
* Fix up some more formatting.Roy Marples2009-02-12
|
* Add route removal detection to Linux.Roy Marples2009-01-27
| | | | | | This involved a rejig of the socket code so we can detect if we removed the route or not.
* You can now add a configure block per ssid if the interface is wireless.Roy Marples2009-01-01
|
* Move wireless detection from net.c into if-bsd.c and if-linux.cRoy Marples2008-09-17
|
* Fix compile.Roy Marples2008-09-16
|
* Move AF_LINK discovery to if-bsd.c. Also, we only work with IFT_ETHER types ↵Roy Marples2008-09-16
| | | | currently, so skip others.
* We need to flush the ARP table after configuring new routes.Roy Marples2008-09-15
|
* Remove remembering routes per interface and have a global routing table so ↵Roy Marples2008-09-12
| | | | we can change routes depending on interface state. This is very useful for the BSD's where there is no route metric.
* On Linux, fix replacing the kernel added subnet route correctly for metrics.Roy Marples2008-09-08
|
* Enable detection of addition and removal of interfaces on Linux.Roy Marples2008-09-04
|
* When OS reports new and removed interfaces, dhcpcd sees this and either ↵Roy Marples2008-09-04
| | | | starts or stops watching them. BSD only, Linux to follow.
* Use static buffers for ARP and move the send code to arp.c. Also, move the ↵Roy Marples2008-09-04
| | | | hwaddr buffer to the top of the file for clarity.
* Add an event loop.Roy Marples2008-09-02
| | | | | | | | 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.
* Remove #ifdefs to disable specific bits of code. We now build everything - ↵Roy Marples2008-07-23
| | | | we're small enough :)
* Add support for link carrier detection. For Linux this involved a big change ↵Roy Marples2008-07-16
| | | | to the netlink code to add callbacks, for BSD just an extra function. We also have an option not to wait for a DHCP lease and fork right away - useful for startup scripts.
* fd -> raw_fdRoy Marples2008-07-16
|
* Add a macro to change a route.Roy Marples2008-07-09
|
* Add more error checking if the link was taken down or ip addresses removed - ↵Roy Marples2008-07-09
| | | | if this happens we reset to the init state.
* Remove ENABLE_DUID and introduce MINIMAL, which removes all non essential ↵Roy Marples2008-07-04
| | | | userland options, knocking around 6k off the binary size.
* Save a few bytes by treating some strings like DHCP options, having the ↵Roy Marples2008-06-29
| | | | first byte as the length.
* Re-write the client state engine around a simple timer instead of complex ↵Roy Marples2008-06-08
| | | | loops. Use the re-transmission times as per RFC 2131. Integrate the ARP handling code in the new engine so we are able to defend our IPV4LL address whilst negotiating a DHCP lease. This also means we're able to bind the address and fork BEFORE waiting to send announcements which makes us appear faster on the commandline.
* Make the timings more random by using the full range of poll timeout.Roy Marples2008-05-29
|
* Respect RFC 3927 more, regarding times and conflicts.Roy Marples2008-05-29
|
* Use constant BPF structures and defines to alter the data instead of ↵Roy Marples2008-05-22
| | | | functions. Smaller code :)
* Fix some valgrind errors, and work on Linux again.Roy Marples2008-05-15
|
* Improve get_packet API and memcpy to structure instead of using union pointers.Roy Marples2008-05-15
|
* We should send packets to a specific IP over the udp socket so we don't ↵Roy Marples2008-04-20
| | | | broadcast on layer 2 and unicast on layer 3, #64.
* Remove the .info file and now set environment vars in the same vein as ↵Roy Marples2008-04-16
| | | | dhclient. This allows similar scripts to be used.
* Move MTU configuration to dhcpcd.sh. However, if the MTU is too small for ↵Roy Marples2008-04-14
| | | | dhcpcd, dhcpcd will increase it to the minimum.
* Normally I hate massive code drops, but heh.Roy Marples2008-04-11
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.