summaryrefslogtreecommitdiffstats
path: root/common.c
Commit message (Collapse)AuthorAge
* Add (c) to CopyrightRoy Marples2009-05-01
|
* More style updates.Roy Marples2009-02-12
|
* Enforce NetBSD KNF style moreRoy Marples2009-02-11
|
* Clean up compiler warnings from overly pedantic checking.Roy Marples2009-01-29
|
* whitespaceRoy Marples2009-01-12
|
* Typo.Roy Marples2008-12-16
|
* Style.Roy Marples2008-12-16
|
* Fix warning of monotonic clock existence.Roy Marples2008-11-27
|
* Fix some LINT errors.Roy Marples2008-11-10
|
* get_line now uses a single buffer, strips leading space and skips comments. ↵Roy Marples2008-11-05
| | | | This reduces malloc usage slightly and gives a cleaner API at the expense of a slight bss increase.
* Save a few bytes by moving close_fds to bind where it's really used.Roy Marples2008-11-05
|
* Remove logger and exclusively uses syslog instead. This saves almost 2K on ↵Roy Marples2008-09-05
| | | | NetBSD/amd64 from before changing strerror to %m.
* As our logger calls emulate syslog, we can use %m. However, this means we ↵Roy Marples2008-09-05
| | | | have to convert it for printf as POSIX does not require that printf supports it. This also means we drop -pedantic from our GCC flags.
* 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.
* pidfiles normally have a new lineRoy Marples2008-08-18
|
* Fix compile on Darwin.Roy Marples2008-08-02
|
* Add support for mach_absolute_time if on Darwin as that platform does not ↵Roy Marples2008-08-01
| | | | have clock_gettime. I cannot test this myself, so it may have bugs or not compile.
* Brute force detection of monotonic clock as sysconf is unreliable. Instead ↵Roy Marples2008-08-01
| | | | rely on clock_gettime failing gracefully with an invalid clockid (which it should do).
* Tweak README about monotonic, and improve warning message.Roy Marples2008-08-01
|
* clock_monotonic now is 0 or 1 depending on if the clock is monotonic. Also, ↵Roy Marples2008-07-31
| | | | systems that have headers for monotonic but do not claim support now warn about this. You can build dhcpcd to force a monotonic clock.
* Normalise tv_usecs. Also, send the fd ready back to the main loop so we ↵Roy Marples2008-07-24
| | | | don't have to re-poll each fd. Saves bytes and is more efficient.
* get_time -> clock_monotonic to be more descriptive.Roy Marples2008-07-24
|
* whitespaceRoy Marples2008-06-19
|
* Remove the signal array stack as our pipe handling should be secure enough ↵Roy Marples2008-06-10
| | | | now. Also, move the normalize close_on_exec and setting non block.
* Add a function to test if a fd has data to be read.Roy Marples2008-06-07
|
* realloc -> xreallocRoy Marples2008-05-19
|
* Fix a potential segfault.Roy Marples2008-05-19
|
* Style.Roy Marples2008-05-19
|
* Create a real arc4linux function so we don't have to visible seed random in ↵Roy Marples2008-05-19
| | | | dhcpcd main.
* Use arc4random as everything apart from glibc seems to have it.Roy Marples2008-05-15
|
* Fix compile on Linux.Roy Marples2008-05-15
|
* Use paths.h when available and ensure that we can disable our glue easily.Roy Marples2008-05-15
|
* Check correct lengths and use closefrom where available.Roy Marples2008-05-15
|
* 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.
* Change code style to match the BSDs in the hope the might adpot it instead ↵Roy Marples2008-03-20
| | | | of dhclient.
* Remove hardcoded defines for linux and add a nasty hackaround for glibc.Roy Marples2008-02-19
|
* We should only have one bit of code to mark sockets close_on_exec.Roy Marples2008-02-09
|
* Rename getline to get_line so we don't conflict with crappy GNU headers that ↵Roy Marples2008-02-06
| | | | wrongly expose getline when _GNU_SOURCE isn't set. Bug #17.
* Introduce xzalloc, which zeros memory as well as allocates it. This makes us ↵Roy Marples2008-01-28
| | | | smaller.
* Quiet some lint warnings.Roy Marples2008-01-21
|
* Re format for standard tabs.Roy Marples2008-01-16
|
* uptime should return time_tRoy Marples2008-01-16
|
* common.h now defines a simple define to create the function in common.c. ↵Roy Marples2008-01-09
| | | | NetBSD needs srandomdev also.
* Belatedly into 2008 :)Roy Marples2008-01-08
|
* Avoid valgrind errors with getline.Roy Marples2008-01-07
|
* Stop using static inflexable buffers when cleaning metas and reading files.Roy Marples2008-01-07
|
* Re-license as 2-clause BSD as I've re-written everything from the old ↵Roy Marples2007-11-15
| | | | dhcpcd-2 code base now.
* timeval defines seconds as long, so we should use long over time_tRoy Marples2007-11-07
|
* Reword the headers to just say we use the GPLv2.Roy Marples2007-11-07
|
* Update my e-mail address as I have retired from Gentoo.Roy Marples2007-11-06
|