mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
output: make output_analysis() to be regular function
This commit makes it possible to define alarming thresholds at the same time with other output formats. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
9deeae8c36
commit
abf5d04736
4 changed files with 73 additions and 74 deletions
|
|
@ -186,6 +186,7 @@ struct configuration_t {
|
|||
enum dhcp_version ip_version;
|
||||
char *dhcpdconf_file;
|
||||
char *dhcpdlease_file;
|
||||
int output_format;
|
||||
struct output_sort *sorts;
|
||||
char *output_file;
|
||||
double warning;
|
||||
|
|
@ -197,7 +198,6 @@ struct configuration_t {
|
|||
reverse_order:1,
|
||||
backups_found:1,
|
||||
snet_alarms:1,
|
||||
print_mac_addreses:1,
|
||||
perfdata:1,
|
||||
all_as_shared:1,
|
||||
header_limit:3,
|
||||
|
|
@ -224,7 +224,7 @@ extern unsigned int RANGES;
|
|||
/* Function prototypes */
|
||||
extern void prepare_memory(void);
|
||||
extern void set_ipv_functions(int version);
|
||||
extern int parse_leases(void);
|
||||
extern int parse_leases(const int print_mac_addreses);
|
||||
extern void parse_config(int, const char *restrict, struct shared_network_t *restrict)
|
||||
__attribute__ ((nonnull(2, 3)));
|
||||
extern void prepare_data(void);
|
||||
|
|
@ -301,14 +301,8 @@ extern double ret_tcperc(struct range_t r);
|
|||
extern void mergesort_ranges(struct range_t *restrict orig, int size,
|
||||
struct range_t *restrict temp)
|
||||
__attribute__ ((nonnull(1, 3)));
|
||||
/* output function pointer and functions */
|
||||
extern int (*output_analysis) (void);
|
||||
extern int output_txt(void);
|
||||
extern int output_html(void);
|
||||
extern int output_xml(void);
|
||||
extern int output_json(void);
|
||||
extern int output_csv(void);
|
||||
extern int output_alarming(void);
|
||||
/* output function */
|
||||
extern int output_analysis(const char);
|
||||
/* Memory release, file closing etc */
|
||||
extern void clean_up(void);
|
||||
/* Hash functions */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue