mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
output: add output helper functions
There is too much repetative confusing maths near printouts. Move that stuff to a function. This change also fixes --snet-alarms option counting issue in range that were not part of any shared network were ignored. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
05f8208518
commit
48962004b8
3 changed files with 184 additions and 126 deletions
|
|
@ -121,6 +121,27 @@ struct range_t {
|
|||
double touched;
|
||||
double backups;
|
||||
};
|
||||
/*! \enum count_status_t
|
||||
* \brief Enumeration of possible range and shared net statuses.
|
||||
*/
|
||||
enum count_status_t {
|
||||
STATUS_OK,
|
||||
STATUS_WARN,
|
||||
STATUS_CRIT,
|
||||
STATUS_IGNORED,
|
||||
STATUS_SUPPRESSED
|
||||
};
|
||||
/*! \struct output_helper_t
|
||||
* \brief Various per range and shared net temporary calculation results.
|
||||
*/
|
||||
struct output_helper_t {
|
||||
int status;
|
||||
double range_size;
|
||||
double percent;
|
||||
double tc;
|
||||
double tcp;
|
||||
double bup;
|
||||
};
|
||||
/*! \enum isc_conf_parser
|
||||
* \brief Configuration file parsing state flags.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue