From a2ce9e962d52ebaffc275379c82ce29229a1fba8 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Tue, 11 Mar 2025 11:07:26 +0100 Subject: Refactor check_hpjd --- plugins/check_hpjd.d/config.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 plugins/check_hpjd.d/config.h (limited to 'plugins/check_hpjd.d') diff --git a/plugins/check_hpjd.d/config.h b/plugins/check_hpjd.d/config.h new file mode 100644 index 00000000..e36b7972 --- /dev/null +++ b/plugins/check_hpjd.d/config.h @@ -0,0 +1,25 @@ +#pragma once + +#include "../../config.h" +#include +#include + +#define DEFAULT_PORT "161" + +typedef struct { + char *address; + char *community; + unsigned int port; + bool check_paper_out; + +} check_hpjd_config; + +check_hpjd_config check_hpjd_config_init() { + check_hpjd_config tmp = { + .address = NULL, + .community = NULL, + .port = (unsigned int)atoi(DEFAULT_PORT), + .check_paper_out = true, + }; + return tmp; +} -- cgit v1.2.3-74-g34f1