From 65794e31374b3aa6e1f2c03d090b52e137df13e6 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Sat, 8 Mar 2025 13:05:57 +0100 Subject: Refactor check_dns --- plugins/check_dns.d/config.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 plugins/check_dns.d/config.h (limited to 'plugins/check_dns.d') diff --git a/plugins/check_dns.d/config.h b/plugins/check_dns.d/config.h new file mode 100644 index 00000000..9ec4eb82 --- /dev/null +++ b/plugins/check_dns.d/config.h @@ -0,0 +1,34 @@ +#pragma once + +#include "../../config.h" +#include "thresholds.h" +#include + +#define ADDRESS_LENGTH 256 + +typedef struct { + bool all_match; + char dns_server[ADDRESS_LENGTH]; + char query_address[ADDRESS_LENGTH]; + bool expect_nxdomain; + bool expect_authority; + char **expected_address; + size_t expected_address_cnt; + + thresholds *time_thresholds; +} check_dns_config; + +check_dns_config check_dns_config_init() { + check_dns_config tmp = { + .all_match = false, + .dns_server = "", + .query_address = "", + .expect_nxdomain = false, + .expect_authority = false, + .expected_address = NULL, + .expected_address_cnt = 0, + + .time_thresholds = NULL, + }; + return tmp; +} -- cgit v1.2.3-74-g34f1