It seems that one can reach the abort() with severely broken configuration
file, that is extremely unlikely to run without parser error when given to
ISC dhcpd. So such files ought to be impossible, and it is good enough for
this software to report position where parsing cannot be continued.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Incomplete html page, that was just a html table, was removed some time ago
but deprecated option arguments were unfortunately left to manual that are
now removed.
Reference: 1299737d76
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Most of these functions take pointers as input argument, so they cannot be
considered neiter const or pure. In same go fix few issues noticed when
compiling with smatch.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This makes compiler to options not to be shown when running make, and that
allows noticing warnings more easily.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
src/dhcpd-pools.c:193:18: warning: comparison of integers of different
signs: 'int' and 'unsigned long' [-Wsign-compare]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The html format is done using Bootstrap and DataTables. That deprecatated
need for having cgi to wrap dhcpd-pools.
Reference: 1299737d76
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Options -p or --perfdata (in alarming mode) now enable the output of
additional performance data, i.e. used, touched and backup addresses per
subnet.
Signed-off-by: Manuel Hachtkemper <hacman@math.uni-bonn.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Apparently ISC dhcpd allows marking ranges in order from greater IP to
smaller. In these cases first and last IPs are fliped, so that the rest of
the processing can be done without alterations.
Reported-by: Ivanov Ivan <mgfnv9@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
More than 90% is hefty pay-off.
$ gzip -v -d sitemap.txt.gz
sitemap.txt.gz: 93.5% -- replaced with sitemap.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Use css max-width instead of width this permits narrow screen to wrap lines,
this makes the index page more usable when browsing with a mobile phone or
some other device with limited horizontal dimension. Also get rid of <pre>
tag, and make the sample usage more realistic.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
For some unknown reason mac osx does not change NAN to negative in printout
when asking to do so. To get rid of false positive test results change the
sign of NAN to positive, that may break something for someone if there are
people expecting -NAN when devision with zero happens. But that sort of
breakage is pretty unlikely because it requires broken dhcpd.conf.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
I should consider writing tests before features. Sadly recently added new
options did not even work. Oh well, at least I did not release them before
noticing this.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Users want to know why write fail - was it because disk full, or destination
read-only, or IO error, and so on.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Not all markups were quite right. The output_* functions must return an
int. The rest were as a matter of fact correct.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This make the table output good looking, and allows users to click table
headings to sort data by column without rerunning the analysis.
Unfortunately this change is breaking change, meaning the old CSS tags are
no longer supported, nor partial html output that printed only the table.
Proposed-by: Aaron Paetznick <aaronp@critd.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Alarm criteria based solely on percentage was found to be difficult to be
tricky to setup in environments that has small ranges and big shared-nets
mixed up together. These two new options should help making alarming more
useful.
Requested-by: Frank Bulk <fbulk@mypremieronline.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>