From 62c95256699bf476207b92ae521577f339d5134d Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Thu, 17 Jun 2010 23:18:17 +0100 Subject: np_init() with this_nagios_plugin --- lib/utils_base.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'lib/utils_base.h') diff --git a/lib/utils_base.h b/lib/utils_base.h index b6eb57e1..6a8af198 100644 --- a/lib/utils_base.h +++ b/lib/utils_base.h @@ -2,6 +2,7 @@ #define _UTILS_BASE_ /* Header file for nagios plugins utils_base.c */ + /* This file holds header information for thresholds - use this in preference to individual plugin logic */ @@ -46,6 +47,12 @@ typedef struct state_key_struct { state_data *state_data; } state_key; +typedef struct np_struct { + char *plugin_name; + state_key *state; + char **expanded_argv; + } nagios_plugin; + range *parse_range_string (char *); int _set_thresholds(thresholds **, char *, char *); void set_thresholds(thresholds **, char *, char *); @@ -86,10 +93,11 @@ char *np_extract_value(const char*, const char*, char); #define np_extract_ntpvar(l, n) np_extract_value(l, n, ',') -char *np_state_generate_key(char **); -state_key *np_state_init(char *, char *, int); -state_data *np_state_read(state_key *); -void np_state_write_string(state_key *, time_t *, char *); -void np_state_cleanup(state_key *); +void np_state_init(char *, int); +state_data *np_state_read(); +void np_state_write_string(time_t *, char *); + +void np_init(char *); +void np_cleanup(); #endif /* _UTILS_BASE_ */ -- cgit v1.2.3-74-g34f1