From 3008d521c1284f6f182d9cc10d56afdaa3978a04 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:51:02 +0100 Subject: Refactor check_radius --- plugins/check_radius.d/config.h | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 plugins/check_radius.d/config.h (limited to 'plugins/check_radius.d') diff --git a/plugins/check_radius.d/config.h b/plugins/check_radius.d/config.h new file mode 100644 index 00000000..b27d31e7 --- /dev/null +++ b/plugins/check_radius.d/config.h @@ -0,0 +1,42 @@ +#pragma once + +#include "../../config.h" +#include +#if defined(HAVE_LIBRADCLI) +# include +#elif defined(HAVE_LIBFREERADIUS_CLIENT) +# include +#elif defined(HAVE_LIBRADIUSCLIENT_NG) +# include +#else +# include +#endif + +typedef struct { + char *server; + char *username; + char *password; + char *config_file; + char *nas_id; + char *nas_ip_address; + int retries; + unsigned short port; + + char *expect; +} check_radius_config; + +check_radius_config check_radius_config_init() { + check_radius_config tmp = { + .server = NULL, + .username = NULL, + .password = NULL, + .config_file = NULL, + .nas_id = NULL, + .nas_ip_address = NULL, + .retries = 1, + .port = PW_AUTH_UDP_PORT, + + .expect = NULL, + }; + return tmp; +} -- cgit v1.2.3-74-g34f1