summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils_base.h')
-rw-r--r--lib/utils_base.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/utils_base.h b/lib/utils_base.h
index 5906550..80b8743 100644
--- a/lib/utils_base.h
+++ b/lib/utils_base.h
@@ -2,9 +2,11 @@
2#define _UTILS_BASE_ 2#define _UTILS_BASE_
3/* Header file for Monitoring Plugins utils_base.c */ 3/* Header file for Monitoring Plugins utils_base.c */
4 4
5#include "sha256.h" 5#ifndef USE_OPENSSL
6# include "sha256.h"
7#endif
6 8
7/* This file holds header information for thresholds - use this in preference to 9/* This file holds header information for thresholds - use this in preference to
8 individual plugin logic */ 10 individual plugin logic */
9 11
10/* This has not been merged with utils.h because of problems with 12/* This has not been merged with utils.h because of problems with
@@ -19,7 +21,7 @@
19 21
20typedef struct range_struct { 22typedef struct range_struct {
21 double start; 23 double start;
22 int start_infinity; /* FALSE (default) or TRUE */ 24 bool start_infinity;
23 double end; 25 double end;
24 int end_infinity; 26 int end_infinity;
25 int alert_on; /* OUTSIDE (default) or INSIDE */ 27 int alert_on; /* OUTSIDE (default) or INSIDE */
@@ -59,7 +61,7 @@ range *parse_range_string (char *);
59int _set_thresholds(thresholds **, char *, char *); 61int _set_thresholds(thresholds **, char *, char *);
60void set_thresholds(thresholds **, char *, char *); 62void set_thresholds(thresholds **, char *, char *);
61void print_thresholds(const char *, thresholds *); 63void print_thresholds(const char *, thresholds *);
62int check_range(double, range *); 64bool check_range(double, range *);
63int get_status(double, thresholds *); 65int get_status(double, thresholds *);
64 66
65/* Handle timeouts */ 67/* Handle timeouts */
@@ -77,7 +79,7 @@ void die (int, const char *, ...) __attribute__((noreturn,format(printf, 2, 3)))
77#define NP_RANGE_UNPARSEABLE 1 79#define NP_RANGE_UNPARSEABLE 1
78#define NP_WARN_WITHIN_CRIT 2 80#define NP_WARN_WITHIN_CRIT 2
79 81
80/* a simple check to see if we're running as root. 82/* a simple check to see if we're running as root.
81 * returns zero on failure, nonzero on success */ 83 * returns zero on failure, nonzero on success */
82int np_check_if_root(void); 84int np_check_if_root(void);
83 85