diff options
Diffstat (limited to 'plugins/utils.h')
-rw-r--r-- | plugins/utils.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/utils.h b/plugins/utils.h index a436e1c..5b54da3 100644 --- a/plugins/utils.h +++ b/plugins/utils.h | |||
@@ -16,6 +16,7 @@ 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 | |||
19 | #ifdef NP_EXTRA_OPTS | 20 | #ifdef NP_EXTRA_OPTS |
20 | /* Include extra-opts functions if compiled in */ | 21 | /* Include extra-opts functions if compiled in */ |
21 | #include "extra_opts.h" | 22 | #include "extra_opts.h" |
@@ -29,13 +30,6 @@ suite of plugins. */ | |||
29 | void support (void); | 30 | void support (void); |
30 | void print_revision (const char *, const char *); | 31 | void print_revision (const char *, const char *); |
31 | 32 | ||
32 | /* Handle timeouts */ | ||
33 | |||
34 | extern unsigned int timeout_state; | ||
35 | extern unsigned int timeout_interval; | ||
36 | |||
37 | RETSIGTYPE timeout_alarm_handler (int); | ||
38 | |||
39 | extern time_t start_time, end_time; | 33 | extern time_t start_time, end_time; |
40 | 34 | ||
41 | /* Test input types */ | 35 | /* Test input types */ |
@@ -45,6 +39,8 @@ int is_intpos (char *); | |||
45 | int is_intneg (char *); | 39 | int is_intneg (char *); |
46 | int is_intnonneg (char *); | 40 | int is_intnonneg (char *); |
47 | int is_intpercent (char *); | 41 | int is_intpercent (char *); |
42 | int is_uint64(char *number, uint64_t *target); | ||
43 | int is_int64(char *number, int64_t *target); | ||
48 | 44 | ||
49 | int is_numeric (char *); | 45 | int is_numeric (char *); |
50 | int is_positive (char *); | 46 | int is_positive (char *); |
@@ -89,14 +85,18 @@ void usage4(const char *) __attribute__((noreturn)); | |||
89 | void usage5(void) __attribute__((noreturn)); | 85 | void usage5(void) __attribute__((noreturn)); |
90 | void usage_va(const char *fmt, ...) __attribute__((noreturn)); | 86 | void usage_va(const char *fmt, ...) __attribute__((noreturn)); |
91 | 87 | ||
92 | const char *state_text (int); | ||
93 | |||
94 | #define max(a,b) (((a)>(b))?(a):(b)) | 88 | #define max(a,b) (((a)>(b))?(a):(b)) |
95 | #define min(a,b) (((a)<(b))?(a):(b)) | 89 | #define min(a,b) (((a)<(b))?(a):(b)) |
96 | 90 | ||
97 | char *perfdata (const char *, long int, const char *, int, long int, | 91 | char *perfdata (const char *, long int, const char *, int, long int, |
98 | int, long int, int, long int, int, long int); | 92 | int, long int, int, long int, int, long int); |
99 | 93 | ||
94 | char *perfdata_uint64 (const char *, uint64_t , const char *, int, uint64_t, | ||
95 | int, uint64_t, int, uint64_t, int, uint64_t); | ||
96 | |||
97 | char *perfdata_int64 (const char *, int64_t, const char *, int, int64_t, | ||
98 | int, int64_t, int, int64_t, int, int64_t); | ||
99 | |||
100 | char *fperfdata (const char *, double, const char *, int, double, | 100 | char *fperfdata (const char *, double, const char *, int, double, |
101 | int, double, int, double, int, double); | 101 | int, double, int, double, int, double); |
102 | 102 | ||
@@ -106,6 +106,8 @@ char *sperfdata (const char *, double, const char *, char *, char *, | |||
106 | char *sperfdata_int (const char *, int, const char *, char *, char *, | 106 | char *sperfdata_int (const char *, int, const char *, char *, char *, |
107 | int, int, int, int); | 107 | int, int, int, int); |
108 | 108 | ||
109 | int open_max (void); | ||
110 | |||
109 | /* The idea here is that, although not every plugin will use all of these, | 111 | /* The idea here is that, although not every plugin will use all of these, |
110 | most will or should. Therefore, for consistency, these very common | 112 | most will or should. Therefore, for consistency, these very common |
111 | options should have only these meanings throughout the overall suite */ | 113 | options should have only these meanings throughout the overall suite */ |