From d5ed6a2d8f3f3f388e5d1f2f7a8fc3ee2c9b6007 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 13 Mar 2025 00:43:22 +0100 Subject: check_tcp: small improvement + output format picker --- plugins/check_tcp.d/config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'plugins/check_tcp.d') diff --git a/plugins/check_tcp.d/config.h b/plugins/check_tcp.d/config.h index 7ecf51a6..41db7224 100644 --- a/plugins/check_tcp.d/config.h +++ b/plugins/check_tcp.d/config.h @@ -1,10 +1,10 @@ #pragma once -#include "../common.h" #include "../../lib/utils_tcp.h" +#include "output.h" #include -typedef struct check_tcp_config { +typedef struct { char *server_address; bool host_specified; int server_port; // TODO can this be a uint16? @@ -37,6 +37,9 @@ typedef struct check_tcp_config { ssize_t maxbytes; bool hide_output; + + bool output_format_set; + mp_output_format output_format; } check_tcp_config; check_tcp_config check_tcp_config_init() { @@ -73,6 +76,8 @@ check_tcp_config check_tcp_config_init() { .maxbytes = 0, .hide_output = false, + + .output_format_set = false, }; return result; } -- cgit v1.2.3-74-g34f1