Commit graph

359 commits

Author SHA1 Message Date
Sami Kerola
7740927721
build-sys: always use restrict found by autoconf
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-08-16 13:25:23 +01:00
Sami Kerola
9bb30b29ca
build-sys: default to ./configure --enable-silent-rules
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>
2016-08-15 21:18:29 +01:00
Sami Kerola
1b35a16d95
analyze: use while() when for() is less fit to purpose
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-07-03 14:00:00 +01:00
Sami Kerola
d26c858c13
build-sys: update gnulib .gitignore file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-05-29 21:22:13 +01:00
Sami Kerola
840d2143e6
build-sys: update bootstrap from gnulib
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-05-29 21:20:39 +01:00
Sami Kerola
a3ef3d617f
output: check alarming mode can output successfully
Fixes also a resource leak.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-24 12:29:50 +01:00
Sami Kerola
f6e256243d
fix doap file git repository and license section
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-23 22:55:21 +01:00
Sami Kerola
ccd5370d9c
add dhcpd-pools Description Of A Project file
Reference: https://github.com/edumbill/doap/wiki
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-23 22:33:08 +01:00
Sami Kerola
c4ebafb106
argument parsing: fix compiler warning
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>
2016-04-23 16:35:38 +01:00
Sami Kerola
87c06a1b13
getdata: get rid of remaining stdbool usage
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-23 16:32:08 +01:00
Sami Kerola
8a8c28a17e
contrib: remove awk file duplicate
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-01 23:11:37 +01:00
Sami Kerola
5a33b619d1
contrib: remove unnecessary cgi script
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>
2016-04-01 23:11:37 +01:00
Sami Kerola
e5f9a77511
contrib: add archlinux package build file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-01 23:11:36 +01:00
Manuel Hachtkemper
32e2d399a0
alarming: add additional performance data
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>
2016-03-31 22:34:27 +01:00
Sami Kerola
c305e2f82c
tests: add range definition flip test
This test ensure 10b06d88f0 will not get
regression in future.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-02-18 23:05:24 +00:00
Sami Kerola
10b06d88f0
getdata: flip ranges if they are in greater smaller order
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>
2016-02-18 22:35:56 +00:00
Sami Kerola
3d0c510475
webpages: compress sitemap.txt file
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>
2015-12-29 21:52:48 +00:00
Sami Kerola
46641751b4
webpages: make index page mobile device friendly
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>
2015-12-29 21:29:32 +00:00
Sami Kerola
d717a043bf
use long options in .indent.pro file
Short options are impossible to understand without looking to manual page.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-10 22:42:54 +00:00
Sami Kerola
03b1edb188
add sitemap url to robots.txt file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-07 10:55:45 +00:00
Sami Kerola
1dcf762967
add dhcpd-pools website content to a subdirectory
Start using git to backup of the website content.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-07 10:32:02 +00:00
Sami Kerola
17f1fb7f5e
tell in README when ./bootstrap is needed
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-06 19:08:08 +00:00
Sami Kerola
4cd85b62ff
release: 2.28
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-06 17:48:56 +00:00
Sami Kerola
ace697b472
fix out of tree build tests
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-06 17:44:30 +00:00
Sami Kerola
1a7d982495
change NAN markup to make tests work on mac
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>
2015-12-06 11:46:07 +00:00
Sami Kerola
01aa13cf43
test all sorting options
Not perfect test, but atleast something.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-05 19:51:53 +00:00
Sami Kerola
da4b7a783a
add --warn-count and --crit-count test, and fix related bug
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>
2015-12-05 19:38:08 +00:00
Sami Kerola
15802d6648
unify quotation in error messages
Use quote() from gnulib to do this.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-05 19:00:32 +00:00
Sami Kerola
d6486e7730
make usage() easier to read
None-continuous print out blocks are difficult.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-05 18:59:40 +00:00
Sami Kerola
bd45266f74
drop a core when bug condition happens
Having a core will help enormously debugging these issues.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-05 18:50:28 +00:00
Sami Kerola
8fca82f148
print include system error message when output fails
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>
2015-12-04 20:35:35 +00:00
Sami Kerola
f5cd7383e4
fix improve variable names
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-04 19:32:50 +00:00
Sami Kerola
49835cccb5
fix doxygen build
And .gitignore doxygen related outputs.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-03 21:35:13 +00:00
Sami Kerola
98bcdf9378
simplify output format selection, and passing
Use of enum is a lot more readable than passing strings, and comparing
characters, around.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-01 23:25:54 +00:00
Sami Kerola
b524296016
use bitmap for booleans and other config that has known size
Bitmaps are more c style than bool coming from c++ land.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-01 23:24:14 +00:00
Sami Kerola
5ed9958b69
fix protocol specifier in html output
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-12-01 21:58:52 +00:00
Sami Kerola
0369340710
remove upper limit of sort order definitions
Unlikely to be needed by anyone, but because arbitrary limits are from code
style point of view ugly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-30 00:50:18 +00:00
Sami Kerola
327691f34a
use more descriptive names in limit bits enum definition
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-29 23:36:19 +00:00
Sami Kerola
4aff49ed80
correct return value FIXME items
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>
2015-11-28 21:03:38 +00:00
Sami Kerola
f11ca0bec2
fix typo in README
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-28 20:51:18 +00:00
Sami Kerola
1299737d76
make html output to use Bootstrap and DataTables
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>
2015-11-28 20:37:23 +00:00
Sami Kerola
c7917152d3
improve README file instructions
Proposed-by: Derrick Lin <d.lin@garvan.org.au>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-28 11:22:28 +00:00
Sami Kerola
5cede1ff31
add --warn-count and --crit-count options to suppress alarm noise
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>
2015-11-28 00:33:12 +00:00
Sami Kerola
7f3d553c7f
add --snet-alarms option to suppress excess range alarms
Some users may not want to have alarms about ranges that are part of a
shared-network, so allow them to suppress such.

Requested-by: Frank Bulk <fbulk@mypremieronline.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-27 23:42:23 +00:00
Sami Kerola
99b6af70ef
update doxygen.conf file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-25 22:02:41 +00:00
Sami Kerola
2528c4c9d6
make binary exec path dynamic in scripts referring to it
Everything should just work out of the box without poking.  This change
makes that goal to be yet agian one step closer.  In same go make all
autotools related variable substitutions better.

Requested-by: Martijn van Brummelen <martijn@brumit.nl>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-25 21:53:29 +00:00
Sami Kerola
c30c122027
fix couple compiler warnings
src/getdata.c:248:22: warning: 'range_p' may be used uninitialized in this
function [-Wmaybe-uninitialized]
src/other.c:383:1: warning: control reaches end of non-void function
[-Wreturn-type]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-10-26 22:43:31 +00:00
Sami Kerola
535dfc4fc2
portability: Solaris 10 does not have err.h
Use error(3) function, that has gnulib portability fixes, instead of err(3)
and warn(3) family.

Reported-by: Anton Tkachev <antont@bk.ru>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-10-26 22:29:32 +00:00
Sami Kerola
fae20302cf release: 2.27
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-09-05 13:35:44 +01:00
Sami Kerola
167c4b6989 gitignore: update gnulib file list
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-09-05 13:34:41 +01:00