summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-09-09 01:57:25 +0200
committerGitHub <noreply@github.com>2025-09-09 01:57:25 +0200
commit615fec347cd575c0ee4343aa17ee99962f375f64 (patch)
treea3603d9006ecd9ed9dadc33aa3e9eeb25dbb5113 /lib/utils_base.h
parent5c81b8e2ab3df0b8c56bf5ab5b30b15a816a1112 (diff)
parentc43f845c22a9e879546472aa9051d7ca0803ef2a (diff)
downloadmonitoring-plugins-615fec347cd575c0ee4343aa17ee99962f375f64.tar.gz
Merge pull request #2144 from RincewindsHat/refactor/check_snmp
Refactor check snmp: - Switch from executing `snmpget`/`snmpgetnext` to linking directly agains net-snmp - Refactor to use test abstraction -> allows for JSON output
Diffstat (limited to 'lib/utils_base.h')
-rw-r--r--lib/utils_base.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/utils_base.h b/lib/utils_base.h
index 123066f8..f1c99a54 100644
--- a/lib/utils_base.h
+++ b/lib/utils_base.h
@@ -8,7 +8,6 @@
8#include "./perfdata.h" 8#include "./perfdata.h"
9#include "./thresholds.h" 9#include "./thresholds.h"
10 10
11
12#ifndef USE_OPENSSL 11#ifndef USE_OPENSSL
13# include "sha256.h" 12# include "sha256.h"
14#endif 13#endif
@@ -26,25 +25,8 @@
26#define OUTSIDE 0 25#define OUTSIDE 0
27#define INSIDE 1 26#define INSIDE 1
28 27
29#define NP_STATE_FORMAT_VERSION 1
30
31typedef struct state_data_struct {
32 time_t time;
33 void *data;
34 int length; /* Of binary data */
35} state_data;
36
37typedef struct state_key_struct {
38 char *name;
39 char *plugin_name;
40 int data_version;
41 char *_filename;
42 state_data *state_data;
43} state_key;
44
45typedef struct np_struct { 28typedef struct np_struct {
46 char *plugin_name; 29 char *plugin_name;
47 state_key *state;
48 int argc; 30 int argc;
49 char **argv; 31 char **argv;
50} monitoring_plugin; 32} monitoring_plugin;
@@ -100,10 +82,6 @@ char *np_extract_value(const char *, const char *, char);
100 */ 82 */
101int mp_translate_state(char *); 83int mp_translate_state(char *);
102 84
103void np_enable_state(char *, int);
104state_data *np_state_read(void);
105void np_state_write_string(time_t, char *);
106
107void np_init(char *, int argc, char **argv); 85void np_init(char *, int argc, char **argv);
108void np_set_args(int argc, char **argv); 86void np_set_args(int argc, char **argv);
109void np_cleanup(void); 87void np_cleanup(void);