diff options
Diffstat (limited to 'lib/utils_base.h')
-rw-r--r-- | lib/utils_base.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/utils_base.h b/lib/utils_base.h index 49e40a63..6e1af94a 100644 --- a/lib/utils_base.h +++ b/lib/utils_base.h | |||
@@ -28,6 +28,23 @@ typedef struct thresholds_struct { | |||
28 | range *critical; | 28 | range *critical; |
29 | } thresholds; | 29 | } thresholds; |
30 | 30 | ||
31 | #define STATE_FORMAT_VERSION "1" | ||
32 | |||
33 | typedef struct state_data_struct { | ||
34 | time_t time; | ||
35 | void *data; | ||
36 | int length; /* Of binary data */ | ||
37 | } state_data; | ||
38 | |||
39 | |||
40 | typedef struct state_key_struct { | ||
41 | char *name; | ||
42 | char *plugin_name; | ||
43 | int data_version; | ||
44 | char *_filename; | ||
45 | state_data *state_data; | ||
46 | } state_key; | ||
47 | |||
31 | range *parse_range_string (char *); | 48 | range *parse_range_string (char *); |
32 | int _set_thresholds(thresholds **, char *, char *); | 49 | int _set_thresholds(thresholds **, char *, char *); |
33 | void set_thresholds(thresholds **, char *, char *); | 50 | void set_thresholds(thresholds **, char *, char *); |
@@ -67,4 +84,11 @@ char *np_extract_value(const char*, const char*, char); | |||
67 | */ | 84 | */ |
68 | #define np_extract_ntpvar(l, n) np_extract_value(l, n, ',') | 85 | #define np_extract_ntpvar(l, n) np_extract_value(l, n, ',') |
69 | 86 | ||
87 | |||
88 | char *np_state_generate_key(const char **); | ||
89 | state_key *np_state_init(char *, char *, int); | ||
90 | state_data *np_state_read(state_key *); | ||
91 | void np_state_write_string(state_key *, time_t, char *); | ||
92 | void np_state_cleanup(state_key *); | ||
93 | |||
70 | #endif /* _UTILS_BASE_ */ | 94 | #endif /* _UTILS_BASE_ */ |