diff options
Diffstat (limited to 'lib/utils_base.h')
-rw-r--r-- | lib/utils_base.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/utils_base.h b/lib/utils_base.h index b6eb57e..6a8af19 100644 --- a/lib/utils_base.h +++ b/lib/utils_base.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _UTILS_BASE_ | 2 | #define _UTILS_BASE_ |
3 | /* Header file for nagios plugins utils_base.c */ | 3 | /* Header file for nagios plugins utils_base.c */ |
4 | 4 | ||
5 | |||
5 | /* This file holds header information for thresholds - use this in preference to | 6 | /* This file holds header information for thresholds - use this in preference to |
6 | individual plugin logic */ | 7 | individual plugin logic */ |
7 | 8 | ||
@@ -46,6 +47,12 @@ typedef struct state_key_struct { | |||
46 | state_data *state_data; | 47 | state_data *state_data; |
47 | } state_key; | 48 | } state_key; |
48 | 49 | ||
50 | typedef struct np_struct { | ||
51 | char *plugin_name; | ||
52 | state_key *state; | ||
53 | char **expanded_argv; | ||
54 | } nagios_plugin; | ||
55 | |||
49 | range *parse_range_string (char *); | 56 | range *parse_range_string (char *); |
50 | int _set_thresholds(thresholds **, char *, char *); | 57 | int _set_thresholds(thresholds **, char *, char *); |
51 | void set_thresholds(thresholds **, char *, char *); | 58 | void set_thresholds(thresholds **, char *, char *); |
@@ -86,10 +93,11 @@ char *np_extract_value(const char*, const char*, char); | |||
86 | #define np_extract_ntpvar(l, n) np_extract_value(l, n, ',') | 93 | #define np_extract_ntpvar(l, n) np_extract_value(l, n, ',') |
87 | 94 | ||
88 | 95 | ||
89 | char *np_state_generate_key(char **); | 96 | void np_state_init(char *, int); |
90 | state_key *np_state_init(char *, char *, int); | 97 | state_data *np_state_read(); |
91 | state_data *np_state_read(state_key *); | 98 | void np_state_write_string(time_t *, char *); |
92 | void np_state_write_string(state_key *, time_t *, char *); | 99 | |
93 | void np_state_cleanup(state_key *); | 100 | void np_init(char *); |
101 | void np_cleanup(); | ||
94 | 102 | ||
95 | #endif /* _UTILS_BASE_ */ | 103 | #endif /* _UTILS_BASE_ */ |