diff options
| author | rincewind <rincewind@example.com> | 2021-09-25 23:24:34 +0200 |
|---|---|---|
| committer | rincewind <rincewind@example.com> | 2021-09-25 23:24:34 +0200 |
| commit | 66e245375992c3942dbd5761f8b991e52bf5f9ab (patch) | |
| tree | 117025d6b36974a749914efd4d2623ea0fcd9ad5 /plugins/utils.h | |
| parent | cfc43a327526d838db5ec81f5594df4a14319786 (diff) | |
| download | monitoring-plugins-66e245375992c3942dbd5761f8b991e52bf5f9ab.tar.gz | |
Introduce new perfdata functions and stuff for using (u)int64_t
Diffstat (limited to 'plugins/utils.h')
| -rw-r--r-- | plugins/utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/utils.h b/plugins/utils.h index 33a20547..91a9c3f9 100644 --- a/plugins/utils.h +++ b/plugins/utils.h | |||
| @@ -16,6 +16,9 @@ suite of plugins. */ | |||
| 16 | /* now some functions etc are being defined in ../lib/utils_base.c */ | 16 | /* now some functions etc are being defined in ../lib/utils_base.c */ |
| 17 | #include "utils_base.h" | 17 | #include "utils_base.h" |
| 18 | 18 | ||
| 19 | |||
| 20 | #include <stdbool.h> | ||
| 21 | |||
| 19 | #ifdef NP_EXTRA_OPTS | 22 | #ifdef NP_EXTRA_OPTS |
| 20 | /* Include extra-opts functions if compiled in */ | 23 | /* Include extra-opts functions if compiled in */ |
| 21 | #include "extra_opts.h" | 24 | #include "extra_opts.h" |
| @@ -38,6 +41,7 @@ int is_intpos (char *); | |||
| 38 | int is_intneg (char *); | 41 | int is_intneg (char *); |
| 39 | int is_intnonneg (char *); | 42 | int is_intnonneg (char *); |
| 40 | int is_intpercent (char *); | 43 | int is_intpercent (char *); |
| 44 | bool is_uint64(char *number, uint64_t *target); | ||
| 41 | 45 | ||
| 42 | int is_numeric (char *); | 46 | int is_numeric (char *); |
| 43 | int is_positive (char *); | 47 | int is_positive (char *); |
| @@ -88,6 +92,12 @@ void usage_va(const char *fmt, ...) __attribute__((noreturn)); | |||
| 88 | char *perfdata (const char *, long int, const char *, int, long int, | 92 | char *perfdata (const char *, long int, const char *, int, long int, |
| 89 | int, long int, int, long int, int, long int); | 93 | int, long int, int, long int, int, long int); |
| 90 | 94 | ||
| 95 | char *perfdata_uint64 (const char *, uint64_t , const char *, int, uint64_t, | ||
| 96 | int, uint64_t, int, uint64_t, int, uint64_t); | ||
| 97 | |||
| 98 | char *perfdata_int64 (const char *, int64_t, const char *, int, int64_t, | ||
| 99 | int, int64_t, int, int64_t, int, int64_t); | ||
| 100 | |||
| 91 | char *fperfdata (const char *, double, const char *, int, double, | 101 | char *fperfdata (const char *, double, const char *, int, double, |
| 92 | int, double, int, double, int, double); | 102 | int, double, int, double, int, double); |
| 93 | 103 | ||
